@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
package/dist/index.es.web.js
CHANGED
|
@@ -11,10 +11,11 @@ import _typeof from '@babel/runtime/helpers/typeof';
|
|
|
11
11
|
import _regeneratorRuntime from '@babel/runtime/helpers/regeneratorRuntime';
|
|
12
12
|
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
13
13
|
import { SpinnerGapRegularIcon, UserRegularIcon, XRegularIcon, ArrowLeftRegularIcon, CaretUpFillIcon, CaretDownFillIcon, MapPinRegularIcon, EyeClosedRegularIcon, EyeRegularIcon, CheckCircleFillIcon, CaretDownRegularIcon, CaretRightRegularIcon, InfoRegularIcon, WarningRegularIcon, CheckRegularIcon, WarningCircleRegularIcon, ArrowCounterClockwiseRegularIcon, InfoFillIcon, WarningCircleFillIcon, WarningFillIcon } from '@ornikar/kitt-icons/phosphor';
|
|
14
|
-
import { Animated, Easing, ScrollView as ScrollView$2, View as View$2, Linking, Pressable as Pressable$2,
|
|
14
|
+
import { Animated, Easing, ScrollView as ScrollView$2, View as View$2, StyleSheet, Modal, Linking, Pressable as Pressable$2, useWindowDimensions } from 'react-native';
|
|
15
15
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
16
16
|
import { createPortal } from 'react-dom';
|
|
17
17
|
import { CSSTransition } from 'react-transition-group';
|
|
18
|
+
import Animated$1, { useAnimatedStyle, withTiming, Easing as Easing$1, runOnJS, useSharedValue, withSpring, interpolateColor, useAnimatedProps, withDelay, withRepeat, interpolate, ReducedMotionConfig, ReduceMotion } from 'react-native-reanimated';
|
|
18
19
|
import { parse } from '@twemoji/parser';
|
|
19
20
|
import Downshift, { useSelect } from 'downshift';
|
|
20
21
|
import { getDocumentAsync } from 'expo-document-picker';
|
|
@@ -22,7 +23,6 @@ import { launchImageLibraryAsync } from 'expo-image-picker';
|
|
|
22
23
|
import { useDebouncedCallback } from 'use-debounce';
|
|
23
24
|
import { Loader } from '@googlemaps/js-api-loader';
|
|
24
25
|
import { parseNumber, getCountryCallingCode, isValidNumber } from 'libphonenumber-js';
|
|
25
|
-
import Animated$1, { useAnimatedStyle, withSpring, withTiming, useSharedValue, interpolateColor, Easing as Easing$1, useAnimatedProps, withDelay, withRepeat, interpolate, runOnJS, ReducedMotionConfig, ReduceMotion } from 'react-native-reanimated';
|
|
26
26
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
27
27
|
import Svg, { Circle as Circle$1 } from 'react-native-svg';
|
|
28
28
|
import { useFloating, autoUpdate, offset, autoPlacement, shift, arrow } from '@floating-ui/react-dom';
|
|
@@ -4364,29 +4364,29 @@ var CardModalRotationContainer = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
4364
4364
|
});
|
|
4365
4365
|
|
|
4366
4366
|
var _excluded$J = ["children", "appear", "visible", "unmountOnExit", "isAnimationEnabled", "onEnter", "onEntered", "onExit", "onExited", "onClose"];
|
|
4367
|
-
var contentAnimationEnter
|
|
4368
|
-
var contentAnimatioEnterActive
|
|
4369
|
-
var contentAnimatioExit
|
|
4370
|
-
var contentAnimatioExitActive
|
|
4371
|
-
var contentAnimationClassNames
|
|
4372
|
-
appear: contentAnimationEnter
|
|
4373
|
-
appearActive: contentAnimatioEnterActive
|
|
4374
|
-
enter: contentAnimationEnter
|
|
4375
|
-
enterActive: contentAnimatioEnterActive
|
|
4376
|
-
exit: contentAnimatioExit
|
|
4377
|
-
exitActive: contentAnimatioExitActive
|
|
4367
|
+
var contentAnimationEnter = "kitt-u_contentAnimationEnter_c11xxy4r";
|
|
4368
|
+
var contentAnimatioEnterActive = "kitt-u_contentAnimatioEnterActive_cl52117";
|
|
4369
|
+
var contentAnimatioExit = "kitt-u_contentAnimatioExit_cyjczep";
|
|
4370
|
+
var contentAnimatioExitActive = "kitt-u_contentAnimatioExitActive_cpsy3dt";
|
|
4371
|
+
var contentAnimationClassNames = {
|
|
4372
|
+
appear: contentAnimationEnter,
|
|
4373
|
+
appearActive: contentAnimatioEnterActive,
|
|
4374
|
+
enter: contentAnimationEnter,
|
|
4375
|
+
enterActive: contentAnimatioEnterActive,
|
|
4376
|
+
exit: contentAnimatioExit,
|
|
4377
|
+
exitActive: contentAnimatioExitActive
|
|
4378
4378
|
};
|
|
4379
|
-
var opacityEnter$
|
|
4380
|
-
var opacityEnterActive$
|
|
4381
|
-
var opacityExit$
|
|
4382
|
-
var opacityExitActive$
|
|
4383
|
-
var opacityClassNames$
|
|
4384
|
-
appear: opacityEnter$
|
|
4385
|
-
appearActive: opacityEnterActive$
|
|
4386
|
-
enter: opacityEnter$
|
|
4387
|
-
enterActive: opacityEnterActive$
|
|
4388
|
-
exit: opacityExit$
|
|
4389
|
-
exitActive: opacityExitActive$
|
|
4379
|
+
var opacityEnter$1 = "kitt-u_opacityEnter_o1ae40dx";
|
|
4380
|
+
var opacityEnterActive$1 = "kitt-u_opacityEnterActive_o1t4vl7b";
|
|
4381
|
+
var opacityExit$1 = "kitt-u_opacityExit_ogyytm1";
|
|
4382
|
+
var opacityExitActive$1 = "kitt-u_opacityExitActive_o18xvk52";
|
|
4383
|
+
var opacityClassNames$1 = {
|
|
4384
|
+
appear: opacityEnter$1,
|
|
4385
|
+
appearActive: opacityEnterActive$1,
|
|
4386
|
+
enter: opacityEnter$1,
|
|
4387
|
+
enterActive: opacityEnterActive$1,
|
|
4388
|
+
exit: opacityExit$1,
|
|
4389
|
+
exitActive: opacityExitActive$1
|
|
4390
4390
|
};
|
|
4391
4391
|
function CardModalAnimation(_ref) {
|
|
4392
4392
|
var children = _ref.children,
|
|
@@ -4420,7 +4420,7 @@ function CardModalAnimation(_ref) {
|
|
|
4420
4420
|
children: [/*#__PURE__*/jsx(CSSTransition, _objectSpread(_objectSpread({}, sharedProps), {}, {
|
|
4421
4421
|
nodeRef: overlayRef,
|
|
4422
4422
|
timeout: isAnimationEnabled ? animation.overlay.duration : 0,
|
|
4423
|
-
classNames: opacityClassNames$
|
|
4423
|
+
classNames: opacityClassNames$1,
|
|
4424
4424
|
children: /*#__PURE__*/jsx(Overlay, {
|
|
4425
4425
|
ref: overlayRef,
|
|
4426
4426
|
onPress: onClose
|
|
@@ -4428,7 +4428,7 @@ function CardModalAnimation(_ref) {
|
|
|
4428
4428
|
})), /*#__PURE__*/jsx(CSSTransition, _objectSpread(_objectSpread({}, sharedProps), {}, {
|
|
4429
4429
|
nodeRef: contentRef,
|
|
4430
4430
|
timeout: isAnimationEnabled ? animation.content.duration : 0,
|
|
4431
|
-
classNames: contentAnimationClassNames
|
|
4431
|
+
classNames: contentAnimationClassNames,
|
|
4432
4432
|
onEnter: onEnter,
|
|
4433
4433
|
onEntered: onEntered,
|
|
4434
4434
|
onExit: onExit,
|
|
@@ -4963,95 +4963,174 @@ var ChoicesElements = {
|
|
|
4963
4963
|
ButtonChoices: ButtonChoices
|
|
4964
4964
|
};
|
|
4965
4965
|
|
|
4966
|
-
|
|
4967
|
-
var
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
var
|
|
4971
|
-
var
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
var
|
|
4983
|
-
var
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4966
|
+
function NativeOpacityAnimation(_ref) {
|
|
4967
|
+
var visible = _ref.visible,
|
|
4968
|
+
children = _ref.children,
|
|
4969
|
+
onExited = _ref.onExited;
|
|
4970
|
+
var theme = useTheme();
|
|
4971
|
+
var hasRunAnimationRef = useRef(false);
|
|
4972
|
+
useEffect(function () {
|
|
4973
|
+
if (visible) {
|
|
4974
|
+
hasRunAnimationRef.current = true;
|
|
4975
|
+
}
|
|
4976
|
+
}, [visible]);
|
|
4977
|
+
function handleAnimationFinished() {
|
|
4978
|
+
if (!visible && hasRunAnimationRef.current) {
|
|
4979
|
+
onExited();
|
|
4980
|
+
}
|
|
4981
|
+
}
|
|
4982
|
+
var opacityStyle = useAnimatedStyle(function () {
|
|
4983
|
+
var _theme$kitt$dialogMod = theme.kitt.dialogModal.animation.overlay,
|
|
4984
|
+
duration = _theme$kitt$dialogMod.duration,
|
|
4985
|
+
easing = _theme$kitt$dialogMod.easing;
|
|
4986
|
+
var x1 = easing.x1,
|
|
4987
|
+
y1 = easing.y1,
|
|
4988
|
+
x2 = easing.x2,
|
|
4989
|
+
y2 = easing.y2;
|
|
4990
|
+
return {
|
|
4991
|
+
opacity: withTiming(visible ? 1 : 0, {
|
|
4992
|
+
duration: duration,
|
|
4993
|
+
easing: Easing$1.bezier(x1, y1, x2, y2)
|
|
4994
|
+
}, function (isFinished) {
|
|
4995
|
+
if (!isFinished) return;
|
|
4996
|
+
runOnJS(handleAnimationFinished)();
|
|
4997
|
+
})
|
|
4998
|
+
};
|
|
4999
|
+
}, [theme, visible, handleAnimationFinished]);
|
|
5000
|
+
return /*#__PURE__*/jsx(Animated$1.View, {
|
|
5001
|
+
style: [StyleSheet.absoluteFillObject, opacityStyle],
|
|
5002
|
+
children: children
|
|
5003
|
+
});
|
|
5004
|
+
}
|
|
5005
|
+
|
|
5006
|
+
function NativeRotationAnimation(_ref) {
|
|
5007
|
+
var visible = _ref.visible,
|
|
5008
|
+
children = _ref.children,
|
|
5009
|
+
onEntered = _ref.onEntered,
|
|
5010
|
+
onExited = _ref.onExited;
|
|
5011
|
+
var theme = useTheme();
|
|
5012
|
+
var hasRunAnimationRef = useRef(false);
|
|
5013
|
+
var rotation = useSharedValue(0.8);
|
|
5014
|
+
useEffect(function () {
|
|
5015
|
+
if (visible) {
|
|
5016
|
+
hasRunAnimationRef.current = true;
|
|
5017
|
+
}
|
|
5018
|
+
}, [visible]);
|
|
5019
|
+
function handleAnimationFinished() {
|
|
5020
|
+
if (visible) {
|
|
5021
|
+
if (onEntered) onEntered();
|
|
5022
|
+
}
|
|
5023
|
+
if (!visible && hasRunAnimationRef.current) onExited();
|
|
5024
|
+
}
|
|
5025
|
+
var animatedStyle = useAnimatedStyle(function () {
|
|
5026
|
+
var _theme$kitt$dialogMod = theme.kitt.dialogModal.animation.content,
|
|
5027
|
+
duration = _theme$kitt$dialogMod.duration,
|
|
5028
|
+
easing = _theme$kitt$dialogMod.easing;
|
|
5029
|
+
var x1 = easing.x1,
|
|
5030
|
+
y1 = easing.y1,
|
|
5031
|
+
x2 = easing.x2,
|
|
5032
|
+
y2 = easing.y2;
|
|
5033
|
+
rotation.value = withTiming(visible ? 0 : 5, {
|
|
5034
|
+
duration: duration,
|
|
5035
|
+
easing: Easing$1.bezier(x1, y1, x2, y2)
|
|
5036
|
+
}, function (isFinished) {
|
|
5037
|
+
if (!isFinished) return;
|
|
5038
|
+
runOnJS(handleAnimationFinished)();
|
|
5039
|
+
});
|
|
5040
|
+
return {
|
|
5041
|
+
opacity: withTiming(visible ? 1 : 0, {
|
|
5042
|
+
duration: duration,
|
|
5043
|
+
easing: Easing$1.bezier(x1, y1, x2, y2)
|
|
5044
|
+
}),
|
|
5045
|
+
transform: [{
|
|
5046
|
+
scale: withTiming(visible ? 1 : 0.8, {
|
|
5047
|
+
duration: duration,
|
|
5048
|
+
easing: Easing$1.bezier(x1, y1, x2, y2)
|
|
5049
|
+
})
|
|
5050
|
+
}, {
|
|
5051
|
+
rotateZ: "".concat(rotation.value, "deg")
|
|
5052
|
+
}]
|
|
5053
|
+
};
|
|
5054
|
+
}, [theme, visible, rotation, handleAnimationFinished]);
|
|
5055
|
+
return /*#__PURE__*/jsx(Animated$1.View, {
|
|
5056
|
+
style: [animatedStyle],
|
|
5057
|
+
children: children
|
|
5058
|
+
});
|
|
5059
|
+
}
|
|
5060
|
+
|
|
4991
5061
|
function DialogModalAnimation(_ref) {
|
|
4992
|
-
var
|
|
4993
|
-
|
|
4994
|
-
appear = _ref$appear === void 0 ? true : _ref$appear,
|
|
4995
|
-
visible = _ref.visible,
|
|
4996
|
-
_ref$unmountOnExit = _ref.unmountOnExit,
|
|
4997
|
-
unmountOnExit = _ref$unmountOnExit === void 0 ? true : _ref$unmountOnExit,
|
|
4998
|
-
_ref$isAnimationEnabl = _ref.isAnimationEnabled,
|
|
4999
|
-
isAnimationEnabled = _ref$isAnimationEnabl === void 0 ? true : _ref$isAnimationEnabl,
|
|
5062
|
+
var visible = _ref.visible,
|
|
5063
|
+
children = _ref.children,
|
|
5000
5064
|
onEnter = _ref.onEnter,
|
|
5001
5065
|
onEntered = _ref.onEntered,
|
|
5002
5066
|
onExit = _ref.onExit,
|
|
5003
5067
|
onExited = _ref.onExited,
|
|
5004
|
-
onClose = _ref.onClose
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
var
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5068
|
+
onClose = _ref.onClose;
|
|
5069
|
+
var _useState = useState(visible),
|
|
5070
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
5071
|
+
isModalVisible = _useState2[0],
|
|
5072
|
+
setIsModalVisible = _useState2[1];
|
|
5073
|
+
var _useState3 = useState(false),
|
|
5074
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
5075
|
+
isContentVisible = _useState4[0],
|
|
5076
|
+
setIsContentVisible = _useState4[1];
|
|
5077
|
+
var handleAnimationExited = function () {
|
|
5078
|
+
setIsModalVisible(false);
|
|
5079
|
+
// Android doesn't handle the onDismiss callback on the modal, we need to call it manually
|
|
5016
5080
|
};
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5081
|
+
useEffect(function () {
|
|
5082
|
+
if (!(!visible && isContentVisible)) return;
|
|
5083
|
+
if (onExit) onExit();
|
|
5084
|
+
setIsContentVisible(false);
|
|
5085
|
+
}, [visible, isContentVisible, onExit]);
|
|
5086
|
+
return /*#__PURE__*/jsx(Modal, {
|
|
5087
|
+
transparent: true,
|
|
5088
|
+
supportedOrientations: ['landscape', 'portrait'],
|
|
5089
|
+
visible: isModalVisible,
|
|
5090
|
+
onShow: function () {
|
|
5091
|
+
if (onEnter) onEnter();
|
|
5092
|
+
setIsContentVisible(true);
|
|
5093
|
+
},
|
|
5094
|
+
onDismiss: function () {
|
|
5095
|
+
if (onExited) onExited();
|
|
5096
|
+
},
|
|
5097
|
+
children: /*#__PURE__*/jsxs(View
|
|
5098
|
+
// This is an ugly workaround to make the Modal calculate its height correctly on Android.
|
|
5099
|
+
// This ugly workaround is used in FullScreenModalAnimation and CardModalAnimation as well
|
|
5100
|
+
// TODO [expo@>=53]: Check if still needed
|
|
5101
|
+
, {
|
|
5102
|
+
height: undefined,
|
|
5103
|
+
position: "relative",
|
|
5104
|
+
flexGrow: 1,
|
|
5105
|
+
justifyContent: "center",
|
|
5106
|
+
alignItems: "center",
|
|
5107
|
+
children: [/*#__PURE__*/jsx(NativeOpacityAnimation, {
|
|
5108
|
+
visible: isContentVisible,
|
|
5109
|
+
onExited: handleAnimationExited,
|
|
5110
|
+
children: /*#__PURE__*/jsx(Overlay, {
|
|
5111
|
+
onPress: onClose
|
|
5112
|
+
})
|
|
5113
|
+
}), /*#__PURE__*/jsx(NativeRotationAnimation, {
|
|
5114
|
+
visible: isContentVisible,
|
|
5115
|
+
onExited: handleAnimationExited,
|
|
5116
|
+
onEntered: onEntered,
|
|
5117
|
+
children: /*#__PURE__*/jsx(View, {
|
|
5118
|
+
paddingX: "kitt.dialogModal.overlayPadding.horizontal",
|
|
5119
|
+
paddingY: "kitt.dialogModal.overlayPadding.vertical",
|
|
5120
|
+
children: children
|
|
5121
|
+
})
|
|
5122
|
+
})]
|
|
5123
|
+
})
|
|
5124
|
+
});
|
|
5046
5125
|
}
|
|
5047
5126
|
|
|
5048
|
-
var _excluded$
|
|
5127
|
+
var _excluded$C = ["children", "visible", "onClose", "onExited"];
|
|
5049
5128
|
function DialogModalBehaviour(_ref) {
|
|
5050
5129
|
var children = _ref.children,
|
|
5051
5130
|
visible = _ref.visible,
|
|
5052
5131
|
onClose = _ref.onClose,
|
|
5053
5132
|
onExited = _ref.onExited,
|
|
5054
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5133
|
+
props = _objectWithoutProperties(_ref, _excluded$C);
|
|
5055
5134
|
var _useState = useState(visible),
|
|
5056
5135
|
_useState2 = _slicedToArray(_useState, 2),
|
|
5057
5136
|
isModalBehaviourVisible = _useState2[0],
|
|
@@ -5082,7 +5161,7 @@ function DialogModalBehaviour(_ref) {
|
|
|
5082
5161
|
});
|
|
5083
5162
|
}
|
|
5084
5163
|
|
|
5085
|
-
var _excluded$
|
|
5164
|
+
var _excluded$B = ["stretch"];
|
|
5086
5165
|
function DialogModal(_ref) {
|
|
5087
5166
|
var illustration = _ref.illustration,
|
|
5088
5167
|
title = _ref.title,
|
|
@@ -5122,7 +5201,7 @@ DialogModal.ModalBehaviour = DialogModalBehaviour;
|
|
|
5122
5201
|
function DialogModalButton(_ref2) {
|
|
5123
5202
|
var _ref2$stretch = _ref2.stretch,
|
|
5124
5203
|
stretch = _ref2$stretch === void 0 ? true : _ref2$stretch,
|
|
5125
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
5204
|
+
props = _objectWithoutProperties(_ref2, _excluded$B);
|
|
5126
5205
|
return /*#__PURE__*/jsx(Actions.Button, _objectSpread({
|
|
5127
5206
|
stretch: stretch
|
|
5128
5207
|
}, props));
|
|
@@ -5159,7 +5238,7 @@ function Emoji(_ref) {
|
|
|
5159
5238
|
});
|
|
5160
5239
|
}
|
|
5161
5240
|
|
|
5162
|
-
var _excluded$
|
|
5241
|
+
var _excluded$A = ["as", "appScheme", "appValue", "onPress", "onOpenAppError"],
|
|
5163
5242
|
_excluded2$5 = ["phoneNumber", "children"],
|
|
5164
5243
|
_excluded3$4 = ["phoneNumber", "children"],
|
|
5165
5244
|
_excluded4$3 = ["emailAddress", "children"];
|
|
@@ -5169,7 +5248,7 @@ function ExternalAppLink(_ref) {
|
|
|
5169
5248
|
appValue = _ref.appValue,
|
|
5170
5249
|
onPress = _ref.onPress,
|
|
5171
5250
|
onOpenAppError = _ref.onOpenAppError,
|
|
5172
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5251
|
+
rest = _objectWithoutProperties(_ref, _excluded$A);
|
|
5173
5252
|
var href = "".concat(appScheme, ":").concat(appValue);
|
|
5174
5253
|
var handleOnPress = /*#__PURE__*/function () {
|
|
5175
5254
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
|
|
@@ -5264,14 +5343,14 @@ var defaultOpenLinkBehavior = {
|
|
|
5264
5343
|
web: 'targetBlank'
|
|
5265
5344
|
};
|
|
5266
5345
|
|
|
5267
|
-
var _excluded$
|
|
5346
|
+
var _excluded$z = ["as", "href", "openLinkBehavior", "onPress"];
|
|
5268
5347
|
function ExternalLink(_ref) {
|
|
5269
5348
|
var Component = _ref.as,
|
|
5270
5349
|
href = _ref.href,
|
|
5271
5350
|
_ref$openLinkBehavior = _ref.openLinkBehavior,
|
|
5272
5351
|
openLinkBehavior = _ref$openLinkBehavior === void 0 ? defaultOpenLinkBehavior : _ref$openLinkBehavior,
|
|
5273
5352
|
onPress = _ref.onPress,
|
|
5274
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5353
|
+
rest = _objectWithoutProperties(_ref, _excluded$z);
|
|
5275
5354
|
return /*#__PURE__*/jsx(Component, _objectSpread(_objectSpread({}, rest), {}, {
|
|
5276
5355
|
accessibilityRole: "link",
|
|
5277
5356
|
href: href,
|
|
@@ -5347,7 +5426,7 @@ function InputTextContainer(props) {
|
|
|
5347
5426
|
}, props));
|
|
5348
5427
|
}
|
|
5349
5428
|
|
|
5350
|
-
var _excluded$
|
|
5429
|
+
var _excluded$y = ["id", "right", "state", "variant", "internalForceState", "disabled", "autoCorrect", "textContentType", "autoComplete", "inputMode", "multiline", "height", "onSubmitEditing"];
|
|
5351
5430
|
var InputText = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
5352
5431
|
var id = _ref.id,
|
|
5353
5432
|
right = _ref.right;
|
|
@@ -5368,7 +5447,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5368
5447
|
multiline = _ref.multiline,
|
|
5369
5448
|
height = _ref.height,
|
|
5370
5449
|
onSubmitEditing = _ref.onSubmitEditing,
|
|
5371
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5450
|
+
props = _objectWithoutProperties(_ref, _excluded$y);
|
|
5372
5451
|
var theme = useTheme();
|
|
5373
5452
|
var fontSizeForNativeBase = createNativeBaseFontSize({
|
|
5374
5453
|
base: 'body-m'
|
|
@@ -5492,12 +5571,12 @@ function AutocompleteItemsListContainer(_ref) {
|
|
|
5492
5571
|
});
|
|
5493
5572
|
}
|
|
5494
5573
|
|
|
5495
|
-
var _excluded$
|
|
5574
|
+
var _excluded$x = ["children", "testID"];
|
|
5496
5575
|
function AutocompleteOption(_ref) {
|
|
5497
5576
|
var children = _ref.children,
|
|
5498
5577
|
_ref$testID = _ref.testID,
|
|
5499
5578
|
testID = _ref$testID === void 0 ? 'kitt.Autocomplete.option' : _ref$testID,
|
|
5500
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5579
|
+
props = _objectWithoutProperties(_ref, _excluded$x);
|
|
5501
5580
|
return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
|
|
5502
5581
|
paddingX: {
|
|
5503
5582
|
base: 'kitt.2',
|
|
@@ -5510,7 +5589,7 @@ function AutocompleteOption(_ref) {
|
|
|
5510
5589
|
}));
|
|
5511
5590
|
}
|
|
5512
5591
|
|
|
5513
|
-
var _excluded$
|
|
5592
|
+
var _excluded$w = ["children", "name", "disabled", "placeholder", "isInitialOpen", "initialValue", "containerProps", "filterItemBasedOnCurrentInputValue", "checkSelectedItem", "itemToString", "right", "onChange", "onFocus", "onBlur", "onInputChange", "onSelectItem", "onOuterPress", "errorElement", "emptyResultsElement", "inputTestID", "listContainerTestID", "zIndex", "maxItemContainerHeight"],
|
|
5514
5593
|
_excluded2$4 = ["onClick", "onPress"],
|
|
5515
5594
|
_excluded3$3 = ["onKeyDown", "onFocus", "onBlur", "onChange"],
|
|
5516
5595
|
_excluded4$2 = ["onClick", "onPress", "role", "aria-selected"];
|
|
@@ -5544,7 +5623,7 @@ function Autocomplete(_ref) {
|
|
|
5544
5623
|
_ref$zIndex = _ref.zIndex,
|
|
5545
5624
|
zIndex = _ref$zIndex === void 0 ? 1000 : _ref$zIndex,
|
|
5546
5625
|
maxItemContainerHeight = _ref.maxItemContainerHeight,
|
|
5547
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5626
|
+
props = _objectWithoutProperties(_ref, _excluded$w);
|
|
5548
5627
|
var childrenArray = Children.toArray(children);
|
|
5549
5628
|
var items = childrenArray.filter(isReactElement).map(function (child) {
|
|
5550
5629
|
return {
|
|
@@ -5751,7 +5830,7 @@ function getBorderColor$1(_ref) {
|
|
|
5751
5830
|
return 'kitt.forms.checkbox.default.borderColor';
|
|
5752
5831
|
}
|
|
5753
5832
|
|
|
5754
|
-
var _excluded$
|
|
5833
|
+
var _excluded$v = ["checked", "hitSlop", "children", "disabled", "onChange", "onBlur", "onFocus"];
|
|
5755
5834
|
var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
5756
5835
|
var checked = _ref.checked,
|
|
5757
5836
|
_ref$hitSlop = _ref.hitSlop,
|
|
@@ -5761,7 +5840,7 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
5761
5840
|
onChange = _ref.onChange,
|
|
5762
5841
|
onBlur = _ref.onBlur,
|
|
5763
5842
|
onFocus = _ref.onFocus,
|
|
5764
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5843
|
+
props = _objectWithoutProperties(_ref, _excluded$v);
|
|
5765
5844
|
var theme = useTheme();
|
|
5766
5845
|
return /*#__PURE__*/jsx(Pressable, _objectSpread(_objectSpread({
|
|
5767
5846
|
hitSlop: hitSlop
|
|
@@ -6077,7 +6156,7 @@ function PartContainer(_ref) {
|
|
|
6077
6156
|
});
|
|
6078
6157
|
}
|
|
6079
6158
|
|
|
6080
|
-
var _excluded$
|
|
6159
|
+
var _excluded$u = ["id", "value", "testID", "stretch", "placeholder", "minDate", "maxDate", "disabled", "isFocusedInternal", "isHoveredInternal", "isPressedInternal", "enterKeyHint", "onChange", "onBlur", "onFocus", "onSubmitEditing"];
|
|
6081
6160
|
var KeyboardDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
6082
6161
|
var id = _ref.id,
|
|
6083
6162
|
value = _ref.value,
|
|
@@ -6095,7 +6174,7 @@ var KeyboardDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6095
6174
|
onBlur = _ref.onBlur,
|
|
6096
6175
|
onFocus = _ref.onFocus,
|
|
6097
6176
|
onSubmitEditing = _ref.onSubmitEditing;
|
|
6098
|
-
_objectWithoutProperties(_ref, _excluded$
|
|
6177
|
+
_objectWithoutProperties(_ref, _excluded$u);
|
|
6099
6178
|
var monthRef = useRef(null);
|
|
6100
6179
|
var yearRef = useRef(null);
|
|
6101
6180
|
var defaultValue = value;
|
|
@@ -6235,10 +6314,10 @@ var KeyboardDatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6235
6314
|
});
|
|
6236
6315
|
});
|
|
6237
6316
|
|
|
6238
|
-
var _excluded$
|
|
6317
|
+
var _excluded$t = ["value"];
|
|
6239
6318
|
var DatePicker = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
6240
6319
|
var value = _ref.value,
|
|
6241
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
6320
|
+
props = _objectWithoutProperties(_ref, _excluded$t);
|
|
6242
6321
|
// in apps, final-form can give a string value that will break the component
|
|
6243
6322
|
var currentValue = value || undefined;
|
|
6244
6323
|
return /*#__PURE__*/jsx(KeyboardDatePicker, _objectSpread(_objectSpread({
|
|
@@ -6349,6 +6428,84 @@ function ImagePicker(_ref) {
|
|
|
6349
6428
|
});
|
|
6350
6429
|
}
|
|
6351
6430
|
|
|
6431
|
+
function InputAddressOption(_ref) {
|
|
6432
|
+
var item = _ref.item,
|
|
6433
|
+
mainText = _ref.mainText,
|
|
6434
|
+
secondaryText = _ref.secondaryText;
|
|
6435
|
+
var sharedTransform = {
|
|
6436
|
+
style: {
|
|
6437
|
+
transform: 'translateY(4px)'
|
|
6438
|
+
}
|
|
6439
|
+
};
|
|
6440
|
+
return /*#__PURE__*/jsx(Autocomplete.Option, {
|
|
6441
|
+
item: item,
|
|
6442
|
+
testID: "kitt.InputAddressOption.item",
|
|
6443
|
+
children: /*#__PURE__*/jsxs(HStack, {
|
|
6444
|
+
space: "kitt.2",
|
|
6445
|
+
children: [/*#__PURE__*/jsx(View, {
|
|
6446
|
+
_web: sharedTransform,
|
|
6447
|
+
_ios: sharedTransform,
|
|
6448
|
+
_android: sharedTransform,
|
|
6449
|
+
children: /*#__PURE__*/jsx(TypographyIcon, {
|
|
6450
|
+
icon: /*#__PURE__*/jsx(MapPinRegularIcon, {}),
|
|
6451
|
+
color: "black"
|
|
6452
|
+
})
|
|
6453
|
+
}), /*#__PURE__*/jsx(View, {
|
|
6454
|
+
flexShrink: 1,
|
|
6455
|
+
children: /*#__PURE__*/jsxs(Typography.Text, {
|
|
6456
|
+
children: [/*#__PURE__*/jsx(Typography.Text, {
|
|
6457
|
+
variant: "bold",
|
|
6458
|
+
children: mainText
|
|
6459
|
+
}), secondaryText ? /*#__PURE__*/jsxs(Typography.Text, {
|
|
6460
|
+
color: "black-light",
|
|
6461
|
+
variant: "bold",
|
|
6462
|
+
children: [' ', secondaryText]
|
|
6463
|
+
}) : null]
|
|
6464
|
+
})
|
|
6465
|
+
})]
|
|
6466
|
+
})
|
|
6467
|
+
});
|
|
6468
|
+
}
|
|
6469
|
+
|
|
6470
|
+
var _excluded$s = ["errorElement", "initialValue", "emptyResultsElement", "onChange", "items", "isLoading", "hasError", "onInputChange", "onSelectItem", "convertInitialValue", "renderItem"];
|
|
6471
|
+
function InputAddress(_ref) {
|
|
6472
|
+
var errorElement = _ref.errorElement,
|
|
6473
|
+
initialValue = _ref.initialValue,
|
|
6474
|
+
emptyResultsElement = _ref.emptyResultsElement,
|
|
6475
|
+
_onChange = _ref.onChange,
|
|
6476
|
+
items = _ref.items,
|
|
6477
|
+
isLoading = _ref.isLoading,
|
|
6478
|
+
hasError = _ref.hasError,
|
|
6479
|
+
_onInputChange = _ref.onInputChange,
|
|
6480
|
+
onSelectItem = _ref.onSelectItem,
|
|
6481
|
+
convertInitialValue = _ref.convertInitialValue,
|
|
6482
|
+
renderItem = _ref.renderItem,
|
|
6483
|
+
props = _objectWithoutProperties(_ref, _excluded$s);
|
|
6484
|
+
var formattedInitialValue = initialValue ? convertInitialValue(initialValue) : undefined;
|
|
6485
|
+
return /*#__PURE__*/jsx(Autocomplete, _objectSpread(_objectSpread({}, props), {}, {
|
|
6486
|
+
initialValue: formattedInitialValue,
|
|
6487
|
+
right: isLoading ? /*#__PURE__*/jsx(Icon, {
|
|
6488
|
+
icon: /*#__PURE__*/jsx(LoaderIcon, {}),
|
|
6489
|
+
color: "kitt.black"
|
|
6490
|
+
}) : undefined,
|
|
6491
|
+
errorElement: hasError ? errorElement : null,
|
|
6492
|
+
emptyResultsElement: items.length === 0 ? emptyResultsElement : null,
|
|
6493
|
+
onInputChange: function (value) {
|
|
6494
|
+
return _onInputChange(value);
|
|
6495
|
+
},
|
|
6496
|
+
onChange: function (item) {
|
|
6497
|
+
return onSelectItem(item, _onChange);
|
|
6498
|
+
},
|
|
6499
|
+
children: items.map(function (item) {
|
|
6500
|
+
var itemElement = renderItem(item);
|
|
6501
|
+
return /*#__PURE__*/cloneElement(itemElement, {
|
|
6502
|
+
item: item
|
|
6503
|
+
});
|
|
6504
|
+
})
|
|
6505
|
+
}));
|
|
6506
|
+
}
|
|
6507
|
+
InputAddress.Option = InputAddressOption;
|
|
6508
|
+
|
|
6352
6509
|
var GoogleMapsApiKeyContext = /*#__PURE__*/createContext(undefined);
|
|
6353
6510
|
function GoogleMapsApiKeyProvider(_ref) {
|
|
6354
6511
|
var children = _ref.children,
|
|
@@ -6754,7 +6911,7 @@ function useGoogleMapsAutocomplete() {
|
|
|
6754
6911
|
return context;
|
|
6755
6912
|
}
|
|
6756
6913
|
|
|
6757
|
-
function
|
|
6914
|
+
function InputAddressOptionLegacy(_ref) {
|
|
6758
6915
|
var item = _ref.item;
|
|
6759
6916
|
var sharedTransform = {
|
|
6760
6917
|
style: {
|
|
@@ -6763,7 +6920,7 @@ function InputAddressOption(_ref) {
|
|
|
6763
6920
|
};
|
|
6764
6921
|
return /*#__PURE__*/jsx(Autocomplete.Option, {
|
|
6765
6922
|
item: item,
|
|
6766
|
-
testID: "kitt.
|
|
6923
|
+
testID: "kitt.InputAddressOptionLegacy.item",
|
|
6767
6924
|
children: /*#__PURE__*/jsxs(HStack, {
|
|
6768
6925
|
space: "kitt.2",
|
|
6769
6926
|
children: [/*#__PURE__*/jsx(View, {
|
|
@@ -6823,7 +6980,7 @@ function formatInitialValueToAutocompletePrediction(address, placeId) {
|
|
|
6823
6980
|
}
|
|
6824
6981
|
|
|
6825
6982
|
var _excluded$r = ["initialValue", "itemToString", "errorElement", "emptyResultsElement", "onChange"];
|
|
6826
|
-
function
|
|
6983
|
+
function InputAddressLegacy(_ref) {
|
|
6827
6984
|
var initialValue = _ref.initialValue,
|
|
6828
6985
|
_ref$itemToString = _ref.itemToString,
|
|
6829
6986
|
itemToString = _ref$itemToString === void 0 ? defaultItemToString : _ref$itemToString,
|
|
@@ -6857,13 +7014,13 @@ function InputAddress(_ref) {
|
|
|
6857
7014
|
onSelectItem(v, _onChange);
|
|
6858
7015
|
},
|
|
6859
7016
|
children: state.items.map(function (item) {
|
|
6860
|
-
return /*#__PURE__*/jsx(
|
|
7017
|
+
return /*#__PURE__*/jsx(InputAddressOptionLegacy, {
|
|
6861
7018
|
item: item
|
|
6862
7019
|
}, item.place_id);
|
|
6863
7020
|
})
|
|
6864
7021
|
}));
|
|
6865
7022
|
}
|
|
6866
|
-
|
|
7023
|
+
InputAddressLegacy.Option = InputAddressOptionLegacy;
|
|
6867
7024
|
|
|
6868
7025
|
var InputEmail = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
6869
7026
|
return /*#__PURE__*/jsx(InputText, _objectSpread({
|
|
@@ -13833,5 +13990,5 @@ function VerticalSteps(_ref) {
|
|
|
13833
13990
|
VerticalSteps.Step = Step;
|
|
13834
13991
|
VerticalSteps.BorderlessStep = BorderlessStep;
|
|
13835
13992
|
|
|
13836
|
-
export { ActionCard, Actions, Autocomplete, Avatar, BottomSheet, Button, ButtonBadge, CardModal, Center, Checkbox, ChoicesElements, ChromaticReducedMotionDecorator, 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, NavigationBottomSheet, NavigationModal, Notification, Overlay, PageLoader, Picker, Pressable, RadioWithRef as Radio, RadioButtonGroup, ScrollView, DeprecatedSection as Section, SectionList, SegmentedProgressBar, Skeleton, SpinningIcon, Stack, StaticMap, Sticker, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, SwitchBreakpoints, TabBar, Tag, TextArea, TimePicker, ToastComponent, Toggle, Tooltip, TopNavBar, 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 };
|
|
13993
|
+
export { ActionCard, Actions, Autocomplete, Avatar, BottomSheet, Button, ButtonBadge, CardModal, Center, Checkbox, ChoicesElements, ChromaticReducedMotionDecorator, CloseIconButton, DatePicker, DialogModal, DocumentPicker, Emoji, ExternalAppLink, ExternalLink, FilePicker, FlatList, Flex, FullscreenModal, GoogleMapsApiKeyProvider, GoogleMapsAutocompleteProvider, GroupTags, HStack, Highlight, Icon, IconButton, Image, ImagePicker, InfoCard, InputAddress, InputAddressLegacy, 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, NavigationBottomSheet, NavigationModal, Notification, Overlay, PageLoader, Picker, Pressable, RadioWithRef as Radio, RadioButtonGroup, ScrollView, DeprecatedSection as Section, SectionList, SegmentedProgressBar, Skeleton, SpinningIcon, Stack, StaticMap, Sticker, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, SwitchBreakpoints, TabBar, Tag, TextArea, TimePicker, ToastComponent, Toggle, Tooltip, TopNavBar, 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 };
|
|
13837
13994
|
//# sourceMappingURL=index.es.web.js.map
|