@ornikar/kitt-universal 29.3.2 → 29.4.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 +9 -0
- package/dist/index-metro.es.android.js +1 -1
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +1 -1
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +1 -1
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.css +0 -1
- package/dist/index-node-22.17.cjs.web.js +30 -4
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +1 -1
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.css +0 -1
- package/dist/index-node-22.17.es.web.mjs +54 -28
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +54 -28
- package/dist/index.es.web.js.map +1 -1
- package/dist/styles.css +0 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/definitions/Icon/SpinningIcon.web.d.ts +0 -4
- package/dist/definitions/Icon/SpinningIcon.web.d.ts.map +0 -1
package/dist/index.es.web.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
-
import { useContext, createContext, forwardRef, useMemo, cloneElement,
|
|
3
|
+
import { useContext, createContext, forwardRef, useMemo, cloneElement, useRef, useEffect, useState, Children, useReducer, useCallback, Fragment as Fragment$1 } from 'react';
|
|
4
4
|
import { View as View$1, ScrollView as ScrollView$1, Pressable as Pressable$1, Image as Image$1, FlatList as FlatList$1, SectionList as SectionList$1, Stack as Stack$1, VStack as VStack$1, HStack as HStack$1, Center as Center$1, useBreakpointValue as useBreakpointValue$1, useSx, Text, Input, NativeBaseProvider, extendTheme } from 'native-base';
|
|
5
5
|
export { useClipboard, useContrastText, useMediaQuery, useSx, useToken } from 'native-base';
|
|
6
6
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
@@ -11,10 +11,10 @@ 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, StyleSheet, useWindowDimensions } from 'react-native';
|
|
15
|
+
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
14
16
|
import { createPortal } from 'react-dom';
|
|
15
17
|
import { CSSTransition } from 'react-transition-group';
|
|
16
|
-
import { ScrollView as ScrollView$2, View as View$2, Linking, Pressable as Pressable$2, StyleSheet, useWindowDimensions } from 'react-native';
|
|
17
|
-
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
18
18
|
import { parse } from '@twemoji/parser';
|
|
19
19
|
import Downshift, { useSelect } from 'downshift';
|
|
20
20
|
import { getDocumentAsync } from 'expo-document-picker';
|
|
@@ -22,7 +22,7 @@ import { launchImageLibraryAsync } from 'expo-image-picker';
|
|
|
22
22
|
import { useDebouncedCallback } from 'use-debounce';
|
|
23
23
|
import { Loader } from '@googlemaps/js-api-loader';
|
|
24
24
|
import { parseNumber, getCountryCallingCode, isValidNumber } from 'libphonenumber-js';
|
|
25
|
-
import Animated, { useAnimatedStyle, withSpring, withTiming, useSharedValue, interpolateColor, Easing, useAnimatedProps, withDelay, withRepeat, interpolate, runOnJS } from 'react-native-reanimated';
|
|
25
|
+
import Animated$1, { useAnimatedStyle, withSpring, withTiming, useSharedValue, interpolateColor, Easing as Easing$1, useAnimatedProps, withDelay, withRepeat, interpolate, runOnJS } 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';
|
|
@@ -3698,15 +3698,41 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3698
3698
|
});
|
|
3699
3699
|
});
|
|
3700
3700
|
|
|
3701
|
-
var spinningIcon = "kitt-u_spinningIcon_ssn8o83";
|
|
3702
3701
|
function SpinningIcon(_ref) {
|
|
3703
3702
|
var icon = _ref.icon,
|
|
3704
3703
|
color = _ref.color;
|
|
3704
|
+
if (process.env.NODE_ENV !== 'production' && !color) {
|
|
3705
|
+
throw new Error("Invalid color passed to SpinningIcon: ".concat(String(color)));
|
|
3706
|
+
}
|
|
3705
3707
|
var clonedIcon = /*#__PURE__*/cloneElement(icon, {
|
|
3706
3708
|
color: color
|
|
3707
3709
|
});
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
+
var animationRef = useRef(new Animated.Value(0));
|
|
3711
|
+
var rotation = animationRef.current.interpolate({
|
|
3712
|
+
inputRange: [0, 1],
|
|
3713
|
+
outputRange: ['0deg', '360deg']
|
|
3714
|
+
});
|
|
3715
|
+
useEffect(function () {
|
|
3716
|
+
if (process.env.NODE_ENV === 'test') return undefined;
|
|
3717
|
+
var animation = Animated.loop(Animated.timing(animationRef.current, {
|
|
3718
|
+
toValue: 1,
|
|
3719
|
+
duration: 1100,
|
|
3720
|
+
easing: Easing.linear,
|
|
3721
|
+
useNativeDriver: "web" !== 'web'
|
|
3722
|
+
}));
|
|
3723
|
+
animation.start();
|
|
3724
|
+
return function () {
|
|
3725
|
+
if (process.env.NODE_ENV === 'test') return undefined;
|
|
3726
|
+
animation.stop();
|
|
3727
|
+
return undefined;
|
|
3728
|
+
};
|
|
3729
|
+
}, []);
|
|
3730
|
+
return /*#__PURE__*/jsx(Animated.View, {
|
|
3731
|
+
style: {
|
|
3732
|
+
transform: [{
|
|
3733
|
+
rotate: rotation
|
|
3734
|
+
}]
|
|
3735
|
+
},
|
|
3710
3736
|
children: clonedIcon
|
|
3711
3737
|
});
|
|
3712
3738
|
}
|
|
@@ -7279,7 +7305,7 @@ var TextArea = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7279
7305
|
base: "body-s",
|
|
7280
7306
|
color: deepPurpleColorPalette['grey.5'],
|
|
7281
7307
|
children: helper
|
|
7282
|
-
}) : null, shouldDisplayLimit ? /*#__PURE__*/jsx(Animated.View, {
|
|
7308
|
+
}) : null, shouldDisplayLimit ? /*#__PURE__*/jsx(Animated$1.View, {
|
|
7283
7309
|
style: limitContainerAnimatedStyle,
|
|
7284
7310
|
children: /*#__PURE__*/jsxs(HStack$1, {
|
|
7285
7311
|
alignItems: "center",
|
|
@@ -7289,7 +7315,7 @@ var TextArea = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
7289
7315
|
variant: "bold",
|
|
7290
7316
|
color: deepPurpleColorPalette['grey.5'],
|
|
7291
7317
|
children: [((_props$value2 = props.value) === null || _props$value2 === void 0 ? void 0 : _props$value2.length) || 0, "/", limit]
|
|
7292
|
-
}), /*#__PURE__*/jsx(Animated.View, {
|
|
7318
|
+
}), /*#__PURE__*/jsx(Animated$1.View, {
|
|
7293
7319
|
style: checkIconAnimatedStyle,
|
|
7294
7320
|
children: /*#__PURE__*/jsx(TypographyIcon, {
|
|
7295
7321
|
icon: /*#__PURE__*/jsx(CheckCircleFillIcon, {}),
|
|
@@ -7360,17 +7386,17 @@ function ToggleAnimated(_ref) {
|
|
|
7360
7386
|
useEffect(function () {
|
|
7361
7387
|
marginLeftAnim.value = withTiming(value ? marginLeft : 0, {
|
|
7362
7388
|
duration: 200,
|
|
7363
|
-
easing: Easing.ease
|
|
7389
|
+
easing: Easing$1.ease
|
|
7364
7390
|
});
|
|
7365
7391
|
}, [value, marginLeftAnim, marginLeft]);
|
|
7366
7392
|
useEffect(function () {
|
|
7367
7393
|
hoverAnim.value = withTiming(isHovered ? value ? -1 : 1 : 0, {
|
|
7368
7394
|
duration: 200,
|
|
7369
|
-
easing: Easing.ease
|
|
7395
|
+
easing: Easing$1.ease
|
|
7370
7396
|
});
|
|
7371
7397
|
hoverBackgroundAnim.value = withTiming(isHovered ? 0 : 1, {
|
|
7372
7398
|
duration: 200,
|
|
7373
|
-
easing: Easing.ease
|
|
7399
|
+
easing: Easing$1.ease
|
|
7374
7400
|
});
|
|
7375
7401
|
}, [isHovered, hoverAnim, value, hoverBackgroundAnim]);
|
|
7376
7402
|
return /*#__PURE__*/jsx(View$1, {
|
|
@@ -7378,7 +7404,7 @@ function ToggleAnimated(_ref) {
|
|
|
7378
7404
|
borderColor: "kitt.forms.toggle.".concat(variant, ".").concat(disabledState, ".").concat(state, ".wrapperBorder.color"),
|
|
7379
7405
|
borderWidth: "kitt.forms.toggle.".concat(variant, ".").concat(disabledState, ".").concat(state, ".wrapperBorder.width"),
|
|
7380
7406
|
borderRadius: "full",
|
|
7381
|
-
children: /*#__PURE__*/jsx(Animated.View, {
|
|
7407
|
+
children: /*#__PURE__*/jsx(Animated$1.View, {
|
|
7382
7408
|
style: [hoverBackgroundTranslate, {
|
|
7383
7409
|
borderColor: theme.kitt.forms.toggle[variant][disabledState][state].border.color,
|
|
7384
7410
|
borderWidth: theme.kitt.forms.toggle[variant][disabledState][state].border.width,
|
|
@@ -7387,7 +7413,7 @@ function ToggleAnimated(_ref) {
|
|
|
7387
7413
|
height: theme.kitt.forms.toggle[variant][disabledState][state].height[size],
|
|
7388
7414
|
padding: size === 'medium' ? 3 : 4
|
|
7389
7415
|
}],
|
|
7390
|
-
children: /*#__PURE__*/jsx(Animated.View, {
|
|
7416
|
+
children: /*#__PURE__*/jsx(Animated$1.View, {
|
|
7391
7417
|
style: [buttonTranslate, hoverTranslate],
|
|
7392
7418
|
children: /*#__PURE__*/jsx(View$1, {
|
|
7393
7419
|
borderRadius: "full",
|
|
@@ -8165,7 +8191,7 @@ var useNativeAnimation = function (_ref) {
|
|
|
8165
8191
|
transform: [{
|
|
8166
8192
|
translateY: withTiming(-4, {
|
|
8167
8193
|
duration: TRANSLATE_Y_DURATION,
|
|
8168
|
-
easing: Easing.linear
|
|
8194
|
+
easing: Easing$1.linear
|
|
8169
8195
|
})
|
|
8170
8196
|
}, {
|
|
8171
8197
|
scale: withTiming(1, {
|
|
@@ -8179,7 +8205,7 @@ var useNativeAnimation = function (_ref) {
|
|
|
8179
8205
|
transform: [{
|
|
8180
8206
|
translateY: withTiming(-10, {
|
|
8181
8207
|
duration: TRANSLATE_Y_DURATION,
|
|
8182
|
-
easing: Easing.linear
|
|
8208
|
+
easing: Easing$1.linear
|
|
8183
8209
|
})
|
|
8184
8210
|
}, {
|
|
8185
8211
|
scale: withTiming(1.3, {
|
|
@@ -8192,7 +8218,7 @@ var useNativeAnimation = function (_ref) {
|
|
|
8192
8218
|
transform: [{
|
|
8193
8219
|
translateY: withTiming(0, {
|
|
8194
8220
|
duration: TRANSLATE_Y_DURATION,
|
|
8195
|
-
easing: Easing.linear
|
|
8221
|
+
easing: Easing$1.linear
|
|
8196
8222
|
})
|
|
8197
8223
|
}, {
|
|
8198
8224
|
scale: withTiming(1, {
|
|
@@ -8247,7 +8273,7 @@ function StaticMapMarker$1(_ref) {
|
|
|
8247
8273
|
alignItems: "center",
|
|
8248
8274
|
width: containerWidth,
|
|
8249
8275
|
height: containerHeight,
|
|
8250
|
-
children: [/*#__PURE__*/jsx(Animated.View, {
|
|
8276
|
+
children: [/*#__PURE__*/jsx(Animated$1.View, {
|
|
8251
8277
|
style: animatedStyle,
|
|
8252
8278
|
children: variant === MapMarkerVariantEnum.MEETING_POINT ? /*#__PURE__*/jsx(SvgMeetingPointMarkerinline, {
|
|
8253
8279
|
width: mpMarkerSvgWidth,
|
|
@@ -11140,7 +11166,7 @@ function Notification(_ref) {
|
|
|
11140
11166
|
});
|
|
11141
11167
|
}
|
|
11142
11168
|
|
|
11143
|
-
var AnimatedCircle = Animated.createAnimatedComponent(Circle$1);
|
|
11169
|
+
var AnimatedCircle = Animated$1.createAnimatedComponent(Circle$1);
|
|
11144
11170
|
function AnimatedLoaderCircle(_ref) {
|
|
11145
11171
|
var color = _ref.color,
|
|
11146
11172
|
progress = _ref.progress;
|
|
@@ -11187,7 +11213,7 @@ function AnimatedBackgroundCircle() {
|
|
|
11187
11213
|
y2 = _fillEasingFunction[3];
|
|
11188
11214
|
progress.value = withDelay(delay, withTiming(1, {
|
|
11189
11215
|
duration: circleBackgroundFillDuration,
|
|
11190
|
-
easing: Easing.bezier(x1, y1, x2, y2)
|
|
11216
|
+
easing: Easing$1.bezier(x1, y1, x2, y2)
|
|
11191
11217
|
}));
|
|
11192
11218
|
}, [progress, animation]);
|
|
11193
11219
|
return /*#__PURE__*/jsx(Svg, {
|
|
@@ -11212,7 +11238,7 @@ function AnimatedFillCircleContainer(_ref) {
|
|
|
11212
11238
|
var delay = animation.delay;
|
|
11213
11239
|
progress.value = withDelay(delay, withRepeat(withTiming(1, {
|
|
11214
11240
|
duration: duration,
|
|
11215
|
-
easing: Easing.linear
|
|
11241
|
+
easing: Easing$1.linear
|
|
11216
11242
|
}), isInfinitAnimation$1));
|
|
11217
11243
|
}, [progress, animation, duration]);
|
|
11218
11244
|
var rotationStyles = useAnimatedStyle(function () {
|
|
@@ -11222,7 +11248,7 @@ function AnimatedFillCircleContainer(_ref) {
|
|
|
11222
11248
|
}]
|
|
11223
11249
|
};
|
|
11224
11250
|
}, [progress]);
|
|
11225
|
-
return /*#__PURE__*/jsx(Animated.View, {
|
|
11251
|
+
return /*#__PURE__*/jsx(Animated$1.View, {
|
|
11226
11252
|
style: [StyleSheet.absoluteFill, rotationStyles],
|
|
11227
11253
|
children: children
|
|
11228
11254
|
});
|
|
@@ -11248,7 +11274,7 @@ function AnimatedFilledCircle() {
|
|
|
11248
11274
|
y2 = _fillEasingFunction[3];
|
|
11249
11275
|
progress.value = withDelay(delay, withRepeat(withTiming(0.8, {
|
|
11250
11276
|
duration: filledCircleFillDuration,
|
|
11251
|
-
easing: Easing.bezier(x1, y1, x2, y2)
|
|
11277
|
+
easing: Easing$1.bezier(x1, y1, x2, y2)
|
|
11252
11278
|
}), isInfinitAnimation, shouldReverse));
|
|
11253
11279
|
}, [progress, animation]);
|
|
11254
11280
|
return /*#__PURE__*/jsx(AnimatedFillCircleContainer, {
|
|
@@ -11621,7 +11647,7 @@ function SkeletonContent(_ref) {
|
|
|
11621
11647
|
if (isLoading) {
|
|
11622
11648
|
sharedX.value = withRepeat(withTiming(1, {
|
|
11623
11649
|
duration: theme.kitt.skeleton.animationDuration,
|
|
11624
|
-
easing: Easing.inOut(Easing.ease)
|
|
11650
|
+
easing: Easing$1.inOut(Easing$1.ease)
|
|
11625
11651
|
}), -1);
|
|
11626
11652
|
}
|
|
11627
11653
|
}, [sharedX, width, isLoading, theme]);
|
|
@@ -11637,7 +11663,7 @@ function SkeletonContent(_ref) {
|
|
|
11637
11663
|
width: "100%",
|
|
11638
11664
|
backgroundColor: "kitt.skeleton.backgroundColor",
|
|
11639
11665
|
borderColor: "kitt.skeleton.flareColor",
|
|
11640
|
-
children: /*#__PURE__*/jsx(Animated.View, {
|
|
11666
|
+
children: /*#__PURE__*/jsx(Animated$1.View, {
|
|
11641
11667
|
style: [StyleSheet.absoluteFill, linearGradientStyle],
|
|
11642
11668
|
children: /*#__PURE__*/jsx(LinearGradient, {
|
|
11643
11669
|
colors: [theme.kitt.skeleton.backgroundColor, theme.kitt.skeleton.flareColor, theme.kitt.skeleton.backgroundColor],
|
|
@@ -12767,7 +12793,7 @@ var typeToIcon = function (type) {
|
|
|
12767
12793
|
}
|
|
12768
12794
|
};
|
|
12769
12795
|
|
|
12770
|
-
var AnimatedView$1 = Animated.createAnimatedComponent(View);
|
|
12796
|
+
var AnimatedView$1 = Animated$1.createAnimatedComponent(View);
|
|
12771
12797
|
function ToastComponent(_ref) {
|
|
12772
12798
|
var title = _ref.title,
|
|
12773
12799
|
description = _ref.description,
|
|
@@ -12802,7 +12828,7 @@ function ToastComponent(_ref) {
|
|
|
12802
12828
|
width.value = 100;
|
|
12803
12829
|
width.value = withTiming(0, {
|
|
12804
12830
|
duration: toastTimeout,
|
|
12805
|
-
easing: Easing.bezier(0, 0, 0.58, 1)
|
|
12831
|
+
easing: Easing$1.bezier(0, 0, 0.58, 1)
|
|
12806
12832
|
}, function () {
|
|
12807
12833
|
runOnJS(handleHideToast)();
|
|
12808
12834
|
});
|
|
@@ -13371,7 +13397,7 @@ function useStepAnimations(_ref) {
|
|
|
13371
13397
|
};
|
|
13372
13398
|
}
|
|
13373
13399
|
|
|
13374
|
-
var AnimatedView = Animated.createAnimatedComponent(View);
|
|
13400
|
+
var AnimatedView = Animated$1.createAnimatedComponent(View);
|
|
13375
13401
|
function BorderlessStep(_ref) {
|
|
13376
13402
|
var description = _ref.description,
|
|
13377
13403
|
title = _ref.title,
|