@ornikar/kitt-universal 25.48.1-canary.430f6cd109998511d4c4ad7369a24908547c62f4.0 → 25.49.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 +2 -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 +164 -922
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +164 -922
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-20.10.cjs.js +97 -852
- 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 +139 -822
- package/dist/index-node-20.10.cjs.web.js.map +1 -1
- package/dist/index-node-20.10.es.mjs +98 -850
- 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 +141 -821
- package/dist/index-node-20.10.es.web.mjs.map +1 -1
- package/dist/index.es.js +166 -935
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +225 -910
- package/dist/index.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
package/dist/index.es.web.js
CHANGED
|
@@ -13,7 +13,7 @@ import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
|
13
13
|
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';
|
|
14
14
|
import { createPortal } from 'react-dom';
|
|
15
15
|
import { CSSTransition } from 'react-transition-group';
|
|
16
|
-
import { ScrollView as ScrollView$2, View as View$2, Linking, Pressable as Pressable$2,
|
|
16
|
+
import { ScrollView as ScrollView$2, View as View$2, Linking, Pressable as Pressable$2, useWindowDimensions } from 'react-native';
|
|
17
17
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
18
18
|
import { parse } from '@twemoji/parser';
|
|
19
19
|
import Downshift, { useSelect } from 'downshift';
|
|
@@ -2627,7 +2627,7 @@ function ActionCardDisabled(_ref) {
|
|
|
2627
2627
|
});
|
|
2628
2628
|
}
|
|
2629
2629
|
|
|
2630
|
-
var _excluded$
|
|
2630
|
+
var _excluded$S = ["children", "variant", "borderVariant", "borderRadius", "disabled", "isHovered", "isPressed", "isFocused"];
|
|
2631
2631
|
function ActionCard(_ref) {
|
|
2632
2632
|
var children = _ref.children,
|
|
2633
2633
|
_ref$variant = _ref.variant,
|
|
@@ -2640,7 +2640,7 @@ function ActionCard(_ref) {
|
|
|
2640
2640
|
isHovered = _ref.isHovered,
|
|
2641
2641
|
isPressed = _ref.isPressed,
|
|
2642
2642
|
isFocused = _ref.isFocused,
|
|
2643
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2643
|
+
props = _objectWithoutProperties(_ref, _excluded$S);
|
|
2644
2644
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
2645
2645
|
children: disabled ? /*#__PURE__*/jsx(ActionCardDisabled, {
|
|
2646
2646
|
borderRadius: borderRadius,
|
|
@@ -2989,7 +2989,7 @@ var getTypographyFamilyWithAncestorValue = function (type, typographyFamilyInCon
|
|
|
2989
2989
|
throw new Error('You must set a "base" prop or wrap this Typography in one that does.');
|
|
2990
2990
|
};
|
|
2991
2991
|
|
|
2992
|
-
var _excluded$
|
|
2992
|
+
var _excluded$R = ["accessibilityRole", "base", "small", "medium", "large", "wide", "type", "variant", "color"];
|
|
2993
2993
|
var TypographyFamilyContext = /*#__PURE__*/createContext(null);
|
|
2994
2994
|
var TypographyTypeContext = /*#__PURE__*/createContext(null);
|
|
2995
2995
|
var TypographyColorContext = /*#__PURE__*/createContext('black');
|
|
@@ -3044,7 +3044,7 @@ function Typography(_ref) {
|
|
|
3044
3044
|
} : _ref$type,
|
|
3045
3045
|
variant = _ref.variant,
|
|
3046
3046
|
color = _ref.color,
|
|
3047
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
3047
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$R);
|
|
3048
3048
|
var sx = useSx();
|
|
3049
3049
|
var typographyFamilyInContext = useContext(TypographyFamilyContext);
|
|
3050
3050
|
var defaultColor = useTypographyDefaultColor();
|
|
@@ -3160,7 +3160,7 @@ function Icon(_ref) {
|
|
|
3160
3160
|
});
|
|
3161
3161
|
}
|
|
3162
3162
|
|
|
3163
|
-
var _excluded
|
|
3163
|
+
var _excluded$Q = ["color", "size"],
|
|
3164
3164
|
_excluded2$6 = ["color"];
|
|
3165
3165
|
function getIconSizeConfigKeyFromTypeName(breakpointName) {
|
|
3166
3166
|
return breakpointName === KittBreakpointNameEnum.BASE || breakpointName === KittBreakpointNameEnum.SMALL ? 'baseAndSmall' : 'mediumAndWide';
|
|
@@ -3181,7 +3181,7 @@ function createNativeBaseIconSize(type) {
|
|
|
3181
3181
|
function TypographyIconSpecifiedColor(_ref) {
|
|
3182
3182
|
var color = _ref.color,
|
|
3183
3183
|
size = _ref.size,
|
|
3184
|
-
props = _objectWithoutProperties(_ref, _excluded
|
|
3184
|
+
props = _objectWithoutProperties(_ref, _excluded$Q);
|
|
3185
3185
|
var ancestorType = useTypographyAncestorType();
|
|
3186
3186
|
var iconSize = size || (ancestorType ? createNativeBaseIconSize(ancestorType) : undefined);
|
|
3187
3187
|
var colorValue = getTypographyColorValue(color);
|
|
@@ -3234,7 +3234,7 @@ var getButtonTextColorByType = function (type, variant, isHovered, isPressed) {
|
|
|
3234
3234
|
}
|
|
3235
3235
|
};
|
|
3236
3236
|
|
|
3237
|
-
var _excluded$
|
|
3237
|
+
var _excluded$P = ["type", "variant", "isDisabled", "icon", "children", "isHovered", "isPressed", "isFocused", "innerSpacing"];
|
|
3238
3238
|
function ButtonIcon(_ref) {
|
|
3239
3239
|
var icon = _ref.icon,
|
|
3240
3240
|
color = _ref.color,
|
|
@@ -3311,7 +3311,7 @@ function ButtonContent(_ref3) {
|
|
|
3311
3311
|
isPressed = _ref3.isPressed;
|
|
3312
3312
|
_ref3.isFocused;
|
|
3313
3313
|
var innerSpacing = _ref3.innerSpacing,
|
|
3314
|
-
props = _objectWithoutProperties(_ref3, _excluded$
|
|
3314
|
+
props = _objectWithoutProperties(_ref3, _excluded$P);
|
|
3315
3315
|
var color = isDisabled ? 'black-light' : getButtonTextColorByType(type, variant, isHovered, isPressed);
|
|
3316
3316
|
return /*#__PURE__*/jsx(View, {
|
|
3317
3317
|
_web: {
|
|
@@ -3544,7 +3544,7 @@ function LoaderIcon(_ref) {
|
|
|
3544
3544
|
});
|
|
3545
3545
|
}
|
|
3546
3546
|
|
|
3547
|
-
var _excluded$
|
|
3547
|
+
var _excluded$O = ["as", "onPress", "disabled", "icon", "stretch"];
|
|
3548
3548
|
var ActionsItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
3549
3549
|
var as = _ref.as,
|
|
3550
3550
|
onPress = _ref.onPress,
|
|
@@ -3555,7 +3555,7 @@ var ActionsItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3555
3555
|
base: true,
|
|
3556
3556
|
medium: false
|
|
3557
3557
|
} : _ref$stretch,
|
|
3558
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3558
|
+
props = _objectWithoutProperties(_ref, _excluded$O);
|
|
3559
3559
|
var _useState = useState(false),
|
|
3560
3560
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3561
3561
|
isLoading = _useState2[0],
|
|
@@ -3628,7 +3628,7 @@ function ActionsButton(_ref) {
|
|
|
3628
3628
|
}, props));
|
|
3629
3629
|
}
|
|
3630
3630
|
|
|
3631
|
-
var _excluded$
|
|
3631
|
+
var _excluded$N = ["children", "layout", "reversed"];
|
|
3632
3632
|
function getCurrentLayout(layout) {
|
|
3633
3633
|
if (!layout) return {
|
|
3634
3634
|
base: 'stretch',
|
|
@@ -3660,7 +3660,7 @@ function Actions(_ref) {
|
|
|
3660
3660
|
reversed = _ref$reversed === void 0 ? {
|
|
3661
3661
|
base: false
|
|
3662
3662
|
} : _ref$reversed,
|
|
3663
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3663
|
+
props = _objectWithoutProperties(_ref, _excluded$N);
|
|
3664
3664
|
var shouldReverse = typeof reversed === 'boolean' ? {
|
|
3665
3665
|
base: !!reversed
|
|
3666
3666
|
} : createResponsiveStyleFromProp(reversed, true, false);
|
|
@@ -3713,7 +3713,7 @@ function getInitials(firstname, lastname) {
|
|
|
3713
3713
|
return "".concat(firstname[0]).concat(lastname[0]).toUpperCase();
|
|
3714
3714
|
}
|
|
3715
3715
|
|
|
3716
|
-
var _excluded$
|
|
3716
|
+
var _excluded$M = ["size", "round", "light", "sizeVariant", "width", "height", "dark", "disabled"];
|
|
3717
3717
|
function AvatarContent(_ref) {
|
|
3718
3718
|
var size = _ref.size,
|
|
3719
3719
|
src = _ref.src,
|
|
@@ -3776,7 +3776,7 @@ function Avatar(_ref2) {
|
|
|
3776
3776
|
height = _ref2.height,
|
|
3777
3777
|
dark = _ref2.dark,
|
|
3778
3778
|
disabled = _ref2.disabled,
|
|
3779
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
3779
|
+
props = _objectWithoutProperties(_ref2, _excluded$M);
|
|
3780
3780
|
var currentSize = getCurrentSize({
|
|
3781
3781
|
size: size,
|
|
3782
3782
|
sizeVariant: sizeVariant
|
|
@@ -3853,23 +3853,6 @@ function useStaticBottomSheet(Content) {
|
|
|
3853
3853
|
};
|
|
3854
3854
|
}
|
|
3855
3855
|
|
|
3856
|
-
/**
|
|
3857
|
-
* A utility component that returns its children without any modifications.
|
|
3858
|
-
*
|
|
3859
|
-
* This component acts as an identity function for React elements - it simply returns
|
|
3860
|
-
* whatever children are passed to it. It can be useful in conditional rendering patterns,
|
|
3861
|
-
* component composition, or as a placeholder in component hierarchies.
|
|
3862
|
-
*
|
|
3863
|
-
* @returns The children as they were passed in, without any wrapper elements
|
|
3864
|
-
*
|
|
3865
|
-
* @example
|
|
3866
|
-
* See CardModal and FullscreenModal for usage examples.
|
|
3867
|
-
*/
|
|
3868
|
-
function IdentityComponent(_ref) {
|
|
3869
|
-
var children = _ref.children;
|
|
3870
|
-
return children;
|
|
3871
|
-
}
|
|
3872
|
-
|
|
3873
3856
|
var overflowHidden = "kitt-u_overflowHidden_otm3u3";
|
|
3874
3857
|
function useBlockBodyScroll(shouldBlockScroll, isInitialRender) {
|
|
3875
3858
|
useEffect(function () {
|
|
@@ -3971,259 +3954,11 @@ function CardModalRotationContainer(props) {
|
|
|
3971
3954
|
}, props));
|
|
3972
3955
|
}
|
|
3973
3956
|
|
|
3974
|
-
var _excluded$
|
|
3975
|
-
var contentAnimationEnter$
|
|
3976
|
-
var contentAnimatioEnterActive$
|
|
3977
|
-
var contentAnimatioExit$
|
|
3978
|
-
var contentAnimatioExitActive$
|
|
3979
|
-
var contentAnimationClassNames$2 = {
|
|
3980
|
-
appear: contentAnimationEnter$2,
|
|
3981
|
-
appearActive: contentAnimatioEnterActive$2,
|
|
3982
|
-
enter: contentAnimationEnter$2,
|
|
3983
|
-
enterActive: contentAnimatioEnterActive$2,
|
|
3984
|
-
exit: contentAnimatioExit$2,
|
|
3985
|
-
exitActive: contentAnimatioExitActive$2
|
|
3986
|
-
};
|
|
3987
|
-
var opacityEnter$3 = "kitt-u_opacityEnter_o1ae40dx";
|
|
3988
|
-
var opacityEnterActive$3 = "kitt-u_opacityEnterActive_o1t4vl7b";
|
|
3989
|
-
var opacityExit$3 = "kitt-u_opacityExit_ogyytm1";
|
|
3990
|
-
var opacityExitActive$3 = "kitt-u_opacityExitActive_o18xvk52";
|
|
3991
|
-
var opacityClassNames$3 = {
|
|
3992
|
-
appear: opacityEnter$3,
|
|
3993
|
-
appearActive: opacityEnterActive$3,
|
|
3994
|
-
enter: opacityEnter$3,
|
|
3995
|
-
enterActive: opacityEnterActive$3,
|
|
3996
|
-
exit: opacityExit$3,
|
|
3997
|
-
exitActive: opacityExitActive$3
|
|
3998
|
-
};
|
|
3999
|
-
function CardModalAnimation(_ref) {
|
|
4000
|
-
var children = _ref.children,
|
|
4001
|
-
_ref$appear = _ref.appear,
|
|
4002
|
-
appear = _ref$appear === void 0 ? true : _ref$appear,
|
|
4003
|
-
visible = _ref.visible,
|
|
4004
|
-
_ref$unmountOnExit = _ref.unmountOnExit,
|
|
4005
|
-
unmountOnExit = _ref$unmountOnExit === void 0 ? true : _ref$unmountOnExit,
|
|
4006
|
-
_ref$isAnimationEnabl = _ref.isAnimationEnabled,
|
|
4007
|
-
isAnimationEnabled = _ref$isAnimationEnabl === void 0 ? true : _ref$isAnimationEnabl,
|
|
4008
|
-
onEnter = _ref.onEnter,
|
|
4009
|
-
onEntered = _ref.onEntered,
|
|
4010
|
-
onExit = _ref.onExit,
|
|
4011
|
-
onExited = _ref.onExited,
|
|
4012
|
-
onClose = _ref.onClose,
|
|
4013
|
-
props = _objectWithoutProperties(_ref, _excluded$W);
|
|
4014
|
-
var theme = useTheme();
|
|
4015
|
-
var animation = theme.kitt.cardModal.animation;
|
|
4016
|
-
var sharedProps = {
|
|
4017
|
-
"in": visible,
|
|
4018
|
-
appear: appear,
|
|
4019
|
-
unmountOnExit: unmountOnExit
|
|
4020
|
-
};
|
|
4021
|
-
return /*#__PURE__*/jsxs(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
4022
|
-
height: "100%",
|
|
4023
|
-
justifyContent: "center",
|
|
4024
|
-
children: [/*#__PURE__*/jsx(CSSTransition, _objectSpread(_objectSpread({}, sharedProps), {}, {
|
|
4025
|
-
timeout: isAnimationEnabled ? animation.overlay.duration : 0,
|
|
4026
|
-
classNames: opacityClassNames$3,
|
|
4027
|
-
children: /*#__PURE__*/jsx(Overlay, {
|
|
4028
|
-
onPress: onClose
|
|
4029
|
-
})
|
|
4030
|
-
})), /*#__PURE__*/jsx(CSSTransition, _objectSpread(_objectSpread({}, sharedProps), {}, {
|
|
4031
|
-
timeout: isAnimationEnabled ? animation.content.duration : 0,
|
|
4032
|
-
classNames: contentAnimationClassNames$2,
|
|
4033
|
-
onEnter: onEnter,
|
|
4034
|
-
onEntered: onEntered,
|
|
4035
|
-
onExit: onExit,
|
|
4036
|
-
onExited: onExited,
|
|
4037
|
-
children: /*#__PURE__*/jsx(CardModalRotationContainer, {
|
|
4038
|
-
alignItems: "center",
|
|
4039
|
-
margin: "auto",
|
|
4040
|
-
children: children
|
|
4041
|
-
})
|
|
4042
|
-
}))]
|
|
4043
|
-
}));
|
|
4044
|
-
}
|
|
4045
|
-
|
|
4046
|
-
var _excluded$V = ["children", "visible", "onClose", "onExited"];
|
|
4047
|
-
function CardModalBehaviour(_ref) {
|
|
4048
|
-
var children = _ref.children,
|
|
4049
|
-
visible = _ref.visible,
|
|
4050
|
-
onClose = _ref.onClose,
|
|
4051
|
-
onExited = _ref.onExited,
|
|
4052
|
-
props = _objectWithoutProperties(_ref, _excluded$V);
|
|
4053
|
-
var _useState = useState(visible),
|
|
4054
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
4055
|
-
isModalBehaviourVisible = _useState2[0],
|
|
4056
|
-
setIsModalBehaviourVisible = _useState2[1];
|
|
4057
|
-
useEffect(function () {
|
|
4058
|
-
if (visible === true) {
|
|
4059
|
-
setIsModalBehaviourVisible(true);
|
|
4060
|
-
}
|
|
4061
|
-
}, [visible]);
|
|
4062
|
-
return /*#__PURE__*/jsx(ModalBehaviour, {
|
|
4063
|
-
visible: isModalBehaviourVisible,
|
|
4064
|
-
onClose: onClose,
|
|
4065
|
-
children: /*#__PURE__*/jsx(CardModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
4066
|
-
visible: visible,
|
|
4067
|
-
onExited: function handleExitAnimationDone() {
|
|
4068
|
-
if (onExited) onExited();
|
|
4069
|
-
setIsModalBehaviourVisible(false);
|
|
4070
|
-
},
|
|
4071
|
-
onClose: onClose,
|
|
4072
|
-
children: children
|
|
4073
|
-
}))
|
|
4074
|
-
});
|
|
4075
|
-
}
|
|
4076
|
-
|
|
4077
|
-
var _excluded$U = ["children", "paddingX", "paddingY"];
|
|
4078
|
-
function CardModalBody(_ref) {
|
|
4079
|
-
var children = _ref.children,
|
|
4080
|
-
_ref$paddingX = _ref.paddingX,
|
|
4081
|
-
paddingX = _ref$paddingX === void 0 ? {
|
|
4082
|
-
base: 'kitt.4',
|
|
4083
|
-
medium: 'kitt.6'
|
|
4084
|
-
} : _ref$paddingX,
|
|
4085
|
-
_ref$paddingY = _ref.paddingY,
|
|
4086
|
-
paddingY = _ref$paddingY === void 0 ? 'kitt.4' : _ref$paddingY,
|
|
4087
|
-
props = _objectWithoutProperties(_ref, _excluded$U);
|
|
4088
|
-
return /*#__PURE__*/jsx(ScrollView, _objectSpread(_objectSpread({
|
|
4089
|
-
showsVerticalScrollIndicator: false,
|
|
4090
|
-
_contentContainerStyle: {
|
|
4091
|
-
paddingX: paddingX,
|
|
4092
|
-
paddingY: paddingY
|
|
4093
|
-
}
|
|
4094
|
-
}, props), {}, {
|
|
4095
|
-
children: children
|
|
4096
|
-
}));
|
|
4097
|
-
}
|
|
4098
|
-
|
|
4099
|
-
var _excluded$T = ["children", "padding", "hasSeparator"];
|
|
4100
|
-
function CardModalFooter(_ref) {
|
|
4101
|
-
var children = _ref.children,
|
|
4102
|
-
_ref$padding = _ref.padding,
|
|
4103
|
-
padding = _ref$padding === void 0 ? {
|
|
4104
|
-
base: 'kitt.4',
|
|
4105
|
-
medium: 'kitt.2'
|
|
4106
|
-
} : _ref$padding,
|
|
4107
|
-
_ref$hasSeparator = _ref.hasSeparator,
|
|
4108
|
-
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
|
|
4109
|
-
props = _objectWithoutProperties(_ref, _excluded$T);
|
|
4110
|
-
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
4111
|
-
marginTop: "kitt.2",
|
|
4112
|
-
padding: padding,
|
|
4113
|
-
borderTopWidth: hasSeparator ? 'kitt.cardModal.footer.borderWidth' : 0,
|
|
4114
|
-
borderColor: "kitt.separator",
|
|
4115
|
-
alignItems: {
|
|
4116
|
-
base: undefined,
|
|
4117
|
-
medium: 'flex-end'
|
|
4118
|
-
},
|
|
4119
|
-
children: children
|
|
4120
|
-
}));
|
|
4121
|
-
}
|
|
4122
|
-
|
|
4123
|
-
var _excluded$S = ["children", "title", "paddingBottom", "hasSeparator", "right", "left"];
|
|
4124
|
-
function CardModalHeader(_ref) {
|
|
4125
|
-
var children = _ref.children,
|
|
4126
|
-
title = _ref.title,
|
|
4127
|
-
_ref$paddingBottom = _ref.paddingBottom,
|
|
4128
|
-
paddingBottom = _ref$paddingBottom === void 0 ? {
|
|
4129
|
-
base: 'kitt.4',
|
|
4130
|
-
medium: 'kitt.2'
|
|
4131
|
-
} : _ref$paddingBottom,
|
|
4132
|
-
_ref$hasSeparator = _ref.hasSeparator,
|
|
4133
|
-
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
|
|
4134
|
-
right = _ref.right,
|
|
4135
|
-
left = _ref.left,
|
|
4136
|
-
props = _objectWithoutProperties(_ref, _excluded$S);
|
|
4137
|
-
var defaultContainerPadding = {
|
|
4138
|
-
base: 'kitt.4',
|
|
4139
|
-
medium: 'kitt.6'
|
|
4140
|
-
};
|
|
4141
|
-
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
4142
|
-
padding: paddingBottom,
|
|
4143
|
-
borderBottomWidth: hasSeparator ? 'kitt.cardModal.footer.borderWidth' : 0,
|
|
4144
|
-
borderColor: "kitt.separator",
|
|
4145
|
-
justifyContent: "center",
|
|
4146
|
-
width: "100%",
|
|
4147
|
-
height: "kitt.cardModal.header.height",
|
|
4148
|
-
paddingRight: right ? 'kitt.2' : defaultContainerPadding,
|
|
4149
|
-
paddingLeft: left ? 'kitt.2' : defaultContainerPadding,
|
|
4150
|
-
children: /*#__PURE__*/jsxs(View, {
|
|
4151
|
-
alignItems: "center",
|
|
4152
|
-
flexDirection: "row",
|
|
4153
|
-
justifyContent: !children && !left ? 'flex-end' : 'space-between',
|
|
4154
|
-
children: [left ? /*#__PURE__*/jsx(View, {
|
|
4155
|
-
width: "kitt.iconButton.width",
|
|
4156
|
-
children: left
|
|
4157
|
-
}) : null, /*#__PURE__*/jsxs(View, {
|
|
4158
|
-
flexGrow: "1",
|
|
4159
|
-
paddingRight: right ? 'kitt.2' : 0,
|
|
4160
|
-
paddingLeft: left ? 'kitt.2' : 0,
|
|
4161
|
-
children: [title ? /*#__PURE__*/jsx(Typography.Text, {
|
|
4162
|
-
textAlign: !left && right ? 'left' : 'center',
|
|
4163
|
-
variant: "bold",
|
|
4164
|
-
children: title
|
|
4165
|
-
}) : null, children]
|
|
4166
|
-
}), right ? /*#__PURE__*/jsx(View, {
|
|
4167
|
-
width: "kitt.iconButton.width",
|
|
4168
|
-
children: right
|
|
4169
|
-
}) : null]
|
|
4170
|
-
})
|
|
4171
|
-
}));
|
|
4172
|
-
}
|
|
4173
|
-
|
|
4174
|
-
var _excluded$R = ["backgroundColor", "maxWidth", "withoutShadow", "children", "header", "body", "footer", "contentContainer"];
|
|
4175
|
-
function CardModal(_ref) {
|
|
4176
|
-
var _ref$backgroundColor = _ref.backgroundColor,
|
|
4177
|
-
backgroundColor = _ref$backgroundColor === void 0 ? 'kitt.uiBackgroundLight' : _ref$backgroundColor,
|
|
4178
|
-
_ref$maxWidth = _ref.maxWidth,
|
|
4179
|
-
maxWidth = _ref$maxWidth === void 0 ? 'kitt.cardModal.maxWidth' : _ref$maxWidth,
|
|
4180
|
-
withoutShadow = _ref.withoutShadow,
|
|
4181
|
-
children = _ref.children,
|
|
4182
|
-
header = _ref.header,
|
|
4183
|
-
body = _ref.body,
|
|
4184
|
-
footer = _ref.footer,
|
|
4185
|
-
_ref$contentContainer = _ref.contentContainer,
|
|
4186
|
-
ContentContainer = _ref$contentContainer === void 0 ? IdentityComponent : _ref$contentContainer,
|
|
4187
|
-
props = _objectWithoutProperties(_ref, _excluded$R);
|
|
4188
|
-
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
4189
|
-
overflow: "hidden",
|
|
4190
|
-
backgroundColor: backgroundColor,
|
|
4191
|
-
shadow: withoutShadow ? undefined : 'kitt.cardModal.shadow',
|
|
4192
|
-
borderRadius: "kitt.cardModal.borderRadius",
|
|
4193
|
-
width: "100%",
|
|
4194
|
-
maxHeight: "100%",
|
|
4195
|
-
maxWidth: maxWidth,
|
|
4196
|
-
minHeight: "kitt.cardModal.minHeight",
|
|
4197
|
-
children: /*#__PURE__*/jsx(ContentContainer, {
|
|
4198
|
-
children: children || /*#__PURE__*/jsxs(Fragment, {
|
|
4199
|
-
children: [header || null, body || null, footer || null]
|
|
4200
|
-
})
|
|
4201
|
-
})
|
|
4202
|
-
}));
|
|
4203
|
-
}
|
|
4204
|
-
CardModal.Body = CardModalBody;
|
|
4205
|
-
CardModal.Header = CardModalHeader;
|
|
4206
|
-
CardModal.Footer = CardModalFooter;
|
|
4207
|
-
CardModal.ModalBehaviour = CardModalBehaviour;
|
|
4208
|
-
|
|
4209
|
-
function CardModal2RotationContainer(props) {
|
|
4210
|
-
return /*#__PURE__*/jsx(View, _objectSpread({
|
|
4211
|
-
paddingX: "kitt.cardModal.overlayPadding.horizontal",
|
|
4212
|
-
paddingY: "kitt.cardModal.overlayPadding.vertical",
|
|
4213
|
-
maxWidth: "kitt.cardModal.maxWidthWithPadding",
|
|
4214
|
-
width: "100%",
|
|
4215
|
-
maxHeight: "100%",
|
|
4216
|
-
_web: {
|
|
4217
|
-
maxHeight: '100svh'
|
|
4218
|
-
}
|
|
4219
|
-
}, props));
|
|
4220
|
-
}
|
|
4221
|
-
|
|
4222
|
-
var _excluded$Q = ["children", "appear", "visible", "unmountOnExit", "isAnimationEnabled", "onEnter", "onEntered", "onExit", "onExited", "onClose"];
|
|
4223
|
-
var contentAnimationEnter$1 = "kitt-u_contentAnimationEnter_c1qvsvvv";
|
|
4224
|
-
var contentAnimatioEnterActive$1 = "kitt-u_contentAnimatioEnterActive_c1ka3ql7";
|
|
4225
|
-
var contentAnimatioExit$1 = "kitt-u_contentAnimatioExit_cn78c68";
|
|
4226
|
-
var contentAnimatioExitActive$1 = "kitt-u_contentAnimatioExitActive_c14lwu6p";
|
|
3957
|
+
var _excluded$L = ["children", "appear", "visible", "unmountOnExit", "isAnimationEnabled", "onEnter", "onEntered", "onExit", "onExited", "onClose"];
|
|
3958
|
+
var contentAnimationEnter$1 = "kitt-u_contentAnimationEnter_c11xxy4r";
|
|
3959
|
+
var contentAnimatioEnterActive$1 = "kitt-u_contentAnimatioEnterActive_cl52117";
|
|
3960
|
+
var contentAnimatioExit$1 = "kitt-u_contentAnimatioExit_cyjczep";
|
|
3961
|
+
var contentAnimatioExitActive$1 = "kitt-u_contentAnimatioExitActive_cpsy3dt";
|
|
4227
3962
|
var contentAnimationClassNames$1 = {
|
|
4228
3963
|
appear: contentAnimationEnter$1,
|
|
4229
3964
|
appearActive: contentAnimatioEnterActive$1,
|
|
@@ -4232,10 +3967,10 @@ var contentAnimationClassNames$1 = {
|
|
|
4232
3967
|
exit: contentAnimatioExit$1,
|
|
4233
3968
|
exitActive: contentAnimatioExitActive$1
|
|
4234
3969
|
};
|
|
4235
|
-
var opacityEnter$2 = "kitt-
|
|
4236
|
-
var opacityEnterActive$2 = "kitt-
|
|
4237
|
-
var opacityExit$2 = "kitt-
|
|
4238
|
-
var opacityExitActive$2 = "kitt-
|
|
3970
|
+
var opacityEnter$2 = "kitt-u_opacityEnter_o1ae40dx";
|
|
3971
|
+
var opacityEnterActive$2 = "kitt-u_opacityEnterActive_o1t4vl7b";
|
|
3972
|
+
var opacityExit$2 = "kitt-u_opacityExit_ogyytm1";
|
|
3973
|
+
var opacityExitActive$2 = "kitt-u_opacityExitActive_o18xvk52";
|
|
4239
3974
|
var opacityClassNames$2 = {
|
|
4240
3975
|
appear: opacityEnter$2,
|
|
4241
3976
|
appearActive: opacityEnterActive$2,
|
|
@@ -4244,7 +3979,7 @@ var opacityClassNames$2 = {
|
|
|
4244
3979
|
exit: opacityExit$2,
|
|
4245
3980
|
exitActive: opacityExitActive$2
|
|
4246
3981
|
};
|
|
4247
|
-
function
|
|
3982
|
+
function CardModalAnimation(_ref) {
|
|
4248
3983
|
var children = _ref.children,
|
|
4249
3984
|
_ref$appear = _ref.appear,
|
|
4250
3985
|
appear = _ref$appear === void 0 ? true : _ref$appear,
|
|
@@ -4258,7 +3993,7 @@ function CardModal2Animation(_ref) {
|
|
|
4258
3993
|
onExit = _ref.onExit,
|
|
4259
3994
|
onExited = _ref.onExited,
|
|
4260
3995
|
onClose = _ref.onClose,
|
|
4261
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3996
|
+
props = _objectWithoutProperties(_ref, _excluded$L);
|
|
4262
3997
|
var theme = useTheme();
|
|
4263
3998
|
var animation = theme.kitt.cardModal.animation;
|
|
4264
3999
|
var sharedProps = {
|
|
@@ -4282,7 +4017,7 @@ function CardModal2Animation(_ref) {
|
|
|
4282
4017
|
onEntered: onEntered,
|
|
4283
4018
|
onExit: onExit,
|
|
4284
4019
|
onExited: onExited,
|
|
4285
|
-
children: /*#__PURE__*/jsx(
|
|
4020
|
+
children: /*#__PURE__*/jsx(CardModalRotationContainer, {
|
|
4286
4021
|
alignItems: "center",
|
|
4287
4022
|
margin: "auto",
|
|
4288
4023
|
children: children
|
|
@@ -4291,13 +4026,13 @@ function CardModal2Animation(_ref) {
|
|
|
4291
4026
|
}));
|
|
4292
4027
|
}
|
|
4293
4028
|
|
|
4294
|
-
var _excluded$
|
|
4295
|
-
function
|
|
4029
|
+
var _excluded$K = ["children", "visible", "onClose", "onExited"];
|
|
4030
|
+
function CardModalBehaviour(_ref) {
|
|
4296
4031
|
var children = _ref.children,
|
|
4297
4032
|
visible = _ref.visible,
|
|
4298
4033
|
onClose = _ref.onClose,
|
|
4299
4034
|
onExited = _ref.onExited,
|
|
4300
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4035
|
+
props = _objectWithoutProperties(_ref, _excluded$K);
|
|
4301
4036
|
var _useState = useState(visible),
|
|
4302
4037
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4303
4038
|
isModalBehaviourVisible = _useState2[0],
|
|
@@ -4310,7 +4045,7 @@ function CardModal2Behaviour(_ref) {
|
|
|
4310
4045
|
return /*#__PURE__*/jsx(ModalBehaviour, {
|
|
4311
4046
|
visible: isModalBehaviourVisible,
|
|
4312
4047
|
onClose: onClose,
|
|
4313
|
-
children: /*#__PURE__*/jsx(
|
|
4048
|
+
children: /*#__PURE__*/jsx(CardModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
4314
4049
|
visible: visible,
|
|
4315
4050
|
onExited: function handleExitAnimationDone() {
|
|
4316
4051
|
if (onExited) onExited();
|
|
@@ -4322,8 +4057,8 @@ function CardModal2Behaviour(_ref) {
|
|
|
4322
4057
|
});
|
|
4323
4058
|
}
|
|
4324
4059
|
|
|
4325
|
-
var _excluded$
|
|
4326
|
-
function
|
|
4060
|
+
var _excluded$J = ["children", "paddingX", "paddingY"];
|
|
4061
|
+
function CardModalBody(_ref) {
|
|
4327
4062
|
var children = _ref.children,
|
|
4328
4063
|
_ref$paddingX = _ref.paddingX,
|
|
4329
4064
|
paddingX = _ref$paddingX === void 0 ? {
|
|
@@ -4332,7 +4067,7 @@ function CardModal2Body(_ref) {
|
|
|
4332
4067
|
} : _ref$paddingX,
|
|
4333
4068
|
_ref$paddingY = _ref.paddingY,
|
|
4334
4069
|
paddingY = _ref$paddingY === void 0 ? 'kitt.4' : _ref$paddingY,
|
|
4335
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4070
|
+
props = _objectWithoutProperties(_ref, _excluded$J);
|
|
4336
4071
|
return /*#__PURE__*/jsx(ScrollView, _objectSpread(_objectSpread({
|
|
4337
4072
|
showsVerticalScrollIndicator: false,
|
|
4338
4073
|
_contentContainerStyle: {
|
|
@@ -4344,8 +4079,8 @@ function CardModal2Body(_ref) {
|
|
|
4344
4079
|
}));
|
|
4345
4080
|
}
|
|
4346
4081
|
|
|
4347
|
-
var _excluded$
|
|
4348
|
-
function
|
|
4082
|
+
var _excluded$I = ["children", "padding", "hasSeparator"];
|
|
4083
|
+
function CardModalFooter(_ref) {
|
|
4349
4084
|
var children = _ref.children,
|
|
4350
4085
|
_ref$padding = _ref.padding,
|
|
4351
4086
|
padding = _ref$padding === void 0 ? {
|
|
@@ -4354,7 +4089,7 @@ function CardModal2Footer(_ref) {
|
|
|
4354
4089
|
} : _ref$padding,
|
|
4355
4090
|
_ref$hasSeparator = _ref.hasSeparator,
|
|
4356
4091
|
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
|
|
4357
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4092
|
+
props = _objectWithoutProperties(_ref, _excluded$I);
|
|
4358
4093
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
4359
4094
|
marginTop: "kitt.2",
|
|
4360
4095
|
padding: padding,
|
|
@@ -4368,8 +4103,8 @@ function CardModal2Footer(_ref) {
|
|
|
4368
4103
|
}));
|
|
4369
4104
|
}
|
|
4370
4105
|
|
|
4371
|
-
var _excluded$
|
|
4372
|
-
function
|
|
4106
|
+
var _excluded$H = ["children", "title", "paddingBottom", "hasSeparator", "right", "left"];
|
|
4107
|
+
function CardModalHeader(_ref) {
|
|
4373
4108
|
var children = _ref.children,
|
|
4374
4109
|
title = _ref.title,
|
|
4375
4110
|
_ref$paddingBottom = _ref.paddingBottom,
|
|
@@ -4381,7 +4116,7 @@ function CardModal2Header(_ref) {
|
|
|
4381
4116
|
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
|
|
4382
4117
|
right = _ref.right,
|
|
4383
4118
|
left = _ref.left,
|
|
4384
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4119
|
+
props = _objectWithoutProperties(_ref, _excluded$H);
|
|
4385
4120
|
var defaultContainerPadding = {
|
|
4386
4121
|
base: 'kitt.4',
|
|
4387
4122
|
medium: 'kitt.6'
|
|
@@ -4419,15 +4154,18 @@ function CardModal2Header(_ref) {
|
|
|
4419
4154
|
}));
|
|
4420
4155
|
}
|
|
4421
4156
|
|
|
4422
|
-
var _excluded$
|
|
4423
|
-
function
|
|
4157
|
+
var _excluded$G = ["backgroundColor", "maxWidth", "withoutShadow", "children", "header", "body", "footer"];
|
|
4158
|
+
function CardModal(_ref) {
|
|
4424
4159
|
var _ref$backgroundColor = _ref.backgroundColor,
|
|
4425
4160
|
backgroundColor = _ref$backgroundColor === void 0 ? 'kitt.uiBackgroundLight' : _ref$backgroundColor,
|
|
4426
4161
|
_ref$maxWidth = _ref.maxWidth,
|
|
4427
4162
|
maxWidth = _ref$maxWidth === void 0 ? 'kitt.cardModal.maxWidth' : _ref$maxWidth,
|
|
4428
4163
|
withoutShadow = _ref.withoutShadow,
|
|
4429
4164
|
children = _ref.children,
|
|
4430
|
-
|
|
4165
|
+
header = _ref.header,
|
|
4166
|
+
body = _ref.body,
|
|
4167
|
+
footer = _ref.footer,
|
|
4168
|
+
props = _objectWithoutProperties(_ref, _excluded$G);
|
|
4431
4169
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
4432
4170
|
overflow: "hidden",
|
|
4433
4171
|
backgroundColor: backgroundColor,
|
|
@@ -4437,13 +4175,15 @@ function CardModal2(_ref) {
|
|
|
4437
4175
|
maxHeight: "100%",
|
|
4438
4176
|
maxWidth: maxWidth,
|
|
4439
4177
|
minHeight: "kitt.cardModal.minHeight",
|
|
4440
|
-
children: children
|
|
4178
|
+
children: children || /*#__PURE__*/jsxs(Fragment, {
|
|
4179
|
+
children: [header || null, body || null, footer || null]
|
|
4180
|
+
})
|
|
4441
4181
|
}));
|
|
4442
4182
|
}
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4183
|
+
CardModal.Body = CardModalBody;
|
|
4184
|
+
CardModal.Header = CardModalHeader;
|
|
4185
|
+
CardModal.Footer = CardModalFooter;
|
|
4186
|
+
CardModal.ModalBehaviour = CardModalBehaviour;
|
|
4447
4187
|
|
|
4448
4188
|
function getBackgroundColor$6(_ref) {
|
|
4449
4189
|
var isDisabled = _ref.isDisabled,
|
|
@@ -4621,11 +4361,11 @@ function ChoiceItemContainer(_ref) {
|
|
|
4621
4361
|
}));
|
|
4622
4362
|
}
|
|
4623
4363
|
|
|
4624
|
-
var _excluded$
|
|
4364
|
+
var _excluded$F = ["direction", "contentContainerStyle"];
|
|
4625
4365
|
function ChoicesContainer(_ref) {
|
|
4626
4366
|
var direction = _ref.direction,
|
|
4627
4367
|
contentContainerStyle = _ref.contentContainerStyle,
|
|
4628
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4368
|
+
props = _objectWithoutProperties(_ref, _excluded$F);
|
|
4629
4369
|
if (direction === 'row') {
|
|
4630
4370
|
return /*#__PURE__*/jsx(ScrollView$2, _objectSpread({
|
|
4631
4371
|
horizontal: true,
|
|
@@ -4702,7 +4442,7 @@ var ChoicesElements = {
|
|
|
4702
4442
|
ButtonChoices: ButtonChoices
|
|
4703
4443
|
};
|
|
4704
4444
|
|
|
4705
|
-
var _excluded$
|
|
4445
|
+
var _excluded$E = ["children", "appear", "visible", "unmountOnExit", "isAnimationEnabled", "onEnter", "onEntered", "onExit", "onExited", "onClose"];
|
|
4706
4446
|
var contentAnimationEnter = "kitt-u_contentAnimationEnter_c1i0gle8";
|
|
4707
4447
|
var contentAnimatioEnterActive = "kitt-u_contentAnimatioEnterActive_c1jmfkjw";
|
|
4708
4448
|
var contentAnimatioExit = "kitt-u_contentAnimatioExit_cwjstxl";
|
|
@@ -4741,7 +4481,7 @@ function DialogModalAnimation(_ref) {
|
|
|
4741
4481
|
onExit = _ref.onExit,
|
|
4742
4482
|
onExited = _ref.onExited,
|
|
4743
4483
|
onClose = _ref.onClose,
|
|
4744
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4484
|
+
props = _objectWithoutProperties(_ref, _excluded$E);
|
|
4745
4485
|
var theme = useTheme();
|
|
4746
4486
|
var animation = theme.kitt.dialogModal.animation;
|
|
4747
4487
|
var sharedProps = {
|
|
@@ -4776,13 +4516,13 @@ function DialogModalAnimation(_ref) {
|
|
|
4776
4516
|
}));
|
|
4777
4517
|
}
|
|
4778
4518
|
|
|
4779
|
-
var _excluded$
|
|
4519
|
+
var _excluded$D = ["children", "visible", "onClose", "onExited"];
|
|
4780
4520
|
function DialogModalBehaviour(_ref) {
|
|
4781
4521
|
var children = _ref.children,
|
|
4782
4522
|
visible = _ref.visible,
|
|
4783
4523
|
onClose = _ref.onClose,
|
|
4784
4524
|
onExited = _ref.onExited,
|
|
4785
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4525
|
+
props = _objectWithoutProperties(_ref, _excluded$D);
|
|
4786
4526
|
var _useState = useState(visible),
|
|
4787
4527
|
_useState2 = _slicedToArray(_useState, 2),
|
|
4788
4528
|
isModalBehaviourVisible = _useState2[0],
|
|
@@ -4813,7 +4553,7 @@ function DialogModalBehaviour(_ref) {
|
|
|
4813
4553
|
});
|
|
4814
4554
|
}
|
|
4815
4555
|
|
|
4816
|
-
var _excluded$
|
|
4556
|
+
var _excluded$C = ["stretch"];
|
|
4817
4557
|
function DialogModal(_ref) {
|
|
4818
4558
|
var illustration = _ref.illustration,
|
|
4819
4559
|
title = _ref.title,
|
|
@@ -4853,7 +4593,7 @@ DialogModal.ModalBehaviour = DialogModalBehaviour;
|
|
|
4853
4593
|
function DialogModalButton(_ref2) {
|
|
4854
4594
|
var _ref2$stretch = _ref2.stretch,
|
|
4855
4595
|
stretch = _ref2$stretch === void 0 ? true : _ref2$stretch,
|
|
4856
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
4596
|
+
props = _objectWithoutProperties(_ref2, _excluded$C);
|
|
4857
4597
|
return /*#__PURE__*/jsx(Actions.Button, _objectSpread({
|
|
4858
4598
|
stretch: stretch
|
|
4859
4599
|
}, props));
|
|
@@ -4890,7 +4630,7 @@ function Emoji(_ref) {
|
|
|
4890
4630
|
});
|
|
4891
4631
|
}
|
|
4892
4632
|
|
|
4893
|
-
var _excluded$
|
|
4633
|
+
var _excluded$B = ["as", "appScheme", "appValue", "onPress", "onOpenAppError"],
|
|
4894
4634
|
_excluded2$5 = ["phoneNumber", "children"],
|
|
4895
4635
|
_excluded3$4 = ["phoneNumber", "children"],
|
|
4896
4636
|
_excluded4$3 = ["emailAddress", "children"];
|
|
@@ -4900,7 +4640,7 @@ function ExternalAppLink(_ref) {
|
|
|
4900
4640
|
appValue = _ref.appValue,
|
|
4901
4641
|
onPress = _ref.onPress,
|
|
4902
4642
|
onOpenAppError = _ref.onOpenAppError,
|
|
4903
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
4643
|
+
rest = _objectWithoutProperties(_ref, _excluded$B);
|
|
4904
4644
|
var href = "".concat(appScheme, ":").concat(appValue);
|
|
4905
4645
|
var handleOnPress = /*#__PURE__*/function () {
|
|
4906
4646
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
|
|
@@ -4995,14 +4735,14 @@ var defaultOpenLinkBehavior = {
|
|
|
4995
4735
|
web: 'targetBlank'
|
|
4996
4736
|
};
|
|
4997
4737
|
|
|
4998
|
-
var _excluded$
|
|
4738
|
+
var _excluded$A = ["as", "href", "openLinkBehavior", "onPress"];
|
|
4999
4739
|
function ExternalLink(_ref) {
|
|
5000
4740
|
var Component = _ref.as,
|
|
5001
4741
|
href = _ref.href,
|
|
5002
4742
|
_ref$openLinkBehavior = _ref.openLinkBehavior,
|
|
5003
4743
|
openLinkBehavior = _ref$openLinkBehavior === void 0 ? defaultOpenLinkBehavior : _ref$openLinkBehavior,
|
|
5004
4744
|
onPress = _ref.onPress,
|
|
5005
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
4745
|
+
rest = _objectWithoutProperties(_ref, _excluded$A);
|
|
5006
4746
|
return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({}, rest), {}, {
|
|
5007
4747
|
accessibilityRole: "link",
|
|
5008
4748
|
href: href,
|
|
@@ -5078,7 +4818,7 @@ function InputTextContainer(props) {
|
|
|
5078
4818
|
}, props));
|
|
5079
4819
|
}
|
|
5080
4820
|
|
|
5081
|
-
var _excluded$
|
|
4821
|
+
var _excluded$z = ["id", "right", "state", "variant", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoComplete", "inputMode", "multiline", "height", "onSubmitEditing"];
|
|
5082
4822
|
var InputText = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
5083
4823
|
var id = _ref.id,
|
|
5084
4824
|
right = _ref.right;
|
|
@@ -5099,7 +4839,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5099
4839
|
multiline = _ref.multiline,
|
|
5100
4840
|
height = _ref.height,
|
|
5101
4841
|
onSubmitEditing = _ref.onSubmitEditing,
|
|
5102
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4842
|
+
props = _objectWithoutProperties(_ref, _excluded$z);
|
|
5103
4843
|
var theme = useTheme();
|
|
5104
4844
|
var fontSizeForNativeBase = createNativeBaseFontSize({
|
|
5105
4845
|
base: 'body'
|
|
@@ -5223,10 +4963,10 @@ function AutocompleteItemsListContainer(_ref) {
|
|
|
5223
4963
|
});
|
|
5224
4964
|
}
|
|
5225
4965
|
|
|
5226
|
-
var _excluded$
|
|
4966
|
+
var _excluded$y = ["children"];
|
|
5227
4967
|
function AutocompleteOption(_ref) {
|
|
5228
4968
|
var children = _ref.children,
|
|
5229
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4969
|
+
props = _objectWithoutProperties(_ref, _excluded$y);
|
|
5230
4970
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
5231
4971
|
paddingX: {
|
|
5232
4972
|
base: 'kitt.2',
|
|
@@ -5238,7 +4978,7 @@ function AutocompleteOption(_ref) {
|
|
|
5238
4978
|
}));
|
|
5239
4979
|
}
|
|
5240
4980
|
|
|
5241
|
-
var _excluded$
|
|
4981
|
+
var _excluded$x = ["children", "name", "disabled", "placeholder", "isInitialOpen", "initialValue", "containerProps", "filterItemBasedOnCurrentInputValue", "checkSelectedItem", "itemToString", "right", "onChange", "onFocus", "onBlur", "onInputChange", "onSelectItem", "onOuterPress", "errorElement", "emptyResultsElement", "inputTestID", "listContainerTestID", "zIndex", "maxItemContainerHeight"],
|
|
5242
4982
|
_excluded2$4 = ["onClick", "onPress"],
|
|
5243
4983
|
_excluded3$3 = ["onKeyDown", "onFocus", "onBlur", "onChange"],
|
|
5244
4984
|
_excluded4$2 = ["onClick", "onPress", "role", "aria-selected"];
|
|
@@ -5272,7 +5012,7 @@ function Autocomplete(_ref) {
|
|
|
5272
5012
|
_ref$zIndex = _ref.zIndex,
|
|
5273
5013
|
zIndex = _ref$zIndex === void 0 ? 1000 : _ref$zIndex,
|
|
5274
5014
|
maxItemContainerHeight = _ref.maxItemContainerHeight,
|
|
5275
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5015
|
+
props = _objectWithoutProperties(_ref, _excluded$x);
|
|
5276
5016
|
var childrenArray = Children.toArray(_children);
|
|
5277
5017
|
var items = childrenArray.filter(isReactElement).map(function (child) {
|
|
5278
5018
|
return {
|
|
@@ -5479,7 +5219,7 @@ function getBorderColor$1(_ref) {
|
|
|
5479
5219
|
return 'kitt.forms.checkbox.default.borderColor';
|
|
5480
5220
|
}
|
|
5481
5221
|
|
|
5482
|
-
var _excluded$
|
|
5222
|
+
var _excluded$w = ["checked", "hitSlop", "children", "disabled", "onChange", "onBlur", "onFocus"];
|
|
5483
5223
|
var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
5484
5224
|
var checked = _ref.checked,
|
|
5485
5225
|
_ref$hitSlop = _ref.hitSlop,
|
|
@@ -5489,7 +5229,7 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5489
5229
|
onChange = _ref.onChange,
|
|
5490
5230
|
onBlur = _ref.onBlur,
|
|
5491
5231
|
onFocus = _ref.onFocus,
|
|
5492
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5232
|
+
props = _objectWithoutProperties(_ref, _excluded$w);
|
|
5493
5233
|
var theme = useTheme();
|
|
5494
5234
|
return /*#__PURE__*/jsx(Pressable, _objectSpread(_objectSpread({
|
|
5495
5235
|
hitSlop: hitSlop
|
|
@@ -5805,7 +5545,7 @@ function PartContainer(_ref) {
|
|
|
5805
5545
|
});
|
|
5806
5546
|
}
|
|
5807
5547
|
|
|
5808
|
-
var _excluded$
|
|
5548
|
+
var _excluded$v = ["id", "value", "testID", "stretch", "placeholder", "minDate", "maxDate", "disabled", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "enterKeyHint", "onChange", "onBlur", "onFocus", "onSubmitEditing"];
|
|
5809
5549
|
var KeyboardDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
5810
5550
|
var id = _ref.id,
|
|
5811
5551
|
value = _ref.value,
|
|
@@ -5823,7 +5563,7 @@ var KeyboardDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5823
5563
|
onBlur = _ref.onBlur,
|
|
5824
5564
|
onFocus = _ref.onFocus,
|
|
5825
5565
|
onSubmitEditing = _ref.onSubmitEditing;
|
|
5826
|
-
_objectWithoutProperties(_ref, _excluded$
|
|
5566
|
+
_objectWithoutProperties(_ref, _excluded$v);
|
|
5827
5567
|
var monthRef = useRef(null);
|
|
5828
5568
|
var yearRef = useRef(null);
|
|
5829
5569
|
var defaultValue = value;
|
|
@@ -5963,10 +5703,10 @@ var KeyboardDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5963
5703
|
});
|
|
5964
5704
|
});
|
|
5965
5705
|
|
|
5966
|
-
var _excluded$
|
|
5706
|
+
var _excluded$u = ["value"];
|
|
5967
5707
|
var DatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
5968
5708
|
var value = _ref.value,
|
|
5969
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5709
|
+
props = _objectWithoutProperties(_ref, _excluded$u);
|
|
5970
5710
|
// in apps, final-form can give a string value that will break the component
|
|
5971
5711
|
var currentValue = value || undefined;
|
|
5972
5712
|
return /*#__PURE__*/jsx(KeyboardDatePicker, _objectSpread(_objectSpread({
|
|
@@ -6551,7 +6291,7 @@ function formatInitialValueToAutocompletePrediction(address, placeId) {
|
|
|
6551
6291
|
};
|
|
6552
6292
|
}
|
|
6553
6293
|
|
|
6554
|
-
var _excluded$
|
|
6294
|
+
var _excluded$t = ["initialValue", "itemToString", "errorElement", "emptyResultsElement", "onChange"];
|
|
6555
6295
|
function InputAddress(_ref) {
|
|
6556
6296
|
var initialValue = _ref.initialValue,
|
|
6557
6297
|
_ref$itemToString = _ref.itemToString,
|
|
@@ -6559,7 +6299,7 @@ function InputAddress(_ref) {
|
|
|
6559
6299
|
errorElement = _ref.errorElement,
|
|
6560
6300
|
emptyResultsElement = _ref.emptyResultsElement,
|
|
6561
6301
|
_onChange = _ref.onChange,
|
|
6562
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6302
|
+
props = _objectWithoutProperties(_ref, _excluded$t);
|
|
6563
6303
|
var _useGoogleMapsAutocom = useGoogleMapsAutocomplete(),
|
|
6564
6304
|
state = _useGoogleMapsAutocom.state,
|
|
6565
6305
|
_onInputChange = _useGoogleMapsAutocom.onInputChange,
|
|
@@ -6656,10 +6396,10 @@ var InputIban = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
6656
6396
|
}, props));
|
|
6657
6397
|
});
|
|
6658
6398
|
|
|
6659
|
-
var _excluded$
|
|
6399
|
+
var _excluded$s = ["onChange"];
|
|
6660
6400
|
var InputNumber = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
6661
6401
|
var onChange = _ref.onChange,
|
|
6662
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6402
|
+
props = _objectWithoutProperties(_ref, _excluded$s);
|
|
6663
6403
|
return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({
|
|
6664
6404
|
ref: ref
|
|
6665
6405
|
}, props), {}, {
|
|
@@ -6676,11 +6416,11 @@ var InputNumber = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6676
6416
|
}));
|
|
6677
6417
|
});
|
|
6678
6418
|
|
|
6679
|
-
var _excluded$
|
|
6419
|
+
var _excluded$r = ["isPasswordDefaultVisible", "right"];
|
|
6680
6420
|
var InputPassword = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
6681
6421
|
var isPasswordDefaultVisible = _ref.isPasswordDefaultVisible,
|
|
6682
6422
|
right = _ref.right,
|
|
6683
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6423
|
+
props = _objectWithoutProperties(_ref, _excluded$r);
|
|
6684
6424
|
var _useState = useState(Boolean(isPasswordDefaultVisible)),
|
|
6685
6425
|
_useState2 = _slicedToArray(_useState, 2),
|
|
6686
6426
|
isVisible = _useState2[0],
|
|
@@ -6708,7 +6448,7 @@ var InputPassword = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6708
6448
|
}));
|
|
6709
6449
|
});
|
|
6710
6450
|
|
|
6711
|
-
var _excluded$
|
|
6451
|
+
var _excluded$q = ["enterKeyHint", "autoComplete", "phoneNumberLength", "onChange"];
|
|
6712
6452
|
function isPhoneNumberValid(number) {
|
|
6713
6453
|
return isValidNumber(number);
|
|
6714
6454
|
}
|
|
@@ -6722,7 +6462,7 @@ var InputPhone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6722
6462
|
_ref$phoneNumberLengt = _ref.phoneNumberLength,
|
|
6723
6463
|
phoneNumberLength = _ref$phoneNumberLengt === void 0 ? 10 : _ref$phoneNumberLengt,
|
|
6724
6464
|
onChange = _ref.onChange,
|
|
6725
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6465
|
+
props = _objectWithoutProperties(_ref, _excluded$q);
|
|
6726
6466
|
var currentEnterKeyHint = enterKeyHint ? getEnterKeyHintForNumericInput(enterKeyHint) : undefined;
|
|
6727
6467
|
return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({
|
|
6728
6468
|
ref: ref
|
|
@@ -7156,7 +6896,7 @@ function RadioButton(_ref) {
|
|
|
7156
6896
|
});
|
|
7157
6897
|
}
|
|
7158
6898
|
|
|
7159
|
-
var _excluded$
|
|
6899
|
+
var _excluded$p = ["children", "stretch", "value", "disabled", "onFocus", "onBlur", "onChange"];
|
|
7160
6900
|
function RadioButtonGroupItem(_ref) {
|
|
7161
6901
|
var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
7162
6902
|
return /*#__PURE__*/jsx(RadioButton, _objectSpread({}, props));
|
|
@@ -7169,7 +6909,7 @@ function RadioButtonGroup(_ref2) {
|
|
|
7169
6909
|
onFocus = _ref2.onFocus,
|
|
7170
6910
|
onBlur = _ref2.onBlur,
|
|
7171
6911
|
onChange = _ref2.onChange,
|
|
7172
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
6912
|
+
props = _objectWithoutProperties(_ref2, _excluded$p);
|
|
7173
6913
|
var _useState = useState(value),
|
|
7174
6914
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7175
6915
|
currentValue = _useState2[0],
|
|
@@ -7201,12 +6941,12 @@ function RadioButtonGroup(_ref2) {
|
|
|
7201
6941
|
}
|
|
7202
6942
|
RadioButtonGroup.RadioButton = RadioButtonGroupItem;
|
|
7203
6943
|
|
|
7204
|
-
var _excluded$
|
|
6944
|
+
var _excluded$o = ["helper", "limit"];
|
|
7205
6945
|
var TextArea = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
7206
6946
|
var _props$value, _props$value2;
|
|
7207
6947
|
var helper = _ref.helper,
|
|
7208
6948
|
limit = _ref.limit,
|
|
7209
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6949
|
+
props = _objectWithoutProperties(_ref, _excluded$o);
|
|
7210
6950
|
var shouldDisplayLimit = limit && limit > 0;
|
|
7211
6951
|
var isLimitReached = ((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.length) === limit;
|
|
7212
6952
|
var limitContainerAnimatedStyle = useAnimatedStyle(function () {
|
|
@@ -7365,7 +7105,7 @@ function ToggleAnimated(_ref) {
|
|
|
7365
7105
|
});
|
|
7366
7106
|
}
|
|
7367
7107
|
|
|
7368
|
-
var _excluded$
|
|
7108
|
+
var _excluded$n = ["isDisabled", "isHoveredInternal", "isFocusedInternal", "isPressedInternal", "label", "variant", "size", "value", "onChange"];
|
|
7369
7109
|
var getLabelTypographyType = function (size) {
|
|
7370
7110
|
return size === 'medium' ? 'body' : 'body-medium';
|
|
7371
7111
|
};
|
|
@@ -7387,7 +7127,7 @@ function Toggle(_ref) {
|
|
|
7387
7127
|
value = _ref$value === void 0 ? false : _ref$value,
|
|
7388
7128
|
_ref$onChange = _ref.onChange,
|
|
7389
7129
|
onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
|
|
7390
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7130
|
+
props = _objectWithoutProperties(_ref, _excluded$n);
|
|
7391
7131
|
var theme = useKittTheme();
|
|
7392
7132
|
return /*#__PURE__*/jsxs(HStack, _objectSpread(_objectSpread({
|
|
7393
7133
|
alignItems: "center"
|
|
@@ -7426,13 +7166,13 @@ function Toggle(_ref) {
|
|
|
7426
7166
|
}));
|
|
7427
7167
|
}
|
|
7428
7168
|
|
|
7429
|
-
var _excluded$
|
|
7169
|
+
var _excluded$m = ["children", "shouldHandleBottomNotch", "style", "shouldHandleTopNotch"];
|
|
7430
7170
|
function FullscreenModalBody(_ref) {
|
|
7431
7171
|
var children = _ref.children,
|
|
7432
7172
|
shouldHandleBottomNotch = _ref.shouldHandleBottomNotch,
|
|
7433
7173
|
style = _ref.style,
|
|
7434
7174
|
shouldHandleTopNotch = _ref.shouldHandleTopNotch,
|
|
7435
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7175
|
+
props = _objectWithoutProperties(_ref, _excluded$m);
|
|
7436
7176
|
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
7437
7177
|
bottom = _useSafeAreaInsets.bottom,
|
|
7438
7178
|
top = _useSafeAreaInsets.top;
|
|
@@ -7449,389 +7189,103 @@ function FullscreenModalBody(_ref) {
|
|
|
7449
7189
|
}));
|
|
7450
7190
|
}
|
|
7451
7191
|
|
|
7452
|
-
var _excluded$
|
|
7192
|
+
var _excluded$l = ["shouldHandleBottomNotch", "hasSeparator", "children"];
|
|
7453
7193
|
function FullscreenModalFooter(_ref) {
|
|
7454
7194
|
var _ref$shouldHandleBott = _ref.shouldHandleBottomNotch,
|
|
7455
7195
|
shouldHandleBottomNotch = _ref$shouldHandleBott === void 0 ? true : _ref$shouldHandleBott,
|
|
7456
7196
|
_ref$hasSeparator = _ref.hasSeparator,
|
|
7457
7197
|
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
|
|
7458
7198
|
children = _ref.children,
|
|
7459
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7460
|
-
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
7461
|
-
bottom = _useSafeAreaInsets.bottom;
|
|
7462
|
-
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
7463
|
-
borderTopColor: "kitt.separator",
|
|
7464
|
-
borderTopWidth: hasSeparator ? 1 : undefined,
|
|
7465
|
-
paddingTop: "kitt.fullscreenModal.footer.verticalPadding",
|
|
7466
|
-
paddingBottom: shouldHandleBottomNotch ? bottom : undefined,
|
|
7467
|
-
paddingX: "kitt.fullscreenModal.horizontalPadding"
|
|
7468
|
-
}, props), {}, {
|
|
7469
|
-
children: /*#__PURE__*/jsx(View, {
|
|
7470
|
-
paddingBottom: "kitt.fullscreenModal.footer.verticalPadding",
|
|
7471
|
-
children: children
|
|
7472
|
-
})
|
|
7473
|
-
}));
|
|
7474
|
-
}
|
|
7475
|
-
|
|
7476
|
-
var _excluded$p = ["children", "appear", "visible", "unmountOnExit", "isAnimationEnabled", "onEnter", "onEntered", "onExit", "onExited", "onClose"];
|
|
7477
|
-
var slideInFromBottomEnter = "kitt-u_slideInFromBottomEnter_s1717rto";
|
|
7478
|
-
var slideInFromBottomEnterActive = "kitt-u_slideInFromBottomEnterActive_sux6xgc";
|
|
7479
|
-
var slideInFromBottomExit = "kitt-u_slideInFromBottomExit_sl0lsxt";
|
|
7480
|
-
var slideInFromBottomExitActive = "kitt-u_slideInFromBottomExitActive_srlzzmu";
|
|
7481
|
-
var slideInClassNames = {
|
|
7482
|
-
appear: slideInFromBottomEnter,
|
|
7483
|
-
appearActive: slideInFromBottomEnterActive,
|
|
7484
|
-
enter: slideInFromBottomEnter,
|
|
7485
|
-
enterActive: slideInFromBottomEnterActive,
|
|
7486
|
-
exit: slideInFromBottomExit,
|
|
7487
|
-
exitActive: slideInFromBottomExitActive
|
|
7488
|
-
};
|
|
7489
|
-
var opacityEnter = "kitt-u_opacityEnter_okm44hr";
|
|
7490
|
-
var opacityEnterActive = "kitt-u_opacityEnterActive_o2w8t0i";
|
|
7491
|
-
var opacityExit = "kitt-u_opacityExit_o14r8iix";
|
|
7492
|
-
var opacityExitActive = "kitt-u_opacityExitActive_oim72y2";
|
|
7493
|
-
var opacityClassNames = {
|
|
7494
|
-
appear: opacityEnter,
|
|
7495
|
-
appearActive: opacityEnterActive,
|
|
7496
|
-
enter: opacityEnter,
|
|
7497
|
-
enterActive: opacityEnterActive,
|
|
7498
|
-
exit: opacityExit,
|
|
7499
|
-
exitActive: opacityExitActive
|
|
7500
|
-
};
|
|
7501
|
-
function FullscreenModalAnimation(_ref) {
|
|
7502
|
-
var children = _ref.children,
|
|
7503
|
-
_ref$appear = _ref.appear,
|
|
7504
|
-
appear = _ref$appear === void 0 ? true : _ref$appear,
|
|
7505
|
-
visible = _ref.visible,
|
|
7506
|
-
_ref$unmountOnExit = _ref.unmountOnExit,
|
|
7507
|
-
unmountOnExit = _ref$unmountOnExit === void 0 ? true : _ref$unmountOnExit,
|
|
7508
|
-
_ref$isAnimationEnabl = _ref.isAnimationEnabled,
|
|
7509
|
-
isAnimationEnabled = _ref$isAnimationEnabl === void 0 ? true : _ref$isAnimationEnabl,
|
|
7510
|
-
onEnter = _ref.onEnter,
|
|
7511
|
-
onEntered = _ref.onEntered,
|
|
7512
|
-
onExit = _ref.onExit,
|
|
7513
|
-
onExited = _ref.onExited,
|
|
7514
|
-
onClose = _ref.onClose,
|
|
7515
|
-
props = _objectWithoutProperties(_ref, _excluded$p);
|
|
7516
|
-
var theme = useTheme();
|
|
7517
|
-
var animation = theme.kitt.fullscreenModal.animation;
|
|
7518
|
-
var sharedProps = {
|
|
7519
|
-
"in": visible,
|
|
7520
|
-
appear: appear,
|
|
7521
|
-
unmountOnExit: unmountOnExit
|
|
7522
|
-
};
|
|
7523
|
-
return /*#__PURE__*/jsxs(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
7524
|
-
children: [/*#__PURE__*/jsx(CSSTransition, _objectSpread(_objectSpread({}, sharedProps), {}, {
|
|
7525
|
-
timeout: isAnimationEnabled ? animation.overlay.duration : 0,
|
|
7526
|
-
classNames: opacityClassNames,
|
|
7527
|
-
children: /*#__PURE__*/jsx(Overlay, {
|
|
7528
|
-
onPress: onClose
|
|
7529
|
-
})
|
|
7530
|
-
})), /*#__PURE__*/jsx(CSSTransition, _objectSpread(_objectSpread({}, sharedProps), {}, {
|
|
7531
|
-
timeout: isAnimationEnabled ? animation.content.duration : 0,
|
|
7532
|
-
classNames: slideInClassNames,
|
|
7533
|
-
onEnter: onEnter,
|
|
7534
|
-
onEntered: onEntered,
|
|
7535
|
-
onExit: onExit,
|
|
7536
|
-
onExited: onExited,
|
|
7537
|
-
children: children
|
|
7538
|
-
}))]
|
|
7539
|
-
}));
|
|
7540
|
-
}
|
|
7541
|
-
|
|
7542
|
-
var _excluded$o = ["children", "visible", "onClose", "onExited"];
|
|
7543
|
-
function FullscreenModalBehaviour(_ref) {
|
|
7544
|
-
var children = _ref.children,
|
|
7545
|
-
visible = _ref.visible,
|
|
7546
|
-
onClose = _ref.onClose,
|
|
7547
|
-
onExited = _ref.onExited,
|
|
7548
|
-
props = _objectWithoutProperties(_ref, _excluded$o);
|
|
7549
|
-
var _useState = useState(visible),
|
|
7550
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
7551
|
-
isModalBehaviourVisible = _useState2[0],
|
|
7552
|
-
setIsModalBehaviourVisible = _useState2[1];
|
|
7553
|
-
useEffect(function () {
|
|
7554
|
-
if (visible === true) {
|
|
7555
|
-
setIsModalBehaviourVisible(true);
|
|
7556
|
-
}
|
|
7557
|
-
}, [visible]);
|
|
7558
|
-
return /*#__PURE__*/jsx(ModalBehaviour, {
|
|
7559
|
-
visible: isModalBehaviourVisible,
|
|
7560
|
-
onClose: onClose,
|
|
7561
|
-
children: /*#__PURE__*/jsx(FullscreenModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
7562
|
-
visible: visible,
|
|
7563
|
-
onExited: function handleExitAnimationDone() {
|
|
7564
|
-
if (onExited) onExited();
|
|
7565
|
-
setIsModalBehaviourVisible(false);
|
|
7566
|
-
},
|
|
7567
|
-
children: children
|
|
7568
|
-
}))
|
|
7569
|
-
});
|
|
7570
|
-
}
|
|
7571
|
-
|
|
7572
|
-
function FullscreenModalContainer(_ref) {
|
|
7573
|
-
var children = _ref.children,
|
|
7574
|
-
backgroundColor = _ref.backgroundColor;
|
|
7575
|
-
return /*#__PURE__*/jsx(View, {
|
|
7576
|
-
position: "relative",
|
|
7577
|
-
flexGrow: 1,
|
|
7578
|
-
flexShrink: 1,
|
|
7579
|
-
flexBasis: "100%"
|
|
7580
|
-
/*
|
|
7581
|
-
Here we are setting the same min and max height because on web the content was overflowing and not scrolling
|
|
7582
|
-
minHeight is needed to make the modal fullscreen
|
|
7583
|
-
maxHeight limits the height to the viewport when the content is too long, this allows us to scroll inside
|
|
7584
|
-
We use svh instead of vh because vh is the total height of the viewport, including the address bar in mobile web browsers
|
|
7585
|
-
*/,
|
|
7586
|
-
_web: {
|
|
7587
|
-
minHeight: '100svh',
|
|
7588
|
-
maxHeight: '100svh'
|
|
7589
|
-
},
|
|
7590
|
-
backgroundColor: backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : 'kitt.uiBackgroundLight',
|
|
7591
|
-
children: children
|
|
7592
|
-
});
|
|
7593
|
-
}
|
|
7594
|
-
|
|
7595
|
-
var _excluded$n = ["hasSeparator", "isTransparent", "title", "children", "right", "left", "shouldHandleTopNotch"];
|
|
7596
|
-
function FullscreenModalHeader(_ref) {
|
|
7597
|
-
var _ref$hasSeparator = _ref.hasSeparator,
|
|
7598
|
-
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
|
|
7599
|
-
isTransparent = _ref.isTransparent,
|
|
7600
|
-
title = _ref.title,
|
|
7601
|
-
children = _ref.children,
|
|
7602
|
-
right = _ref.right,
|
|
7603
|
-
left = _ref.left,
|
|
7604
|
-
_ref$shouldHandleTopN = _ref.shouldHandleTopNotch,
|
|
7605
|
-
shouldHandleTopNotch = _ref$shouldHandleTopN === void 0 ? true : _ref$shouldHandleTopN,
|
|
7606
|
-
props = _objectWithoutProperties(_ref, _excluded$n);
|
|
7607
|
-
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
7608
|
-
top = _useSafeAreaInsets.top;
|
|
7609
|
-
var hasRight = Boolean(right);
|
|
7610
|
-
var hasLeft = Boolean(left);
|
|
7611
|
-
var hasContent = Boolean(title || children);
|
|
7612
|
-
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
7613
|
-
backgroundColor: isTransparent ? 'kitt.transparent' : 'kitt.uiBackgroundLight',
|
|
7614
|
-
minHeight: "kitt.fullscreenModal.header.height",
|
|
7615
|
-
width: "100%",
|
|
7616
|
-
justifyContent: "center",
|
|
7617
|
-
paddingTop: shouldHandleTopNotch ? top : undefined,
|
|
7618
|
-
paddingRight: hasRight ? 'kitt.2' : 'kitt.fullscreenModal.horizontalPadding',
|
|
7619
|
-
paddingLeft: hasLeft ? 'kitt.2' : 'kitt.fullscreenModal.horizontalPadding',
|
|
7620
|
-
borderBottomColor: "kitt.separator",
|
|
7621
|
-
borderBottomWidth: hasSeparator ? 1 : undefined
|
|
7622
|
-
}, props), {}, {
|
|
7623
|
-
children: /*#__PURE__*/jsxs(View, {
|
|
7624
|
-
flexDirection: "row",
|
|
7625
|
-
alignItems: "center",
|
|
7626
|
-
justifyContent: !hasContent && !hasLeft ? 'flex-end' : 'space-between',
|
|
7627
|
-
children: [left ? /*#__PURE__*/jsx(View, {
|
|
7628
|
-
width: "kitt.iconButton.width",
|
|
7629
|
-
children: left
|
|
7630
|
-
}) : null, title ? /*#__PURE__*/jsx(View, {
|
|
7631
|
-
flexGrow: 1,
|
|
7632
|
-
flexShrink: 1,
|
|
7633
|
-
paddingLeft: hasLeft ? 'kitt.2' : undefined,
|
|
7634
|
-
paddingRight: hasRight ? 'kitt.2' : 0,
|
|
7635
|
-
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
7636
|
-
variant: "bold",
|
|
7637
|
-
textAlign: !hasLeft && hasRight ? 'left' : 'center',
|
|
7638
|
-
children: title
|
|
7639
|
-
})
|
|
7640
|
-
}) : null, children ? /*#__PURE__*/jsx(View, {
|
|
7641
|
-
flexGrow: 1,
|
|
7642
|
-
flexShrink: 1,
|
|
7643
|
-
alignItems: "center",
|
|
7644
|
-
paddingLeft: hasLeft ? 'kitt.2' : undefined,
|
|
7645
|
-
paddingRight: hasRight ? 'kitt.2' : undefined,
|
|
7646
|
-
children: children
|
|
7647
|
-
}) : null, right || left ? /*#__PURE__*/jsx(View, {
|
|
7648
|
-
width: "kitt.iconButton.width",
|
|
7649
|
-
children: right
|
|
7650
|
-
}) : null]
|
|
7651
|
-
})
|
|
7652
|
-
}));
|
|
7653
|
-
}
|
|
7654
|
-
|
|
7655
|
-
function FullscreenModal(_ref) {
|
|
7656
|
-
var body = _ref.body,
|
|
7657
|
-
header = _ref.header,
|
|
7658
|
-
footer = _ref.footer,
|
|
7659
|
-
backgroundColor = _ref.backgroundColor,
|
|
7660
|
-
_ref$contentContainer = _ref.contentContainer,
|
|
7661
|
-
ContentContainer = _ref$contentContainer === void 0 ? IdentityComponent : _ref$contentContainer;
|
|
7662
|
-
return /*#__PURE__*/jsx(FullscreenModalContainer, {
|
|
7663
|
-
backgroundColor: backgroundColor,
|
|
7664
|
-
children: /*#__PURE__*/jsxs(ContentContainer, {
|
|
7665
|
-
children: [header ? /*#__PURE__*/jsx(View, {
|
|
7666
|
-
children: header
|
|
7667
|
-
}) : null, /*#__PURE__*/jsxs(View, {
|
|
7668
|
-
flexGrow: 1,
|
|
7669
|
-
flexShrink: 1,
|
|
7670
|
-
justifyContent: "space-between",
|
|
7671
|
-
children: [/*#__PURE__*/jsx(ScrollView$2, {
|
|
7672
|
-
bounces: false,
|
|
7673
|
-
contentContainerStyle: {
|
|
7674
|
-
flexGrow: 1,
|
|
7675
|
-
position: 'relative'
|
|
7676
|
-
},
|
|
7677
|
-
children: body
|
|
7678
|
-
}), footer || null]
|
|
7679
|
-
})]
|
|
7680
|
-
})
|
|
7681
|
-
});
|
|
7682
|
-
}
|
|
7683
|
-
FullscreenModal.Header = FullscreenModalHeader;
|
|
7684
|
-
FullscreenModal.Footer = FullscreenModalFooter;
|
|
7685
|
-
FullscreenModal.Body = FullscreenModalBody;
|
|
7686
|
-
FullscreenModal.ModalBehaviour = FullscreenModalBehaviour;
|
|
7687
|
-
|
|
7688
|
-
function NativeOpacityAnimation(_ref) {
|
|
7689
|
-
var visible = _ref.visible,
|
|
7690
|
-
children = _ref.children;
|
|
7691
|
-
var theme = useTheme();
|
|
7692
|
-
var opacityStyle = useAnimatedStyle(function () {
|
|
7693
|
-
var _theme$kitt$fullscree = theme.kitt.fullscreenModal.animation.overlay,
|
|
7694
|
-
duration = _theme$kitt$fullscree.duration,
|
|
7695
|
-
easing = _theme$kitt$fullscree.easing;
|
|
7696
|
-
var _easing = _slicedToArray(easing, 4),
|
|
7697
|
-
x1 = _easing[0],
|
|
7698
|
-
y1 = _easing[1],
|
|
7699
|
-
x2 = _easing[2],
|
|
7700
|
-
y2 = _easing[3];
|
|
7701
|
-
return {
|
|
7702
|
-
opacity: withTiming(visible ? 1 : 0, {
|
|
7703
|
-
duration: duration,
|
|
7704
|
-
easing: Easing.bezier(x1, y1, x2, y2)
|
|
7705
|
-
})
|
|
7706
|
-
};
|
|
7707
|
-
});
|
|
7708
|
-
return /*#__PURE__*/jsx(Animated.View, {
|
|
7709
|
-
style: [StyleSheet.absoluteFillObject, opacityStyle],
|
|
7710
|
-
children: children
|
|
7711
|
-
});
|
|
7712
|
-
}
|
|
7713
|
-
|
|
7714
|
-
function NativeSlideInAnimation(_ref) {
|
|
7715
|
-
var visible = _ref.visible,
|
|
7716
|
-
children = _ref.children,
|
|
7717
|
-
onEntered = _ref.onEntered,
|
|
7718
|
-
onExited = _ref.onExited;
|
|
7719
|
-
var theme = useTheme();
|
|
7720
|
-
var _useWindowDimensions = useWindowDimensions(),
|
|
7721
|
-
wHeight = _useWindowDimensions.height;
|
|
7722
|
-
var hasRunAnimationRef = useRef(false);
|
|
7723
|
-
function handleAnimationFinished() {
|
|
7724
|
-
if (visible) {
|
|
7725
|
-
if (onEntered) onEntered();
|
|
7726
|
-
hasRunAnimationRef.current = true;
|
|
7727
|
-
}
|
|
7728
|
-
|
|
7729
|
-
// Since animation callback is called on component mount, we must make sure that the animation has been runed once to call it an exit
|
|
7730
|
-
if (!visible && hasRunAnimationRef.current) onExited();
|
|
7731
|
-
}
|
|
7732
|
-
var translateStyle = useAnimatedStyle(function () {
|
|
7733
|
-
var _theme$kitt$fullscree = theme.kitt.fullscreenModal.animation.content,
|
|
7734
|
-
duration = _theme$kitt$fullscree.duration,
|
|
7735
|
-
easing = _theme$kitt$fullscree.easing;
|
|
7736
|
-
var _easing = _slicedToArray(easing, 4),
|
|
7737
|
-
x1 = _easing[0],
|
|
7738
|
-
y1 = _easing[1],
|
|
7739
|
-
x2 = _easing[2],
|
|
7740
|
-
y2 = _easing[3];
|
|
7741
|
-
return {
|
|
7742
|
-
transform: [{
|
|
7743
|
-
translateY: withTiming(visible ? 0 : wHeight, {
|
|
7744
|
-
duration: duration,
|
|
7745
|
-
easing: Easing.bezier(x1, y1, x2, y2)
|
|
7746
|
-
}, function (isFinished) {
|
|
7747
|
-
if (!isFinished) return;
|
|
7748
|
-
runOnJS(handleAnimationFinished)();
|
|
7749
|
-
})
|
|
7750
|
-
}]
|
|
7751
|
-
};
|
|
7752
|
-
});
|
|
7753
|
-
return /*#__PURE__*/jsx(Animated.View, {
|
|
7754
|
-
style: [{
|
|
7755
|
-
transform: [{
|
|
7756
|
-
translateY: wHeight
|
|
7757
|
-
}]
|
|
7758
|
-
}, translateStyle, {
|
|
7759
|
-
width: '100%',
|
|
7760
|
-
flex: 1
|
|
7761
|
-
}],
|
|
7762
|
-
children: children
|
|
7763
|
-
});
|
|
7199
|
+
props = _objectWithoutProperties(_ref, _excluded$l);
|
|
7200
|
+
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
7201
|
+
bottom = _useSafeAreaInsets.bottom;
|
|
7202
|
+
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
7203
|
+
borderTopColor: "kitt.separator",
|
|
7204
|
+
borderTopWidth: hasSeparator ? 1 : undefined,
|
|
7205
|
+
paddingTop: "kitt.fullscreenModal.footer.verticalPadding",
|
|
7206
|
+
paddingBottom: shouldHandleBottomNotch ? bottom : undefined,
|
|
7207
|
+
paddingX: "kitt.fullscreenModal.horizontalPadding"
|
|
7208
|
+
}, props), {}, {
|
|
7209
|
+
children: /*#__PURE__*/jsx(View, {
|
|
7210
|
+
paddingBottom: "kitt.fullscreenModal.footer.verticalPadding",
|
|
7211
|
+
children: children
|
|
7212
|
+
})
|
|
7213
|
+
}));
|
|
7764
7214
|
}
|
|
7765
7215
|
|
|
7766
|
-
|
|
7767
|
-
|
|
7768
|
-
|
|
7216
|
+
var _excluded$k = ["children", "appear", "visible", "unmountOnExit", "isAnimationEnabled", "onEnter", "onEntered", "onExit", "onExited", "onClose"];
|
|
7217
|
+
var slideInFromBottomEnter = "kitt-u_slideInFromBottomEnter_s1717rto";
|
|
7218
|
+
var slideInFromBottomEnterActive = "kitt-u_slideInFromBottomEnterActive_sux6xgc";
|
|
7219
|
+
var slideInFromBottomExit = "kitt-u_slideInFromBottomExit_sl0lsxt";
|
|
7220
|
+
var slideInFromBottomExitActive = "kitt-u_slideInFromBottomExitActive_srlzzmu";
|
|
7221
|
+
var slideInClassNames = {
|
|
7222
|
+
appear: slideInFromBottomEnter,
|
|
7223
|
+
appearActive: slideInFromBottomEnterActive,
|
|
7224
|
+
enter: slideInFromBottomEnter,
|
|
7225
|
+
enterActive: slideInFromBottomEnterActive,
|
|
7226
|
+
exit: slideInFromBottomExit,
|
|
7227
|
+
exitActive: slideInFromBottomExitActive
|
|
7228
|
+
};
|
|
7229
|
+
var opacityEnter = "kitt-u_opacityEnter_okm44hr";
|
|
7230
|
+
var opacityEnterActive = "kitt-u_opacityEnterActive_o2w8t0i";
|
|
7231
|
+
var opacityExit = "kitt-u_opacityExit_o14r8iix";
|
|
7232
|
+
var opacityExitActive = "kitt-u_opacityExitActive_oim72y2";
|
|
7233
|
+
var opacityClassNames = {
|
|
7234
|
+
appear: opacityEnter,
|
|
7235
|
+
appearActive: opacityEnterActive,
|
|
7236
|
+
enter: opacityEnter,
|
|
7237
|
+
enterActive: opacityEnterActive,
|
|
7238
|
+
exit: opacityExit,
|
|
7239
|
+
exitActive: opacityExitActive
|
|
7240
|
+
};
|
|
7241
|
+
function FullscreenModalAnimation(_ref) {
|
|
7242
|
+
var children = _ref.children,
|
|
7243
|
+
_ref$appear = _ref.appear,
|
|
7244
|
+
appear = _ref$appear === void 0 ? true : _ref$appear,
|
|
7245
|
+
visible = _ref.visible,
|
|
7246
|
+
_ref$unmountOnExit = _ref.unmountOnExit,
|
|
7247
|
+
unmountOnExit = _ref$unmountOnExit === void 0 ? true : _ref$unmountOnExit,
|
|
7248
|
+
_ref$isAnimationEnabl = _ref.isAnimationEnabled,
|
|
7249
|
+
isAnimationEnabled = _ref$isAnimationEnabl === void 0 ? true : _ref$isAnimationEnabl,
|
|
7769
7250
|
onEnter = _ref.onEnter,
|
|
7770
7251
|
onEntered = _ref.onEntered,
|
|
7771
7252
|
onExit = _ref.onExit,
|
|
7772
|
-
onExited = _ref.onExited
|
|
7773
|
-
|
|
7774
|
-
|
|
7775
|
-
|
|
7776
|
-
|
|
7777
|
-
var
|
|
7778
|
-
|
|
7779
|
-
|
|
7780
|
-
|
|
7781
|
-
var handleAnimationExited = function () {
|
|
7782
|
-
setIsModalVisible(false);
|
|
7783
|
-
// Android doesn't handle the onDismiss callback on the modal, we need to call it manually
|
|
7253
|
+
onExited = _ref.onExited,
|
|
7254
|
+
onClose = _ref.onClose,
|
|
7255
|
+
props = _objectWithoutProperties(_ref, _excluded$k);
|
|
7256
|
+
var theme = useTheme();
|
|
7257
|
+
var animation = theme.kitt.fullscreenModal.animation;
|
|
7258
|
+
var sharedProps = {
|
|
7259
|
+
"in": visible,
|
|
7260
|
+
appear: appear,
|
|
7261
|
+
unmountOnExit: unmountOnExit
|
|
7784
7262
|
};
|
|
7785
|
-
|
|
7786
|
-
|
|
7787
|
-
|
|
7788
|
-
|
|
7789
|
-
|
|
7790
|
-
|
|
7791
|
-
|
|
7792
|
-
|
|
7793
|
-
|
|
7794
|
-
|
|
7795
|
-
|
|
7796
|
-
|
|
7797
|
-
|
|
7798
|
-
|
|
7799
|
-
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
onDismiss: function onDismiss() {
|
|
7803
|
-
if (onExited) onExited();
|
|
7804
|
-
},
|
|
7805
|
-
children: /*#__PURE__*/jsxs(View, {
|
|
7806
|
-
position: "relative",
|
|
7807
|
-
flexGrow: 1,
|
|
7808
|
-
justifyContent: "center",
|
|
7809
|
-
alignItems: "center",
|
|
7810
|
-
children: [/*#__PURE__*/jsx(NativeOpacityAnimation, {
|
|
7811
|
-
visible: isContentVisible,
|
|
7812
|
-
children: /*#__PURE__*/jsx(Overlay, {
|
|
7813
|
-
onPress: handleAnimationExited
|
|
7814
|
-
})
|
|
7815
|
-
}), /*#__PURE__*/jsx(NativeSlideInAnimation, {
|
|
7816
|
-
visible: isContentVisible,
|
|
7817
|
-
onExited: handleAnimationExited,
|
|
7818
|
-
onEntered: onEntered,
|
|
7819
|
-
children: /*#__PURE__*/jsx(View, {
|
|
7820
|
-
flexGrow: 1,
|
|
7821
|
-
children: children
|
|
7822
|
-
})
|
|
7823
|
-
})]
|
|
7824
|
-
})
|
|
7825
|
-
});
|
|
7263
|
+
return /*#__PURE__*/jsxs(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
7264
|
+
children: [/*#__PURE__*/jsx(CSSTransition, _objectSpread(_objectSpread({}, sharedProps), {}, {
|
|
7265
|
+
timeout: isAnimationEnabled ? animation.overlay.duration : 0,
|
|
7266
|
+
classNames: opacityClassNames,
|
|
7267
|
+
children: /*#__PURE__*/jsx(Overlay, {
|
|
7268
|
+
onPress: onClose
|
|
7269
|
+
})
|
|
7270
|
+
})), /*#__PURE__*/jsx(CSSTransition, _objectSpread(_objectSpread({}, sharedProps), {}, {
|
|
7271
|
+
timeout: isAnimationEnabled ? animation.content.duration : 0,
|
|
7272
|
+
classNames: slideInClassNames,
|
|
7273
|
+
onEnter: onEnter,
|
|
7274
|
+
onEntered: onEntered,
|
|
7275
|
+
onExit: onExit,
|
|
7276
|
+
onExited: onExited,
|
|
7277
|
+
children: children
|
|
7278
|
+
}))]
|
|
7279
|
+
}));
|
|
7826
7280
|
}
|
|
7827
7281
|
|
|
7828
|
-
var _excluded$
|
|
7829
|
-
function
|
|
7282
|
+
var _excluded$j = ["children", "visible", "onClose", "onExited"];
|
|
7283
|
+
function FullscreenModalBehaviour(_ref) {
|
|
7830
7284
|
var children = _ref.children,
|
|
7831
7285
|
visible = _ref.visible,
|
|
7832
7286
|
onClose = _ref.onClose,
|
|
7833
7287
|
onExited = _ref.onExited,
|
|
7834
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7288
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
7835
7289
|
var _useState = useState(visible),
|
|
7836
7290
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7837
7291
|
isModalBehaviourVisible = _useState2[0],
|
|
@@ -7844,7 +7298,7 @@ function FullscreenModal2Behaviour(_ref) {
|
|
|
7844
7298
|
return /*#__PURE__*/jsx(ModalBehaviour, {
|
|
7845
7299
|
visible: isModalBehaviourVisible,
|
|
7846
7300
|
onClose: onClose,
|
|
7847
|
-
children: /*#__PURE__*/jsx(
|
|
7301
|
+
children: /*#__PURE__*/jsx(FullscreenModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
|
|
7848
7302
|
visible: visible,
|
|
7849
7303
|
onExited: function handleExitAnimationDone() {
|
|
7850
7304
|
if (onExited) onExited();
|
|
@@ -7855,42 +7309,7 @@ function FullscreenModal2Behaviour(_ref) {
|
|
|
7855
7309
|
});
|
|
7856
7310
|
}
|
|
7857
7311
|
|
|
7858
|
-
|
|
7859
|
-
function FullscreenModal2Body(_ref) {
|
|
7860
|
-
var children = _ref.children,
|
|
7861
|
-
shouldHandleBottomNotch = _ref.shouldHandleBottomNotch,
|
|
7862
|
-
style = _ref.style,
|
|
7863
|
-
shouldHandleTopNotch = _ref.shouldHandleTopNotch,
|
|
7864
|
-
props = _objectWithoutProperties(_ref, _excluded$l);
|
|
7865
|
-
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
7866
|
-
bottom = _useSafeAreaInsets.bottom,
|
|
7867
|
-
top = _useSafeAreaInsets.top;
|
|
7868
|
-
var _useTheme = useTheme(),
|
|
7869
|
-
verticalPadding = _useTheme.kitt.fullscreenModal.body.verticalPadding;
|
|
7870
|
-
var paddingBottom = shouldHandleBottomNotch ? Math.max(bottom, verticalPadding) : verticalPadding;
|
|
7871
|
-
var paddingTop = shouldHandleTopNotch ? Math.max(top, verticalPadding) : verticalPadding;
|
|
7872
|
-
return /*#__PURE__*/jsx(View, {
|
|
7873
|
-
flexGrow: 1,
|
|
7874
|
-
flexShrink: 1,
|
|
7875
|
-
justifyContent: "space-between",
|
|
7876
|
-
children: /*#__PURE__*/jsx(ScrollView$1, {
|
|
7877
|
-
bounces: false,
|
|
7878
|
-
contentContainerStyle: {
|
|
7879
|
-
flexGrow: 1,
|
|
7880
|
-
position: 'relative'
|
|
7881
|
-
},
|
|
7882
|
-
children: /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
7883
|
-
paddingX: "kitt.fullscreenModal.horizontalPadding",
|
|
7884
|
-
paddingTop: paddingTop,
|
|
7885
|
-
paddingBottom: paddingBottom,
|
|
7886
|
-
style: style,
|
|
7887
|
-
children: children
|
|
7888
|
-
}))
|
|
7889
|
-
})
|
|
7890
|
-
});
|
|
7891
|
-
}
|
|
7892
|
-
|
|
7893
|
-
function FullscreenModal2Container(_ref) {
|
|
7312
|
+
function FullscreenModalContainer(_ref) {
|
|
7894
7313
|
var children = _ref.children,
|
|
7895
7314
|
backgroundColor = _ref.backgroundColor;
|
|
7896
7315
|
return /*#__PURE__*/jsx(View, {
|
|
@@ -7913,32 +7332,8 @@ function FullscreenModal2Container(_ref) {
|
|
|
7913
7332
|
});
|
|
7914
7333
|
}
|
|
7915
7334
|
|
|
7916
|
-
var _excluded$
|
|
7917
|
-
function
|
|
7918
|
-
var _ref$shouldHandleBott = _ref.shouldHandleBottomNotch,
|
|
7919
|
-
shouldHandleBottomNotch = _ref$shouldHandleBott === void 0 ? true : _ref$shouldHandleBott,
|
|
7920
|
-
_ref$hasSeparator = _ref.hasSeparator,
|
|
7921
|
-
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
|
|
7922
|
-
children = _ref.children,
|
|
7923
|
-
props = _objectWithoutProperties(_ref, _excluded$k);
|
|
7924
|
-
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
7925
|
-
bottom = _useSafeAreaInsets.bottom;
|
|
7926
|
-
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
7927
|
-
borderTopColor: "kitt.separator",
|
|
7928
|
-
borderTopWidth: hasSeparator ? 1 : undefined,
|
|
7929
|
-
paddingTop: "kitt.fullscreenModal.footer.verticalPadding",
|
|
7930
|
-
paddingBottom: shouldHandleBottomNotch ? bottom : undefined,
|
|
7931
|
-
paddingX: "kitt.fullscreenModal.horizontalPadding"
|
|
7932
|
-
}, props), {}, {
|
|
7933
|
-
children: /*#__PURE__*/jsx(View, {
|
|
7934
|
-
paddingBottom: "kitt.fullscreenModal.footer.verticalPadding",
|
|
7935
|
-
children: children
|
|
7936
|
-
})
|
|
7937
|
-
}));
|
|
7938
|
-
}
|
|
7939
|
-
|
|
7940
|
-
var _excluded$j = ["hasSeparator", "isTransparent", "title", "children", "right", "left", "shouldHandleTopNotch"];
|
|
7941
|
-
function FullscreenModal2Header(_ref) {
|
|
7335
|
+
var _excluded$i = ["hasSeparator", "isTransparent", "title", "children", "right", "left", "shouldHandleTopNotch"];
|
|
7336
|
+
function FullscreenModalHeader(_ref) {
|
|
7942
7337
|
var _ref$hasSeparator = _ref.hasSeparator,
|
|
7943
7338
|
hasSeparator = _ref$hasSeparator === void 0 ? true : _ref$hasSeparator,
|
|
7944
7339
|
isTransparent = _ref.isTransparent,
|
|
@@ -7948,7 +7343,7 @@ function FullscreenModal2Header(_ref) {
|
|
|
7948
7343
|
left = _ref.left,
|
|
7949
7344
|
_ref$shouldHandleTopN = _ref.shouldHandleTopNotch,
|
|
7950
7345
|
shouldHandleTopNotch = _ref$shouldHandleTopN === void 0 ? true : _ref$shouldHandleTopN,
|
|
7951
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7346
|
+
props = _objectWithoutProperties(_ref, _excluded$i);
|
|
7952
7347
|
var _useSafeAreaInsets = useSafeAreaInsets(),
|
|
7953
7348
|
top = _useSafeAreaInsets.top;
|
|
7954
7349
|
var hasRight = Boolean(right);
|
|
@@ -7997,18 +7392,34 @@ function FullscreenModal2Header(_ref) {
|
|
|
7997
7392
|
}));
|
|
7998
7393
|
}
|
|
7999
7394
|
|
|
8000
|
-
function
|
|
8001
|
-
var
|
|
8002
|
-
|
|
8003
|
-
|
|
7395
|
+
function FullscreenModal(_ref) {
|
|
7396
|
+
var body = _ref.body,
|
|
7397
|
+
header = _ref.header,
|
|
7398
|
+
footer = _ref.footer,
|
|
7399
|
+
backgroundColor = _ref.backgroundColor;
|
|
7400
|
+
return /*#__PURE__*/jsxs(FullscreenModalContainer, {
|
|
8004
7401
|
backgroundColor: backgroundColor,
|
|
8005
|
-
children:
|
|
7402
|
+
children: [header ? /*#__PURE__*/jsx(View, {
|
|
7403
|
+
children: header
|
|
7404
|
+
}) : null, /*#__PURE__*/jsxs(View, {
|
|
7405
|
+
flexGrow: 1,
|
|
7406
|
+
flexShrink: 1,
|
|
7407
|
+
justifyContent: "space-between",
|
|
7408
|
+
children: [/*#__PURE__*/jsx(ScrollView$2, {
|
|
7409
|
+
bounces: false,
|
|
7410
|
+
contentContainerStyle: {
|
|
7411
|
+
flexGrow: 1,
|
|
7412
|
+
position: 'relative'
|
|
7413
|
+
},
|
|
7414
|
+
children: body
|
|
7415
|
+
}), footer || null]
|
|
7416
|
+
})]
|
|
8006
7417
|
});
|
|
8007
7418
|
}
|
|
8008
|
-
|
|
8009
|
-
|
|
8010
|
-
|
|
8011
|
-
|
|
7419
|
+
FullscreenModal.Header = FullscreenModalHeader;
|
|
7420
|
+
FullscreenModal.Footer = FullscreenModalFooter;
|
|
7421
|
+
FullscreenModal.Body = FullscreenModalBody;
|
|
7422
|
+
FullscreenModal.ModalBehaviour = FullscreenModalBehaviour;
|
|
8012
7423
|
|
|
8013
7424
|
function GroupTags(_ref) {
|
|
8014
7425
|
var children = _ref.children,
|
|
@@ -8241,7 +7652,7 @@ function Highlight(_ref) {
|
|
|
8241
7652
|
});
|
|
8242
7653
|
}
|
|
8243
7654
|
|
|
8244
|
-
var _excluded$
|
|
7655
|
+
var _excluded$h = ["color", "isDisabled"];
|
|
8245
7656
|
function getBackgroundColor$2(color, isDisabled) {
|
|
8246
7657
|
if (isDisabled) {
|
|
8247
7658
|
return 'kitt.iconButton.disabled.backgroundColor';
|
|
@@ -8261,7 +7672,7 @@ function getBackgroundColor$2(color, isDisabled) {
|
|
|
8261
7672
|
function Background(_ref) {
|
|
8262
7673
|
var color = _ref.color,
|
|
8263
7674
|
isDisabled = _ref.isDisabled,
|
|
8264
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
7675
|
+
props = _objectWithoutProperties(_ref, _excluded$h);
|
|
8265
7676
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), {}, {
|
|
8266
7677
|
width: "100%",
|
|
8267
7678
|
height: "100%",
|
|
@@ -8539,10 +7950,10 @@ function useKittMapConfig() {
|
|
|
8539
7950
|
return context;
|
|
8540
7951
|
}
|
|
8541
7952
|
|
|
8542
|
-
var _excluded$
|
|
7953
|
+
var _excluded$g = ["children"];
|
|
8543
7954
|
function ListItemContent(_ref) {
|
|
8544
7955
|
var children = _ref.children,
|
|
8545
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
7956
|
+
rest = _objectWithoutProperties(_ref, _excluded$g);
|
|
8546
7957
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
8547
7958
|
alignSelf: "center",
|
|
8548
7959
|
flexBasis: "0%",
|
|
@@ -8553,14 +7964,14 @@ function ListItemContent(_ref) {
|
|
|
8553
7964
|
}));
|
|
8554
7965
|
}
|
|
8555
7966
|
|
|
8556
|
-
var _excluded$
|
|
7967
|
+
var _excluded$f = ["children", "side"],
|
|
8557
7968
|
_excluded2$3 = ["children", "align"];
|
|
8558
7969
|
// Handles the vertical alignment of the side elements of the list item
|
|
8559
7970
|
function ListItemSideContainer(_ref) {
|
|
8560
7971
|
var children = _ref.children,
|
|
8561
7972
|
_ref$side = _ref.side,
|
|
8562
7973
|
side = _ref$side === void 0 ? 'left' : _ref$side,
|
|
8563
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
7974
|
+
rest = _objectWithoutProperties(_ref, _excluded$f);
|
|
8564
7975
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
8565
7976
|
flexDirection: "row",
|
|
8566
7977
|
marginLeft: side === 'right' ? 'kitt.2' : undefined,
|
|
@@ -8581,7 +7992,7 @@ function ListItemSideContent(_ref2) {
|
|
|
8581
7992
|
}));
|
|
8582
7993
|
}
|
|
8583
7994
|
|
|
8584
|
-
var _excluded$
|
|
7995
|
+
var _excluded$e = ["children", "withPadding", "borders", "left", "right", "onPress"];
|
|
8585
7996
|
function ListItem(_ref) {
|
|
8586
7997
|
var children = _ref.children,
|
|
8587
7998
|
withPadding = _ref.withPadding,
|
|
@@ -8589,7 +8000,7 @@ function ListItem(_ref) {
|
|
|
8589
8000
|
left = _ref.left,
|
|
8590
8001
|
right = _ref.right,
|
|
8591
8002
|
onPress = _ref.onPress,
|
|
8592
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
8003
|
+
rest = _objectWithoutProperties(_ref, _excluded$e);
|
|
8593
8004
|
var Wrapper = onPress ? Pressable$2 : Fragment$1;
|
|
8594
8005
|
var wrapperProps = onPress ? _objectSpread({
|
|
8595
8006
|
accessibilityRole: 'button',
|
|
@@ -8755,7 +8166,7 @@ var getBackgroundColor$1 = function (_ref) {
|
|
|
8755
8166
|
return isSelected || isHovered ? theme.mapMarker.meetingPoint.selected : theme.mapMarker.meetingPoint["default"];
|
|
8756
8167
|
};
|
|
8757
8168
|
|
|
8758
|
-
var _excluded$
|
|
8169
|
+
var _excluded$d = ["onPress", "testID"];
|
|
8759
8170
|
var MapMarkerVariantEnum = /*#__PURE__*/function (MapMarkerVariantEnum) {
|
|
8760
8171
|
MapMarkerVariantEnum["HOME"] = "home";
|
|
8761
8172
|
MapMarkerVariantEnum["MEETING_POINT"] = "meetingPoint";
|
|
@@ -8821,7 +8232,7 @@ function StaticMapMarker$1(_ref) {
|
|
|
8821
8232
|
function MapMarker(_ref2) {
|
|
8822
8233
|
var onPress = _ref2.onPress,
|
|
8823
8234
|
testID = _ref2.testID,
|
|
8824
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
8235
|
+
props = _objectWithoutProperties(_ref2, _excluded$d);
|
|
8825
8236
|
return /*#__PURE__*/jsx(Pressable$1, {
|
|
8826
8237
|
testID: testID,
|
|
8827
8238
|
onPress: onPress,
|
|
@@ -11438,7 +10849,7 @@ function KittNativeBaseProvider(_ref) {
|
|
|
11438
10849
|
});
|
|
11439
10850
|
}
|
|
11440
10851
|
|
|
11441
|
-
var _excluded$
|
|
10852
|
+
var _excluded$c = ["scrollEnabled", "ListHeaderComponent", "ListFooterComponent", "data", "numColumns", "ListHeaderComponentStyle", "ListFooterComponentStyle", "contentContainerStyle", "keyExtractor", "renderItem"];
|
|
11442
10853
|
function NativeOnlyFlatList(_ref) {
|
|
11443
10854
|
var scrollEnabled = _ref.scrollEnabled,
|
|
11444
10855
|
ListHeaderComponent = _ref.ListHeaderComponent,
|
|
@@ -11453,7 +10864,7 @@ function NativeOnlyFlatList(_ref) {
|
|
|
11453
10864
|
return index.toString();
|
|
11454
10865
|
} : _ref$keyExtractor,
|
|
11455
10866
|
renderItem = _ref.renderItem,
|
|
11456
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
10867
|
+
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
11457
10868
|
return /*#__PURE__*/jsxs(ScrollView$1, _objectSpread(_objectSpread({
|
|
11458
10869
|
scrollEnabled: scrollEnabled,
|
|
11459
10870
|
contentContainerStyle: contentContainerStyle
|
|
@@ -11483,7 +10894,7 @@ function NativeOnlyFlatList(_ref) {
|
|
|
11483
10894
|
}));
|
|
11484
10895
|
}
|
|
11485
10896
|
|
|
11486
|
-
var _excluded$
|
|
10897
|
+
var _excluded$b = ["children", "visible", "appear", "onExited", "onEnter", "onExit", "onClose"];
|
|
11487
10898
|
function NavigationModalBehaviour(_ref) {
|
|
11488
10899
|
var children = _ref.children,
|
|
11489
10900
|
visible = _ref.visible,
|
|
@@ -11493,7 +10904,7 @@ function NavigationModalBehaviour(_ref) {
|
|
|
11493
10904
|
onEnter = _ref.onEnter,
|
|
11494
10905
|
onExit = _ref.onExit,
|
|
11495
10906
|
onClose = _ref.onClose,
|
|
11496
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
10907
|
+
props = _objectWithoutProperties(_ref, _excluded$b);
|
|
11497
10908
|
var AnimationComponent = useBreakpointValue({
|
|
11498
10909
|
base: FullscreenModalAnimation,
|
|
11499
10910
|
small: CardModalAnimation
|
|
@@ -11543,8 +10954,7 @@ function NavigationModal(_ref) {
|
|
|
11543
10954
|
var body = _ref.body,
|
|
11544
10955
|
backgroundColor = _ref.backgroundColor,
|
|
11545
10956
|
footer = _ref.footer,
|
|
11546
|
-
header = _ref.header
|
|
11547
|
-
contentContainer = _ref.contentContainer;
|
|
10957
|
+
header = _ref.header;
|
|
11548
10958
|
var Component = useBreakpointValue({
|
|
11549
10959
|
base: FullscreenModal,
|
|
11550
10960
|
small: CardModal
|
|
@@ -11553,130 +10963,35 @@ function NavigationModal(_ref) {
|
|
|
11553
10963
|
body: body,
|
|
11554
10964
|
backgroundColor: backgroundColor,
|
|
11555
10965
|
footer: footer,
|
|
11556
|
-
header: header
|
|
11557
|
-
contentContainer: contentContainer
|
|
10966
|
+
header: header
|
|
11558
10967
|
});
|
|
11559
10968
|
}
|
|
11560
|
-
function Header
|
|
10969
|
+
function Header(props) {
|
|
11561
10970
|
var Component = useBreakpointValue({
|
|
11562
10971
|
base: FullscreenModal.Header,
|
|
11563
10972
|
small: CardModal.Header
|
|
11564
10973
|
});
|
|
11565
10974
|
return /*#__PURE__*/jsx(Component, _objectSpread({}, props));
|
|
11566
10975
|
}
|
|
11567
|
-
function Body
|
|
10976
|
+
function Body(props) {
|
|
11568
10977
|
var Component = useBreakpointValue({
|
|
11569
10978
|
base: FullscreenModal.Body,
|
|
11570
10979
|
small: CardModal.Body
|
|
11571
10980
|
});
|
|
11572
10981
|
return /*#__PURE__*/jsx(Component, _objectSpread({}, props));
|
|
11573
10982
|
}
|
|
11574
|
-
function Footer
|
|
10983
|
+
function Footer(props) {
|
|
11575
10984
|
var Component = useBreakpointValue({
|
|
11576
10985
|
base: FullscreenModal.Footer,
|
|
11577
10986
|
small: CardModal.Footer
|
|
11578
10987
|
});
|
|
11579
10988
|
return /*#__PURE__*/jsx(Component, _objectSpread({}, props));
|
|
11580
10989
|
}
|
|
11581
|
-
NavigationModal.Header = Header
|
|
11582
|
-
NavigationModal.Body = Body
|
|
11583
|
-
NavigationModal.Footer = Footer
|
|
10990
|
+
NavigationModal.Header = Header;
|
|
10991
|
+
NavigationModal.Body = Body;
|
|
10992
|
+
NavigationModal.Footer = Footer;
|
|
11584
10993
|
NavigationModal.ModalBehaviour = NavigationModalBehaviour;
|
|
11585
10994
|
|
|
11586
|
-
var _excluded$b = ["children", "visible", "appear", "onExited", "onEnter", "onExit", "onClose"];
|
|
11587
|
-
function NavigationModal2Behaviour(_ref) {
|
|
11588
|
-
var children = _ref.children,
|
|
11589
|
-
visible = _ref.visible,
|
|
11590
|
-
_ref$appear = _ref.appear,
|
|
11591
|
-
appear = _ref$appear === void 0 ? true : _ref$appear,
|
|
11592
|
-
onExited = _ref.onExited,
|
|
11593
|
-
onEnter = _ref.onEnter,
|
|
11594
|
-
onExit = _ref.onExit,
|
|
11595
|
-
onClose = _ref.onClose,
|
|
11596
|
-
props = _objectWithoutProperties(_ref, _excluded$b);
|
|
11597
|
-
var AnimationComponent = useBreakpointValue({
|
|
11598
|
-
base: FullscreenModal2Animation,
|
|
11599
|
-
small: CardModal2Animation
|
|
11600
|
-
});
|
|
11601
|
-
var _useState = useState(visible),
|
|
11602
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
11603
|
-
isModalBehaviourVisible = _useState2[0],
|
|
11604
|
-
setIsModalBehaviourVisible = _useState2[1];
|
|
11605
|
-
var _useState3 = useState(appear),
|
|
11606
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
11607
|
-
shouldAppear = _useState4[0],
|
|
11608
|
-
setShouldAppear = _useState4[1];
|
|
11609
|
-
useEffect(function () {
|
|
11610
|
-
if (visible === true) {
|
|
11611
|
-
setIsModalBehaviourVisible(true);
|
|
11612
|
-
}
|
|
11613
|
-
}, [visible]);
|
|
11614
|
-
return /*#__PURE__*/jsx(ModalBehaviour, {
|
|
11615
|
-
visible: isModalBehaviourVisible,
|
|
11616
|
-
onClose: onClose,
|
|
11617
|
-
children: /*#__PURE__*/jsx(AnimationComponent, _objectSpread(_objectSpread({}, props), {}, {
|
|
11618
|
-
appear: shouldAppear,
|
|
11619
|
-
visible: visible,
|
|
11620
|
-
onEnter: function handleEnter() {
|
|
11621
|
-
if (onEnter) onEnter();
|
|
11622
|
-
|
|
11623
|
-
// Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
|
|
11624
|
-
setShouldAppear(false);
|
|
11625
|
-
},
|
|
11626
|
-
onExit: function handleExit() {
|
|
11627
|
-
if (onExit) onExit();
|
|
11628
|
-
|
|
11629
|
-
// Reset appear value to its original value for future modal display
|
|
11630
|
-
setShouldAppear(appear);
|
|
11631
|
-
},
|
|
11632
|
-
onExited: function handleExitAnimationDone() {
|
|
11633
|
-
if (onExited) onExited();
|
|
11634
|
-
setIsModalBehaviourVisible(false);
|
|
11635
|
-
},
|
|
11636
|
-
onClose: onClose,
|
|
11637
|
-
children: children
|
|
11638
|
-
}))
|
|
11639
|
-
});
|
|
11640
|
-
}
|
|
11641
|
-
|
|
11642
|
-
function NavigationModal2(_ref) {
|
|
11643
|
-
var backgroundColor = _ref.backgroundColor,
|
|
11644
|
-
children = _ref.children;
|
|
11645
|
-
var Component = useBreakpointValue({
|
|
11646
|
-
base: FullscreenModal2,
|
|
11647
|
-
small: CardModal2
|
|
11648
|
-
});
|
|
11649
|
-
return /*#__PURE__*/jsx(Component, {
|
|
11650
|
-
backgroundColor: backgroundColor,
|
|
11651
|
-
children: children
|
|
11652
|
-
});
|
|
11653
|
-
}
|
|
11654
|
-
function Header(props) {
|
|
11655
|
-
var Component = useBreakpointValue({
|
|
11656
|
-
base: FullscreenModal2.Header,
|
|
11657
|
-
small: CardModal2.Header
|
|
11658
|
-
});
|
|
11659
|
-
return /*#__PURE__*/jsx(Component, _objectSpread({}, props));
|
|
11660
|
-
}
|
|
11661
|
-
function Body(props) {
|
|
11662
|
-
var Component = useBreakpointValue({
|
|
11663
|
-
base: FullscreenModal2.Body,
|
|
11664
|
-
small: CardModal2.Body
|
|
11665
|
-
});
|
|
11666
|
-
return /*#__PURE__*/jsx(Component, _objectSpread({}, props));
|
|
11667
|
-
}
|
|
11668
|
-
function Footer(props) {
|
|
11669
|
-
var Component = useBreakpointValue({
|
|
11670
|
-
base: FullscreenModal2.Footer,
|
|
11671
|
-
small: CardModal2.Footer
|
|
11672
|
-
});
|
|
11673
|
-
return /*#__PURE__*/jsx(Component, _objectSpread({}, props));
|
|
11674
|
-
}
|
|
11675
|
-
NavigationModal2.Header = Header;
|
|
11676
|
-
NavigationModal2.Body = Body;
|
|
11677
|
-
NavigationModal2.Footer = Footer;
|
|
11678
|
-
NavigationModal2.ModalBehaviour = NavigationModal2Behaviour;
|
|
11679
|
-
|
|
11680
10995
|
function Notification(_ref) {
|
|
11681
10996
|
var type = _ref.type,
|
|
11682
10997
|
children = _ref.children,
|
|
@@ -13899,5 +13214,5 @@ function VerticalSteps(_ref) {
|
|
|
13899
13214
|
VerticalSteps.Step = Step;
|
|
13900
13215
|
VerticalSteps.BorderlessStep = BorderlessStep;
|
|
13901
13216
|
|
|
13902
|
-
export { ActionCard, Actions, Autocomplete, Avatar, BottomSheet, Button, CardModal,
|
|
13217
|
+
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 };
|
|
13903
13218
|
//# sourceMappingURL=index.es.web.js.map
|