@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
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
.kitt-u_spinningIcon_ssn8o83 > svg{-webkit-animation:spin-kitt-u_spinningIcon_ssn8o83 1.1s infinite linear;animation:spin-kitt-u_spinningIcon_ssn8o83 1.1s infinite linear;}@-webkit-keyframes spin-kitt-u_spinningIcon_ssn8o83{0%{-webkit-transform:rotate(-1deg);-ms-transform:rotate(-1deg);transform:rotate(-1deg);}100%{-webkit-transform:rotate(359deg);-ms-transform:rotate(359deg);transform:rotate(359deg);}}@keyframes spin-kitt-u_spinningIcon_ssn8o83{0%{-webkit-transform:rotate(-1deg);-ms-transform:rotate(-1deg);transform:rotate(-1deg);}100%{-webkit-transform:rotate(359deg);-ms-transform:rotate(359deg);transform:rotate(359deg);}}
|
|
2
1
|
.kitt-u_overflowHidden_otm3u3{overflow:hidden;}
|
|
3
2
|
.kitt-u_contentAnimationEnter_c11xxy4r{opacity:0;-webkit-transform:rotateZ(5deg) scale(0.8);-ms-transform:rotateZ(5deg) scale(0.8);transform:rotateZ(5deg) scale(0.8);}
|
|
4
3
|
.kitt-u_contentAnimatioEnterActive_cl52117{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);}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { useContext, createContext, forwardRef, useMemo, cloneElement,
|
|
1
|
+
import { useContext, createContext, forwardRef, useMemo, cloneElement, useRef, useEffect, useState, Children, useReducer, useCallback, Fragment as Fragment$1 } from 'react';
|
|
2
2
|
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';
|
|
3
3
|
export { useClipboard, useContrastText, useMediaQuery, useSx, useToken } from 'native-base';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
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';
|
|
6
|
+
import { Animated, Easing, ScrollView as ScrollView$2, View as View$2, Linking, Pressable as Pressable$2, StyleSheet, useWindowDimensions } from 'react-native';
|
|
7
|
+
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
6
8
|
import { createPortal } from 'react-dom';
|
|
7
9
|
import { CSSTransition } from 'react-transition-group';
|
|
8
|
-
import { ScrollView as ScrollView$2, View as View$2, Linking, Pressable as Pressable$2, StyleSheet, useWindowDimensions } from 'react-native';
|
|
9
|
-
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
10
10
|
import { parse } from '@twemoji/parser';
|
|
11
11
|
import Downshift, { useSelect } from 'downshift';
|
|
12
12
|
import { getDocumentAsync } from 'expo-document-picker';
|
|
@@ -14,7 +14,7 @@ import { launchImageLibraryAsync } from 'expo-image-picker';
|
|
|
14
14
|
import { useDebouncedCallback } from 'use-debounce';
|
|
15
15
|
import { Loader } from '@googlemaps/js-api-loader';
|
|
16
16
|
import { parseNumber, getCountryCallingCode, isValidNumber } from 'libphonenumber-js';
|
|
17
|
-
import Animated, { useAnimatedStyle, withSpring, withTiming, useSharedValue, interpolateColor, Easing, useAnimatedProps, withDelay, withRepeat, interpolate, runOnJS } from 'react-native-reanimated';
|
|
17
|
+
import Animated$1, { useAnimatedStyle, withSpring, withTiming, useSharedValue, interpolateColor, Easing as Easing$1, useAnimatedProps, withDelay, withRepeat, interpolate, runOnJS } from 'react-native-reanimated';
|
|
18
18
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
19
19
|
import Svg, { Circle as Circle$1 } from 'react-native-svg';
|
|
20
20
|
import { useFloating, autoUpdate, offset, autoPlacement, shift, arrow } from '@floating-ui/react-dom';
|
|
@@ -3675,16 +3675,42 @@ const Button = /*#__PURE__*/forwardRef(({
|
|
|
3675
3675
|
});
|
|
3676
3676
|
});
|
|
3677
3677
|
|
|
3678
|
-
const spinningIcon = "kitt-u_spinningIcon_ssn8o83";
|
|
3679
3678
|
function SpinningIcon({
|
|
3680
3679
|
icon,
|
|
3681
3680
|
color
|
|
3682
3681
|
}) {
|
|
3682
|
+
if (process.env.NODE_ENV !== 'production' && !color) {
|
|
3683
|
+
throw new Error(`Invalid color passed to SpinningIcon: ${String(color)}`);
|
|
3684
|
+
}
|
|
3683
3685
|
const clonedIcon = /*#__PURE__*/cloneElement(icon, {
|
|
3684
3686
|
color
|
|
3685
3687
|
});
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
+
const animationRef = useRef(new Animated.Value(0));
|
|
3689
|
+
const rotation = animationRef.current.interpolate({
|
|
3690
|
+
inputRange: [0, 1],
|
|
3691
|
+
outputRange: ['0deg', '360deg']
|
|
3692
|
+
});
|
|
3693
|
+
useEffect(() => {
|
|
3694
|
+
if (process.env.NODE_ENV === 'test') return undefined;
|
|
3695
|
+
const animation = Animated.loop(Animated.timing(animationRef.current, {
|
|
3696
|
+
toValue: 1,
|
|
3697
|
+
duration: 1100,
|
|
3698
|
+
easing: Easing.linear,
|
|
3699
|
+
useNativeDriver: "web" !== 'web'
|
|
3700
|
+
}));
|
|
3701
|
+
animation.start();
|
|
3702
|
+
return () => {
|
|
3703
|
+
if (process.env.NODE_ENV === 'test') return undefined;
|
|
3704
|
+
animation.stop();
|
|
3705
|
+
return undefined;
|
|
3706
|
+
};
|
|
3707
|
+
}, []);
|
|
3708
|
+
return /*#__PURE__*/jsx(Animated.View, {
|
|
3709
|
+
style: {
|
|
3710
|
+
transform: [{
|
|
3711
|
+
rotate: rotation
|
|
3712
|
+
}]
|
|
3713
|
+
},
|
|
3688
3714
|
children: clonedIcon
|
|
3689
3715
|
});
|
|
3690
3716
|
}
|
|
@@ -7094,7 +7120,7 @@ const TextArea = /*#__PURE__*/forwardRef(({
|
|
|
7094
7120
|
base: "body-s",
|
|
7095
7121
|
color: deepPurpleColorPalette['grey.5'],
|
|
7096
7122
|
children: helper
|
|
7097
|
-
}) : null, shouldDisplayLimit ? /*#__PURE__*/jsx(Animated.View, {
|
|
7123
|
+
}) : null, shouldDisplayLimit ? /*#__PURE__*/jsx(Animated$1.View, {
|
|
7098
7124
|
style: limitContainerAnimatedStyle,
|
|
7099
7125
|
children: /*#__PURE__*/jsxs(HStack$1, {
|
|
7100
7126
|
alignItems: "center",
|
|
@@ -7104,7 +7130,7 @@ const TextArea = /*#__PURE__*/forwardRef(({
|
|
|
7104
7130
|
variant: "bold",
|
|
7105
7131
|
color: deepPurpleColorPalette['grey.5'],
|
|
7106
7132
|
children: [props.value?.length || 0, "/", limit]
|
|
7107
|
-
}), /*#__PURE__*/jsx(Animated.View, {
|
|
7133
|
+
}), /*#__PURE__*/jsx(Animated$1.View, {
|
|
7108
7134
|
style: checkIconAnimatedStyle,
|
|
7109
7135
|
children: /*#__PURE__*/jsx(TypographyIcon, {
|
|
7110
7136
|
icon: /*#__PURE__*/jsx(CheckCircleFillIcon, {}),
|
|
@@ -7176,17 +7202,17 @@ function ToggleAnimated({
|
|
|
7176
7202
|
useEffect(() => {
|
|
7177
7203
|
marginLeftAnim.value = withTiming(value ? marginLeft : 0, {
|
|
7178
7204
|
duration: 200,
|
|
7179
|
-
easing: Easing.ease
|
|
7205
|
+
easing: Easing$1.ease
|
|
7180
7206
|
});
|
|
7181
7207
|
}, [value, marginLeftAnim, marginLeft]);
|
|
7182
7208
|
useEffect(() => {
|
|
7183
7209
|
hoverAnim.value = withTiming(isHovered ? value ? -1 : 1 : 0, {
|
|
7184
7210
|
duration: 200,
|
|
7185
|
-
easing: Easing.ease
|
|
7211
|
+
easing: Easing$1.ease
|
|
7186
7212
|
});
|
|
7187
7213
|
hoverBackgroundAnim.value = withTiming(isHovered ? 0 : 1, {
|
|
7188
7214
|
duration: 200,
|
|
7189
|
-
easing: Easing.ease
|
|
7215
|
+
easing: Easing$1.ease
|
|
7190
7216
|
});
|
|
7191
7217
|
}, [isHovered, hoverAnim, value, hoverBackgroundAnim]);
|
|
7192
7218
|
return /*#__PURE__*/jsx(View$1, {
|
|
@@ -7194,7 +7220,7 @@ function ToggleAnimated({
|
|
|
7194
7220
|
borderColor: `kitt.forms.toggle.${variant}.${disabledState}.${state}.wrapperBorder.color`,
|
|
7195
7221
|
borderWidth: `kitt.forms.toggle.${variant}.${disabledState}.${state}.wrapperBorder.width`,
|
|
7196
7222
|
borderRadius: "full",
|
|
7197
|
-
children: /*#__PURE__*/jsx(Animated.View, {
|
|
7223
|
+
children: /*#__PURE__*/jsx(Animated$1.View, {
|
|
7198
7224
|
style: [hoverBackgroundTranslate, {
|
|
7199
7225
|
borderColor: theme.kitt.forms.toggle[variant][disabledState][state].border.color,
|
|
7200
7226
|
borderWidth: theme.kitt.forms.toggle[variant][disabledState][state].border.width,
|
|
@@ -7203,7 +7229,7 @@ function ToggleAnimated({
|
|
|
7203
7229
|
height: theme.kitt.forms.toggle[variant][disabledState][state].height[size],
|
|
7204
7230
|
padding: size === 'medium' ? 3 : 4
|
|
7205
7231
|
}],
|
|
7206
|
-
children: /*#__PURE__*/jsx(Animated.View, {
|
|
7232
|
+
children: /*#__PURE__*/jsx(Animated$1.View, {
|
|
7207
7233
|
style: [buttonTranslate, hoverTranslate],
|
|
7208
7234
|
children: /*#__PURE__*/jsx(View$1, {
|
|
7209
7235
|
borderRadius: "full",
|
|
@@ -7968,7 +7994,7 @@ const useNativeAnimation = ({
|
|
|
7968
7994
|
transform: [{
|
|
7969
7995
|
translateY: withTiming(-4, {
|
|
7970
7996
|
duration: TRANSLATE_Y_DURATION,
|
|
7971
|
-
easing: Easing.linear
|
|
7997
|
+
easing: Easing$1.linear
|
|
7972
7998
|
})
|
|
7973
7999
|
}, {
|
|
7974
8000
|
scale: withTiming(1, {
|
|
@@ -7982,7 +8008,7 @@ const useNativeAnimation = ({
|
|
|
7982
8008
|
transform: [{
|
|
7983
8009
|
translateY: withTiming(-10, {
|
|
7984
8010
|
duration: TRANSLATE_Y_DURATION,
|
|
7985
|
-
easing: Easing.linear
|
|
8011
|
+
easing: Easing$1.linear
|
|
7986
8012
|
})
|
|
7987
8013
|
}, {
|
|
7988
8014
|
scale: withTiming(1.3, {
|
|
@@ -7995,7 +8021,7 @@ const useNativeAnimation = ({
|
|
|
7995
8021
|
transform: [{
|
|
7996
8022
|
translateY: withTiming(0, {
|
|
7997
8023
|
duration: TRANSLATE_Y_DURATION,
|
|
7998
|
-
easing: Easing.linear
|
|
8024
|
+
easing: Easing$1.linear
|
|
7999
8025
|
})
|
|
8000
8026
|
}, {
|
|
8001
8027
|
scale: withTiming(1, {
|
|
@@ -8052,7 +8078,7 @@ function StaticMapMarker$1({
|
|
|
8052
8078
|
alignItems: "center",
|
|
8053
8079
|
width: containerWidth,
|
|
8054
8080
|
height: containerHeight,
|
|
8055
|
-
children: [/*#__PURE__*/jsx(Animated.View, {
|
|
8081
|
+
children: [/*#__PURE__*/jsx(Animated$1.View, {
|
|
8056
8082
|
style: animatedStyle,
|
|
8057
8083
|
children: variant === MapMarkerVariantEnum.MEETING_POINT ? /*#__PURE__*/jsx(SvgMeetingPointMarkerinline, {
|
|
8058
8084
|
width: mpMarkerSvgWidth,
|
|
@@ -10954,7 +10980,7 @@ function Notification({
|
|
|
10954
10980
|
});
|
|
10955
10981
|
}
|
|
10956
10982
|
|
|
10957
|
-
const AnimatedCircle = Animated.createAnimatedComponent(Circle$1);
|
|
10983
|
+
const AnimatedCircle = Animated$1.createAnimatedComponent(Circle$1);
|
|
10958
10984
|
function AnimatedLoaderCircle({
|
|
10959
10985
|
color,
|
|
10960
10986
|
progress
|
|
@@ -11002,7 +11028,7 @@ function AnimatedBackgroundCircle() {
|
|
|
11002
11028
|
const [x1, y1, x2, y2] = fillEasingFunction;
|
|
11003
11029
|
progress.value = withDelay(delay, withTiming(1, {
|
|
11004
11030
|
duration: circleBackgroundFillDuration,
|
|
11005
|
-
easing: Easing.bezier(x1, y1, x2, y2)
|
|
11031
|
+
easing: Easing$1.bezier(x1, y1, x2, y2)
|
|
11006
11032
|
}));
|
|
11007
11033
|
}, [progress, animation]);
|
|
11008
11034
|
return /*#__PURE__*/jsx(Svg, {
|
|
@@ -11032,7 +11058,7 @@ function AnimatedFillCircleContainer({
|
|
|
11032
11058
|
} = animation;
|
|
11033
11059
|
progress.value = withDelay(delay, withRepeat(withTiming(1, {
|
|
11034
11060
|
duration,
|
|
11035
|
-
easing: Easing.linear
|
|
11061
|
+
easing: Easing$1.linear
|
|
11036
11062
|
}), isInfinitAnimation$1));
|
|
11037
11063
|
}, [progress, animation, duration]);
|
|
11038
11064
|
const rotationStyles = useAnimatedStyle(() => {
|
|
@@ -11042,7 +11068,7 @@ function AnimatedFillCircleContainer({
|
|
|
11042
11068
|
}]
|
|
11043
11069
|
};
|
|
11044
11070
|
}, [progress]);
|
|
11045
|
-
return /*#__PURE__*/jsx(Animated.View, {
|
|
11071
|
+
return /*#__PURE__*/jsx(Animated$1.View, {
|
|
11046
11072
|
style: [StyleSheet.absoluteFill, rotationStyles],
|
|
11047
11073
|
children: children
|
|
11048
11074
|
});
|
|
@@ -11067,7 +11093,7 @@ function AnimatedFilledCircle() {
|
|
|
11067
11093
|
const [x1, y1, x2, y2] = fillEasingFunction;
|
|
11068
11094
|
progress.value = withDelay(delay, withRepeat(withTiming(0.8, {
|
|
11069
11095
|
duration: filledCircleFillDuration,
|
|
11070
|
-
easing: Easing.bezier(x1, y1, x2, y2)
|
|
11096
|
+
easing: Easing$1.bezier(x1, y1, x2, y2)
|
|
11071
11097
|
}), isInfinitAnimation, shouldReverse));
|
|
11072
11098
|
}, [progress, animation]);
|
|
11073
11099
|
return /*#__PURE__*/jsx(AnimatedFillCircleContainer, {
|
|
@@ -11443,7 +11469,7 @@ function SkeletonContent({
|
|
|
11443
11469
|
if (isLoading) {
|
|
11444
11470
|
sharedX.value = withRepeat(withTiming(1, {
|
|
11445
11471
|
duration: theme.kitt.skeleton.animationDuration,
|
|
11446
|
-
easing: Easing.inOut(Easing.ease)
|
|
11472
|
+
easing: Easing$1.inOut(Easing$1.ease)
|
|
11447
11473
|
}), -1);
|
|
11448
11474
|
}
|
|
11449
11475
|
}, [sharedX, width, isLoading, theme]);
|
|
@@ -11459,7 +11485,7 @@ function SkeletonContent({
|
|
|
11459
11485
|
width: "100%",
|
|
11460
11486
|
backgroundColor: "kitt.skeleton.backgroundColor",
|
|
11461
11487
|
borderColor: "kitt.skeleton.flareColor",
|
|
11462
|
-
children: /*#__PURE__*/jsx(Animated.View, {
|
|
11488
|
+
children: /*#__PURE__*/jsx(Animated$1.View, {
|
|
11463
11489
|
style: [StyleSheet.absoluteFill, linearGradientStyle],
|
|
11464
11490
|
children: /*#__PURE__*/jsx(LinearGradient, {
|
|
11465
11491
|
colors: [theme.kitt.skeleton.backgroundColor, theme.kitt.skeleton.flareColor, theme.kitt.skeleton.backgroundColor],
|
|
@@ -12574,7 +12600,7 @@ const typeToIcon = type => {
|
|
|
12574
12600
|
}
|
|
12575
12601
|
};
|
|
12576
12602
|
|
|
12577
|
-
const AnimatedView$1 = Animated.createAnimatedComponent(View);
|
|
12603
|
+
const AnimatedView$1 = Animated$1.createAnimatedComponent(View);
|
|
12578
12604
|
function ToastComponent({
|
|
12579
12605
|
title,
|
|
12580
12606
|
description,
|
|
@@ -12606,7 +12632,7 @@ function ToastComponent({
|
|
|
12606
12632
|
width.value = 100;
|
|
12607
12633
|
width.value = withTiming(0, {
|
|
12608
12634
|
duration: toastTimeout,
|
|
12609
|
-
easing: Easing.bezier(0, 0, 0.58, 1)
|
|
12635
|
+
easing: Easing$1.bezier(0, 0, 0.58, 1)
|
|
12610
12636
|
}, () => {
|
|
12611
12637
|
runOnJS(handleHideToast)();
|
|
12612
12638
|
});
|
|
@@ -13178,7 +13204,7 @@ function useStepAnimations({
|
|
|
13178
13204
|
};
|
|
13179
13205
|
}
|
|
13180
13206
|
|
|
13181
|
-
const AnimatedView = Animated.createAnimatedComponent(View);
|
|
13207
|
+
const AnimatedView = Animated$1.createAnimatedComponent(View);
|
|
13182
13208
|
function BorderlessStep({
|
|
13183
13209
|
description,
|
|
13184
13210
|
title,
|