@ornikar/kitt-universal 29.2.0 → 29.3.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 +10 -0
- package/dist/definitions/Skeleton/SkeletonContent.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +16 -14
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +16 -14
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +16 -14
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.css +0 -2
- package/dist/index-node-22.17.cjs.web.js +43 -7
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +16 -14
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.css +0 -2
- package/dist/index-node-22.17.es.web.mjs +44 -8
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +16 -14
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +44 -8
- package/dist/index.es.web.js.map +1 -1
- package/dist/styles.css +0 -2
- package/dist/tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist/definitions/Skeleton/SkeletonContent.web.d.ts +0 -7
- package/dist/definitions/Skeleton/SkeletonContent.web.d.ts.map +0 -1
package/dist/index.es.web.js
CHANGED
|
@@ -22,11 +22,12 @@ 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,
|
|
25
|
+
import Animated, { useAnimatedStyle, withSpring, withTiming, useSharedValue, interpolateColor, Easing, 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';
|
|
29
29
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
30
|
+
import { LinearGradient } from 'expo-linear-gradient';
|
|
30
31
|
import { makeDecorator } from '@storybook/addons';
|
|
31
32
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
32
33
|
|
|
@@ -2313,7 +2314,7 @@ var shadows = {
|
|
|
2313
2314
|
|
|
2314
2315
|
var skeletonBackgroundColor = deepPurpleColorPalette['beige.2'];
|
|
2315
2316
|
var skeletonFlareColor = deepPurpleColorPalette['beige.3'];
|
|
2316
|
-
var skeleton
|
|
2317
|
+
var skeleton = {
|
|
2317
2318
|
backgroundColor: skeletonBackgroundColor,
|
|
2318
2319
|
flareColor: skeletonFlareColor,
|
|
2319
2320
|
animationDuration: 1000,
|
|
@@ -2655,7 +2656,7 @@ var theme = {
|
|
|
2655
2656
|
pageLoader: pageLoader,
|
|
2656
2657
|
picker: picker,
|
|
2657
2658
|
shadows: shadows,
|
|
2658
|
-
skeleton: skeleton
|
|
2659
|
+
skeleton: skeleton,
|
|
2659
2660
|
tabBar: tabBar,
|
|
2660
2661
|
tag: tag,
|
|
2661
2662
|
sticker: sticker,
|
|
@@ -11611,12 +11612,47 @@ function SegmentedProgressBar(_ref) {
|
|
|
11611
11612
|
});
|
|
11612
11613
|
}
|
|
11613
11614
|
|
|
11614
|
-
var skeleton = "kitt-u_skeleton_sc3upcl";
|
|
11615
|
-
var skeletonWithoutAnimation = "kitt-u_skeletonWithoutAnimation_s12gop2o";
|
|
11616
11615
|
function SkeletonContent(_ref) {
|
|
11617
|
-
var isLoading = _ref.isLoading
|
|
11618
|
-
|
|
11619
|
-
|
|
11616
|
+
var isLoading = _ref.isLoading,
|
|
11617
|
+
width = _ref.width;
|
|
11618
|
+
var theme = useTheme();
|
|
11619
|
+
var sharedX = useSharedValue(0);
|
|
11620
|
+
useEffect(function () {
|
|
11621
|
+
if (isLoading) {
|
|
11622
|
+
sharedX.value = withRepeat(withTiming(1, {
|
|
11623
|
+
duration: theme.kitt.skeleton.animationDuration,
|
|
11624
|
+
easing: Easing.inOut(Easing.ease)
|
|
11625
|
+
}), -1);
|
|
11626
|
+
}
|
|
11627
|
+
}, [sharedX, width, isLoading, theme]);
|
|
11628
|
+
var linearGradientStyle = useAnimatedStyle(function () {
|
|
11629
|
+
return {
|
|
11630
|
+
transform: [{
|
|
11631
|
+
translateX: interpolate(sharedX.value, [0, 1], [-width, width])
|
|
11632
|
+
}]
|
|
11633
|
+
};
|
|
11634
|
+
}, [sharedX, width]);
|
|
11635
|
+
return /*#__PURE__*/jsx(View, {
|
|
11636
|
+
height: "100%",
|
|
11637
|
+
width: "100%",
|
|
11638
|
+
backgroundColor: "kitt.skeleton.backgroundColor",
|
|
11639
|
+
borderColor: "kitt.skeleton.flareColor",
|
|
11640
|
+
children: /*#__PURE__*/jsx(Animated.View, {
|
|
11641
|
+
style: [StyleSheet.absoluteFill, linearGradientStyle],
|
|
11642
|
+
children: /*#__PURE__*/jsx(LinearGradient, {
|
|
11643
|
+
colors: [theme.kitt.skeleton.backgroundColor, theme.kitt.skeleton.flareColor, theme.kitt.skeleton.backgroundColor],
|
|
11644
|
+
locations: [0.1, 0.5, 0.9],
|
|
11645
|
+
start: {
|
|
11646
|
+
x: 0,
|
|
11647
|
+
y: 0
|
|
11648
|
+
},
|
|
11649
|
+
end: {
|
|
11650
|
+
x: 1,
|
|
11651
|
+
y: 0
|
|
11652
|
+
},
|
|
11653
|
+
style: StyleSheet.absoluteFill
|
|
11654
|
+
})
|
|
11655
|
+
})
|
|
11620
11656
|
});
|
|
11621
11657
|
}
|
|
11622
11658
|
|