@ornikar/kitt-universal 31.4.0 → 32.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/definitions/CardModal/CardModalAnimation/OpacityAnimation.d.ts +8 -0
- package/dist/definitions/CardModal/CardModalAnimation/OpacityAnimation.d.ts.map +1 -0
- package/dist/definitions/CardModal/CardModalAnimation/{NativeRotationAnimation.d.ts → RotationAnimation.d.ts} +3 -3
- package/dist/definitions/CardModal/CardModalAnimation/RotationAnimation.d.ts.map +1 -0
- package/dist/definitions/DialogModal/DialogModalAnimation/NativeOpacityAnimation.d.ts.map +1 -1
- package/dist/definitions/DialogModal/DialogModalAnimation/NativeRotationAnimation.d.ts.map +1 -1
- package/dist/definitions/forms/InputAddress/InputAddress.d.ts +12 -8
- package/dist/definitions/forms/InputAddress/InputAddress.d.ts.map +1 -1
- package/dist/definitions/forms/InputAddress/InputAddressLegacy.d.ts +15 -0
- package/dist/definitions/forms/InputAddress/InputAddressLegacy.d.ts.map +1 -0
- package/dist/definitions/forms/InputAddress/InputAddressOption.d.ts +5 -4
- package/dist/definitions/forms/InputAddress/InputAddressOption.d.ts.map +1 -1
- package/dist/definitions/forms/InputAddress/InputAddressOptionLegacy.d.ts +7 -0
- package/dist/definitions/forms/InputAddress/InputAddressOptionLegacy.d.ts.map +1 -0
- package/dist/definitions/index.d.ts +4 -1
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +161 -78
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +161 -78
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +96 -13
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.css +0 -8
- package/dist/index-node-22.17.cjs.web.js +261 -104
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +96 -14
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.css +0 -8
- package/dist/index-node-22.17.es.web.mjs +261 -105
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +162 -78
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +283 -126
- 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/CardModal/CardModalAnimation/NativeOpacityAnimation.d.ts +0 -8
- package/dist/definitions/CardModal/CardModalAnimation/NativeOpacityAnimation.d.ts.map +0 -1
- package/dist/definitions/CardModal/CardModalAnimation/NativeRotationAnimation.d.ts.map +0 -1
- package/dist/definitions/DialogModal/DialogModalAnimation/DialogModalAnimation.web.d.ts +0 -4
- package/dist/definitions/DialogModal/DialogModalAnimation/DialogModalAnimation.web.d.ts.map +0 -1
|
@@ -6,14 +6,6 @@
|
|
|
6
6
|
.kitt-u_opacityEnterActive_o1t4vl7b{opacity:1;-webkit-transition:opacity 250ms cubic-bezier(0.42,0,1,1);transition:opacity 250ms cubic-bezier(0.42,0,1,1);}
|
|
7
7
|
.kitt-u_opacityExit_ogyytm1{opacity:1;}
|
|
8
8
|
.kitt-u_opacityExitActive_o18xvk52{opacity:0;-webkit-transition:opacity 250ms cubic-bezier(0.42,0,1,1);transition:opacity 250ms cubic-bezier(0.42,0,1,1);}
|
|
9
|
-
.kitt-u_contentAnimationEnter_c1i0gle8{opacity:0;-webkit-transform:rotateZ(5deg) scale(0.8);-ms-transform:rotateZ(5deg) scale(0.8);transform:rotateZ(5deg) scale(0.8);}
|
|
10
|
-
.kitt-u_contentAnimatioEnterActive_c1jmfkjw{opacity:1;-webkit-transform:rotateZ(0) scale(1);-ms-transform:rotateZ(0) scale(1);transform:rotateZ(0) scale(1);-webkit-transition:all 400ms cubic-bezier(0.77,0,0.175,1);transition:all 400ms cubic-bezier(0.77,0,0.175,1);}
|
|
11
|
-
.kitt-u_contentAnimatioExit_cwjstxl{opacity:1;-webkit-transform:rotateZ(0) scale(1);-ms-transform:rotateZ(0) scale(1);transform:rotateZ(0) scale(1);}
|
|
12
|
-
.kitt-u_contentAnimatioExitActive_c1almbvu{opacity:0;-webkit-transform:rotateZ(5deg) scale(0.8);-ms-transform:rotateZ(5deg) scale(0.8);transform:rotateZ(5deg) scale(0.8);-webkit-transition:all 400ms cubic-bezier(0.77,0,0.175,1);transition:all 400ms cubic-bezier(0.77,0,0.175,1);}
|
|
13
|
-
.kitt-u_opacityEnter_o9rkayr{opacity:0;}
|
|
14
|
-
.kitt-u_opacityEnterActive_od7zvm9{opacity:1;-webkit-transition:opacity 250ms cubic-bezier(0.42,0,1,1);transition:opacity 250ms cubic-bezier(0.42,0,1,1);}
|
|
15
|
-
.kitt-u_opacityExit_opddo9j{opacity:1;}
|
|
16
|
-
.kitt-u_opacityExitActive_o15v6ove{opacity:0;-webkit-transition:opacity 250ms cubic-bezier(0.42,0,1,1);transition:opacity 250ms cubic-bezier(0.42,0,1,1);}
|
|
17
9
|
.kitt-u_inputTextContainer_i1encr9g{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;position:relative;}.kitt-u_inputTextContainer_i1encr9g > *::-ms-clear,.kitt-u_inputTextContainer_i1encr9g > *::-ms-reveal{display:none;}.kitt-u_inputTextContainer_i1encr9g > *{-webkit-transition:border-color 200ms ease-in-out,background-color 200ms ease-in-out;transition:border-color 200ms ease-in-out,background-color 200ms ease-in-out;}
|
|
18
10
|
.kitt-u_slideInFromBottomEnter_s1717rto{-webkit-transform:translateY(100%);-ms-transform:translateY(100%);transform:translateY(100%);}
|
|
19
11
|
.kitt-u_slideInFromBottomEnterActive_sux6xgc{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);-webkit-transition:-webkit-transform 600ms cubic-bezier(0.77,0,0.175,1);-webkit-transition:transform 600ms cubic-bezier(0.77,0,0.175,1);transition:transform 600ms cubic-bezier(0.77,0,0.175,1);}
|
|
@@ -9,6 +9,7 @@ const phosphor = require('@ornikar/kitt-icons/phosphor');
|
|
|
9
9
|
const reactNative = require('react-native');
|
|
10
10
|
const reactDom = require('react-dom');
|
|
11
11
|
const reactTransitionGroup = require('react-transition-group');
|
|
12
|
+
const Animated = require('react-native-reanimated');
|
|
12
13
|
const parser = require('@twemoji/parser');
|
|
13
14
|
const Downshift = require('downshift');
|
|
14
15
|
const expoDocumentPicker = require('expo-document-picker');
|
|
@@ -16,7 +17,6 @@ const expoImagePicker = require('expo-image-picker');
|
|
|
16
17
|
const useDebounce = require('use-debounce');
|
|
17
18
|
const jsApiLoader = require('@googlemaps/js-api-loader');
|
|
18
19
|
const libphonenumberJs = require('libphonenumber-js');
|
|
19
|
-
const Animated = require('react-native-reanimated');
|
|
20
20
|
const reactNativeSafeAreaContext = require('react-native-safe-area-context');
|
|
21
21
|
const Svg = require('react-native-svg');
|
|
22
22
|
const reactDom$1 = require('@floating-ui/react-dom');
|
|
@@ -26,8 +26,8 @@ const isChromatic = require('chromatic/isChromatic');
|
|
|
26
26
|
|
|
27
27
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e["default"] : e; }
|
|
28
28
|
|
|
29
|
-
const Downshift__default = /*#__PURE__*/_interopDefaultLegacy(Downshift);
|
|
30
29
|
const Animated__default = /*#__PURE__*/_interopDefaultLegacy(Animated);
|
|
30
|
+
const Downshift__default = /*#__PURE__*/_interopDefaultLegacy(Downshift);
|
|
31
31
|
const Svg__default = /*#__PURE__*/_interopDefaultLegacy(Svg);
|
|
32
32
|
const isChromatic__default = /*#__PURE__*/_interopDefaultLegacy(isChromatic);
|
|
33
33
|
|
|
@@ -4332,29 +4332,29 @@ const CardModalRotationContainer = /*#__PURE__*/react.forwardRef((props, ref) =>
|
|
|
4332
4332
|
});
|
|
4333
4333
|
});
|
|
4334
4334
|
|
|
4335
|
-
const contentAnimationEnter
|
|
4336
|
-
const contentAnimatioEnterActive
|
|
4337
|
-
const contentAnimatioExit
|
|
4338
|
-
const contentAnimatioExitActive
|
|
4339
|
-
const contentAnimationClassNames
|
|
4340
|
-
appear: contentAnimationEnter
|
|
4341
|
-
appearActive: contentAnimatioEnterActive
|
|
4342
|
-
enter: contentAnimationEnter
|
|
4343
|
-
enterActive: contentAnimatioEnterActive
|
|
4344
|
-
exit: contentAnimatioExit
|
|
4345
|
-
exitActive: contentAnimatioExitActive
|
|
4335
|
+
const contentAnimationEnter = "kitt-u_contentAnimationEnter_c11xxy4r";
|
|
4336
|
+
const contentAnimatioEnterActive = "kitt-u_contentAnimatioEnterActive_cl52117";
|
|
4337
|
+
const contentAnimatioExit = "kitt-u_contentAnimatioExit_cyjczep";
|
|
4338
|
+
const contentAnimatioExitActive = "kitt-u_contentAnimatioExitActive_cpsy3dt";
|
|
4339
|
+
const contentAnimationClassNames = {
|
|
4340
|
+
appear: contentAnimationEnter,
|
|
4341
|
+
appearActive: contentAnimatioEnterActive,
|
|
4342
|
+
enter: contentAnimationEnter,
|
|
4343
|
+
enterActive: contentAnimatioEnterActive,
|
|
4344
|
+
exit: contentAnimatioExit,
|
|
4345
|
+
exitActive: contentAnimatioExitActive
|
|
4346
4346
|
};
|
|
4347
|
-
const opacityEnter$
|
|
4348
|
-
const opacityEnterActive$
|
|
4349
|
-
const opacityExit$
|
|
4350
|
-
const opacityExitActive$
|
|
4351
|
-
const opacityClassNames$
|
|
4352
|
-
appear: opacityEnter$
|
|
4353
|
-
appearActive: opacityEnterActive$
|
|
4354
|
-
enter: opacityEnter$
|
|
4355
|
-
enterActive: opacityEnterActive$
|
|
4356
|
-
exit: opacityExit$
|
|
4357
|
-
exitActive: opacityExitActive$
|
|
4347
|
+
const opacityEnter$1 = "kitt-u_opacityEnter_o1ae40dx";
|
|
4348
|
+
const opacityEnterActive$1 = "kitt-u_opacityEnterActive_o1t4vl7b";
|
|
4349
|
+
const opacityExit$1 = "kitt-u_opacityExit_ogyytm1";
|
|
4350
|
+
const opacityExitActive$1 = "kitt-u_opacityExitActive_o18xvk52";
|
|
4351
|
+
const opacityClassNames$1 = {
|
|
4352
|
+
appear: opacityEnter$1,
|
|
4353
|
+
appearActive: opacityEnterActive$1,
|
|
4354
|
+
enter: opacityEnter$1,
|
|
4355
|
+
enterActive: opacityEnterActive$1,
|
|
4356
|
+
exit: opacityExit$1,
|
|
4357
|
+
exitActive: opacityExitActive$1
|
|
4358
4358
|
};
|
|
4359
4359
|
function CardModalAnimation({
|
|
4360
4360
|
children,
|
|
@@ -4390,7 +4390,7 @@ function CardModalAnimation({
|
|
|
4390
4390
|
...sharedProps,
|
|
4391
4391
|
nodeRef: overlayRef,
|
|
4392
4392
|
timeout: isAnimationEnabled ? animation.overlay.duration : 0,
|
|
4393
|
-
classNames: opacityClassNames$
|
|
4393
|
+
classNames: opacityClassNames$1,
|
|
4394
4394
|
children: /*#__PURE__*/jsxRuntime.jsx(Overlay, {
|
|
4395
4395
|
ref: overlayRef,
|
|
4396
4396
|
onPress: onClose
|
|
@@ -4399,7 +4399,7 @@ function CardModalAnimation({
|
|
|
4399
4399
|
...sharedProps,
|
|
4400
4400
|
nodeRef: contentRef,
|
|
4401
4401
|
timeout: isAnimationEnabled ? animation.content.duration : 0,
|
|
4402
|
-
classNames: contentAnimationClassNames
|
|
4402
|
+
classNames: contentAnimationClassNames,
|
|
4403
4403
|
onEnter: onEnter,
|
|
4404
4404
|
onEntered: onEntered,
|
|
4405
4405
|
onExit: onExit,
|
|
@@ -4936,87 +4936,167 @@ const ChoicesElements = {
|
|
|
4936
4936
|
ButtonChoices
|
|
4937
4937
|
};
|
|
4938
4938
|
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
const contentAnimatioExit = "kitt-u_contentAnimatioExit_cwjstxl";
|
|
4942
|
-
const contentAnimatioExitActive = "kitt-u_contentAnimatioExitActive_c1almbvu";
|
|
4943
|
-
const contentAnimationClassNames = {
|
|
4944
|
-
appear: contentAnimationEnter,
|
|
4945
|
-
appearActive: contentAnimatioEnterActive,
|
|
4946
|
-
enter: contentAnimationEnter,
|
|
4947
|
-
enterActive: contentAnimatioEnterActive,
|
|
4948
|
-
exit: contentAnimatioExit,
|
|
4949
|
-
exitActive: contentAnimatioExitActive
|
|
4950
|
-
};
|
|
4951
|
-
const opacityEnter$1 = "kitt-u_opacityEnter_o9rkayr";
|
|
4952
|
-
const opacityEnterActive$1 = "kitt-u_opacityEnterActive_od7zvm9";
|
|
4953
|
-
const opacityExit$1 = "kitt-u_opacityExit_opddo9j";
|
|
4954
|
-
const opacityExitActive$1 = "kitt-u_opacityExitActive_o15v6ove";
|
|
4955
|
-
const opacityClassNames$1 = {
|
|
4956
|
-
appear: opacityEnter$1,
|
|
4957
|
-
appearActive: opacityEnterActive$1,
|
|
4958
|
-
enter: opacityEnter$1,
|
|
4959
|
-
enterActive: opacityEnterActive$1,
|
|
4960
|
-
exit: opacityExit$1,
|
|
4961
|
-
exitActive: opacityExitActive$1
|
|
4962
|
-
};
|
|
4963
|
-
function DialogModalAnimation({
|
|
4939
|
+
function NativeOpacityAnimation({
|
|
4940
|
+
visible,
|
|
4964
4941
|
children,
|
|
4965
|
-
|
|
4942
|
+
onExited
|
|
4943
|
+
}) {
|
|
4944
|
+
const theme = useTheme();
|
|
4945
|
+
const hasRunAnimationRef = react.useRef(false);
|
|
4946
|
+
react.useEffect(() => {
|
|
4947
|
+
if (visible) {
|
|
4948
|
+
hasRunAnimationRef.current = true;
|
|
4949
|
+
}
|
|
4950
|
+
}, [visible]);
|
|
4951
|
+
function handleAnimationFinished() {
|
|
4952
|
+
if (!visible && hasRunAnimationRef.current) {
|
|
4953
|
+
onExited();
|
|
4954
|
+
}
|
|
4955
|
+
}
|
|
4956
|
+
const opacityStyle = Animated.useAnimatedStyle(() => {
|
|
4957
|
+
const {
|
|
4958
|
+
duration,
|
|
4959
|
+
easing
|
|
4960
|
+
} = theme.kitt.dialogModal.animation.overlay;
|
|
4961
|
+
const {
|
|
4962
|
+
x1,
|
|
4963
|
+
y1,
|
|
4964
|
+
x2,
|
|
4965
|
+
y2
|
|
4966
|
+
} = easing;
|
|
4967
|
+
return {
|
|
4968
|
+
opacity: Animated.withTiming(visible ? 1 : 0, {
|
|
4969
|
+
duration,
|
|
4970
|
+
easing: Animated.Easing.bezier(x1, y1, x2, y2)
|
|
4971
|
+
}, isFinished => {
|
|
4972
|
+
if (!isFinished) return;
|
|
4973
|
+
Animated.runOnJS(handleAnimationFinished)();
|
|
4974
|
+
})
|
|
4975
|
+
};
|
|
4976
|
+
}, [theme, visible, handleAnimationFinished]);
|
|
4977
|
+
return /*#__PURE__*/jsxRuntime.jsx(Animated__default.View, {
|
|
4978
|
+
style: [reactNative.StyleSheet.absoluteFillObject, opacityStyle],
|
|
4979
|
+
children: children
|
|
4980
|
+
});
|
|
4981
|
+
}
|
|
4982
|
+
|
|
4983
|
+
function NativeRotationAnimation({
|
|
4966
4984
|
visible,
|
|
4967
|
-
|
|
4968
|
-
|
|
4985
|
+
children,
|
|
4986
|
+
onEntered,
|
|
4987
|
+
onExited
|
|
4988
|
+
}) {
|
|
4989
|
+
const theme = useTheme();
|
|
4990
|
+
const hasRunAnimationRef = react.useRef(false);
|
|
4991
|
+
const rotation = Animated.useSharedValue(0.8);
|
|
4992
|
+
react.useEffect(() => {
|
|
4993
|
+
if (visible) {
|
|
4994
|
+
hasRunAnimationRef.current = true;
|
|
4995
|
+
}
|
|
4996
|
+
}, [visible]);
|
|
4997
|
+
function handleAnimationFinished() {
|
|
4998
|
+
if (visible) {
|
|
4999
|
+
if (onEntered) onEntered();
|
|
5000
|
+
}
|
|
5001
|
+
if (!visible && hasRunAnimationRef.current) onExited();
|
|
5002
|
+
}
|
|
5003
|
+
const animatedStyle = Animated.useAnimatedStyle(() => {
|
|
5004
|
+
const {
|
|
5005
|
+
duration,
|
|
5006
|
+
easing
|
|
5007
|
+
} = theme.kitt.dialogModal.animation.content;
|
|
5008
|
+
const {
|
|
5009
|
+
x1,
|
|
5010
|
+
y1,
|
|
5011
|
+
x2,
|
|
5012
|
+
y2
|
|
5013
|
+
} = easing;
|
|
5014
|
+
rotation.value = Animated.withTiming(visible ? 0 : 5, {
|
|
5015
|
+
duration,
|
|
5016
|
+
easing: Animated.Easing.bezier(x1, y1, x2, y2)
|
|
5017
|
+
}, isFinished => {
|
|
5018
|
+
if (!isFinished) return;
|
|
5019
|
+
Animated.runOnJS(handleAnimationFinished)();
|
|
5020
|
+
});
|
|
5021
|
+
return {
|
|
5022
|
+
opacity: Animated.withTiming(visible ? 1 : 0, {
|
|
5023
|
+
duration,
|
|
5024
|
+
easing: Animated.Easing.bezier(x1, y1, x2, y2)
|
|
5025
|
+
}),
|
|
5026
|
+
transform: [{
|
|
5027
|
+
scale: Animated.withTiming(visible ? 1 : 0.8, {
|
|
5028
|
+
duration,
|
|
5029
|
+
easing: Animated.Easing.bezier(x1, y1, x2, y2)
|
|
5030
|
+
})
|
|
5031
|
+
}, {
|
|
5032
|
+
rotateZ: `${rotation.value}deg`
|
|
5033
|
+
}]
|
|
5034
|
+
};
|
|
5035
|
+
}, [theme, visible, rotation, handleAnimationFinished]);
|
|
5036
|
+
return /*#__PURE__*/jsxRuntime.jsx(Animated__default.View, {
|
|
5037
|
+
style: [animatedStyle],
|
|
5038
|
+
children: children
|
|
5039
|
+
});
|
|
5040
|
+
}
|
|
5041
|
+
|
|
5042
|
+
function DialogModalAnimation({
|
|
5043
|
+
visible,
|
|
5044
|
+
children,
|
|
4969
5045
|
onEnter,
|
|
4970
5046
|
onEntered,
|
|
4971
5047
|
onExit,
|
|
4972
5048
|
onExited,
|
|
4973
|
-
onClose
|
|
4974
|
-
...props
|
|
5049
|
+
onClose
|
|
4975
5050
|
}) {
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
const
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
const {
|
|
4982
|
-
animation
|
|
4983
|
-
} = theme.kitt.dialogModal;
|
|
4984
|
-
const sharedProps = {
|
|
4985
|
-
in: visible,
|
|
4986
|
-
appear,
|
|
4987
|
-
unmountOnExit
|
|
5051
|
+
const [isModalVisible, setIsModalVisible] = react.useState(visible);
|
|
5052
|
+
const [isContentVisible, setIsContentVisible] = react.useState(false);
|
|
5053
|
+
const handleAnimationExited = () => {
|
|
5054
|
+
setIsModalVisible(false);
|
|
5055
|
+
// Android doesn't handle the onDismiss callback on the modal, we need to call it manually
|
|
4988
5056
|
};
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5057
|
+
react.useEffect(() => {
|
|
5058
|
+
if (!(!visible && isContentVisible)) return;
|
|
5059
|
+
if (onExit) onExit();
|
|
5060
|
+
setIsContentVisible(false);
|
|
5061
|
+
}, [visible, isContentVisible, onExit]);
|
|
5062
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactNative.Modal, {
|
|
5063
|
+
transparent: true,
|
|
5064
|
+
supportedOrientations: ['landscape', 'portrait'],
|
|
5065
|
+
visible: isModalVisible,
|
|
5066
|
+
onShow: () => {
|
|
5067
|
+
if (onEnter) onEnter();
|
|
5068
|
+
setIsContentVisible(true);
|
|
5069
|
+
},
|
|
5070
|
+
onDismiss: () => {
|
|
5071
|
+
if (onExited) onExited();
|
|
5072
|
+
},
|
|
5073
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(View
|
|
5074
|
+
// This is an ugly workaround to make the Modal calculate its height correctly on Android.
|
|
5075
|
+
// This ugly workaround is used in FullScreenModalAnimation and CardModalAnimation as well
|
|
5076
|
+
// TODO [expo@>=53]: Check if still needed
|
|
5077
|
+
, {
|
|
5078
|
+
height: undefined,
|
|
5079
|
+
position: "relative",
|
|
5080
|
+
flexGrow: 1,
|
|
5081
|
+
justifyContent: "center",
|
|
5082
|
+
alignItems: "center",
|
|
5083
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(NativeOpacityAnimation, {
|
|
5084
|
+
visible: isContentVisible,
|
|
5085
|
+
onExited: handleAnimationExited,
|
|
5086
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Overlay, {
|
|
5087
|
+
onPress: onClose
|
|
5088
|
+
})
|
|
5089
|
+
}), /*#__PURE__*/jsxRuntime.jsx(NativeRotationAnimation, {
|
|
5090
|
+
visible: isContentVisible,
|
|
5091
|
+
onExited: handleAnimationExited,
|
|
5092
|
+
onEntered: onEntered,
|
|
5093
|
+
children: /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
5094
|
+
paddingX: "kitt.dialogModal.overlayPadding.horizontal",
|
|
5095
|
+
paddingY: "kitt.dialogModal.overlayPadding.vertical",
|
|
5096
|
+
children: children
|
|
5097
|
+
})
|
|
5098
|
+
})]
|
|
5099
|
+
})
|
|
5020
5100
|
});
|
|
5021
5101
|
}
|
|
5022
5102
|
|
|
@@ -6246,6 +6326,82 @@ function ImagePicker({
|
|
|
6246
6326
|
});
|
|
6247
6327
|
}
|
|
6248
6328
|
|
|
6329
|
+
function InputAddressOption({
|
|
6330
|
+
item,
|
|
6331
|
+
mainText,
|
|
6332
|
+
secondaryText
|
|
6333
|
+
}) {
|
|
6334
|
+
const sharedTransform = {
|
|
6335
|
+
style: {
|
|
6336
|
+
transform: 'translateY(4px)'
|
|
6337
|
+
}
|
|
6338
|
+
};
|
|
6339
|
+
return /*#__PURE__*/jsxRuntime.jsx(Autocomplete.Option, {
|
|
6340
|
+
item: item,
|
|
6341
|
+
testID: "kitt.InputAddressOption.item",
|
|
6342
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(HStack, {
|
|
6343
|
+
space: "kitt.2",
|
|
6344
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(View, {
|
|
6345
|
+
_web: sharedTransform,
|
|
6346
|
+
_ios: sharedTransform,
|
|
6347
|
+
_android: sharedTransform,
|
|
6348
|
+
children: /*#__PURE__*/jsxRuntime.jsx(TypographyIcon, {
|
|
6349
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(phosphor.MapPinRegularIcon, {}),
|
|
6350
|
+
color: "black"
|
|
6351
|
+
})
|
|
6352
|
+
}), /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
6353
|
+
flexShrink: 1,
|
|
6354
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(Typography.Text, {
|
|
6355
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
6356
|
+
variant: "bold",
|
|
6357
|
+
children: mainText
|
|
6358
|
+
}), secondaryText ? /*#__PURE__*/jsxRuntime.jsxs(Typography.Text, {
|
|
6359
|
+
color: "black-light",
|
|
6360
|
+
variant: "bold",
|
|
6361
|
+
children: [' ', secondaryText]
|
|
6362
|
+
}) : null]
|
|
6363
|
+
})
|
|
6364
|
+
})]
|
|
6365
|
+
})
|
|
6366
|
+
});
|
|
6367
|
+
}
|
|
6368
|
+
|
|
6369
|
+
function InputAddress({
|
|
6370
|
+
errorElement,
|
|
6371
|
+
initialValue,
|
|
6372
|
+
emptyResultsElement,
|
|
6373
|
+
onChange,
|
|
6374
|
+
items,
|
|
6375
|
+
isLoading,
|
|
6376
|
+
hasError,
|
|
6377
|
+
onInputChange,
|
|
6378
|
+
onSelectItem,
|
|
6379
|
+
convertInitialValue,
|
|
6380
|
+
renderItem,
|
|
6381
|
+
...props
|
|
6382
|
+
}) {
|
|
6383
|
+
const formattedInitialValue = initialValue ? convertInitialValue(initialValue) : undefined;
|
|
6384
|
+
return /*#__PURE__*/jsxRuntime.jsx(Autocomplete, {
|
|
6385
|
+
...props,
|
|
6386
|
+
initialValue: formattedInitialValue,
|
|
6387
|
+
right: isLoading ? /*#__PURE__*/jsxRuntime.jsx(Icon, {
|
|
6388
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(LoaderIcon, {}),
|
|
6389
|
+
color: "kitt.black"
|
|
6390
|
+
}) : undefined,
|
|
6391
|
+
errorElement: hasError ? errorElement : null,
|
|
6392
|
+
emptyResultsElement: items.length === 0 ? emptyResultsElement : null,
|
|
6393
|
+
onInputChange: value => onInputChange(value),
|
|
6394
|
+
onChange: item => onSelectItem(item, onChange),
|
|
6395
|
+
children: items.map(item => {
|
|
6396
|
+
const itemElement = renderItem(item);
|
|
6397
|
+
return /*#__PURE__*/react.cloneElement(itemElement, {
|
|
6398
|
+
item
|
|
6399
|
+
});
|
|
6400
|
+
})
|
|
6401
|
+
});
|
|
6402
|
+
}
|
|
6403
|
+
InputAddress.Option = InputAddressOption;
|
|
6404
|
+
|
|
6249
6405
|
const GoogleMapsApiKeyContext = /*#__PURE__*/react.createContext(undefined);
|
|
6250
6406
|
function GoogleMapsApiKeyProvider({
|
|
6251
6407
|
children,
|
|
@@ -6571,7 +6727,7 @@ function useGoogleMapsAutocomplete() {
|
|
|
6571
6727
|
return context;
|
|
6572
6728
|
}
|
|
6573
6729
|
|
|
6574
|
-
function
|
|
6730
|
+
function InputAddressOptionLegacy({
|
|
6575
6731
|
item
|
|
6576
6732
|
}) {
|
|
6577
6733
|
const sharedTransform = {
|
|
@@ -6581,7 +6737,7 @@ function InputAddressOption({
|
|
|
6581
6737
|
};
|
|
6582
6738
|
return /*#__PURE__*/jsxRuntime.jsx(Autocomplete.Option, {
|
|
6583
6739
|
item: item,
|
|
6584
|
-
testID: "kitt.
|
|
6740
|
+
testID: "kitt.InputAddressOptionLegacy.item",
|
|
6585
6741
|
children: /*#__PURE__*/jsxRuntime.jsxs(HStack, {
|
|
6586
6742
|
space: "kitt.2",
|
|
6587
6743
|
children: [/*#__PURE__*/jsxRuntime.jsx(View, {
|
|
@@ -6642,7 +6798,7 @@ function formatInitialValueToAutocompletePrediction(address, placeId) {
|
|
|
6642
6798
|
};
|
|
6643
6799
|
}
|
|
6644
6800
|
|
|
6645
|
-
function
|
|
6801
|
+
function InputAddressLegacy({
|
|
6646
6802
|
initialValue,
|
|
6647
6803
|
itemToString = defaultItemToString,
|
|
6648
6804
|
errorElement,
|
|
@@ -6675,12 +6831,12 @@ function InputAddress({
|
|
|
6675
6831
|
onChange: v => {
|
|
6676
6832
|
onSelectItem(v, onChange);
|
|
6677
6833
|
},
|
|
6678
|
-
children: state.items.map(item => /*#__PURE__*/jsxRuntime.jsx(
|
|
6834
|
+
children: state.items.map(item => /*#__PURE__*/jsxRuntime.jsx(InputAddressOptionLegacy, {
|
|
6679
6835
|
item: item
|
|
6680
6836
|
}, item.place_id))
|
|
6681
6837
|
});
|
|
6682
6838
|
}
|
|
6683
|
-
|
|
6839
|
+
InputAddressLegacy.Option = InputAddressOptionLegacy;
|
|
6684
6840
|
|
|
6685
6841
|
const InputEmail = /*#__PURE__*/react.forwardRef((props, ref) => {
|
|
6686
6842
|
return /*#__PURE__*/jsxRuntime.jsx(InputText, {
|
|
@@ -13684,6 +13840,7 @@ exports.Image = Image;
|
|
|
13684
13840
|
exports.ImagePicker = ImagePicker;
|
|
13685
13841
|
exports.InfoCard = InfoCard;
|
|
13686
13842
|
exports.InputAddress = InputAddress;
|
|
13843
|
+
exports.InputAddressLegacy = InputAddressLegacy;
|
|
13687
13844
|
exports.InputEmail = InputEmail;
|
|
13688
13845
|
exports.InputFeedback = InputFeedback;
|
|
13689
13846
|
exports.InputField = InputField;
|