@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);}
|
|
@@ -6,9 +6,9 @@ const react = require('react');
|
|
|
6
6
|
const nativeBase = require('native-base');
|
|
7
7
|
const jsxRuntime = require('react/jsx-runtime');
|
|
8
8
|
const phosphor = require('@ornikar/kitt-icons/phosphor');
|
|
9
|
+
const reactNative = require('react-native');
|
|
9
10
|
const reactDom = require('react-dom');
|
|
10
11
|
const reactTransitionGroup = require('react-transition-group');
|
|
11
|
-
const reactNative = require('react-native');
|
|
12
12
|
const parser = require('@twemoji/parser');
|
|
13
13
|
const Downshift = require('downshift');
|
|
14
14
|
const expoDocumentPicker = require('expo-document-picker');
|
|
@@ -3683,16 +3683,42 @@ const Button = /*#__PURE__*/react.forwardRef(({
|
|
|
3683
3683
|
});
|
|
3684
3684
|
});
|
|
3685
3685
|
|
|
3686
|
-
const spinningIcon = "kitt-u_spinningIcon_ssn8o83";
|
|
3687
3686
|
function SpinningIcon({
|
|
3688
3687
|
icon,
|
|
3689
3688
|
color
|
|
3690
3689
|
}) {
|
|
3690
|
+
if (process.env.NODE_ENV !== 'production' && !color) {
|
|
3691
|
+
throw new Error(`Invalid color passed to SpinningIcon: ${String(color)}`);
|
|
3692
|
+
}
|
|
3691
3693
|
const clonedIcon = /*#__PURE__*/react.cloneElement(icon, {
|
|
3692
3694
|
color
|
|
3693
3695
|
});
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
+
const animationRef = react.useRef(new reactNative.Animated.Value(0));
|
|
3697
|
+
const rotation = animationRef.current.interpolate({
|
|
3698
|
+
inputRange: [0, 1],
|
|
3699
|
+
outputRange: ['0deg', '360deg']
|
|
3700
|
+
});
|
|
3701
|
+
react.useEffect(() => {
|
|
3702
|
+
if (process.env.NODE_ENV === 'test') return undefined;
|
|
3703
|
+
const animation = reactNative.Animated.loop(reactNative.Animated.timing(animationRef.current, {
|
|
3704
|
+
toValue: 1,
|
|
3705
|
+
duration: 1100,
|
|
3706
|
+
easing: reactNative.Easing.linear,
|
|
3707
|
+
useNativeDriver: "web" !== 'web'
|
|
3708
|
+
}));
|
|
3709
|
+
animation.start();
|
|
3710
|
+
return () => {
|
|
3711
|
+
if (process.env.NODE_ENV === 'test') return undefined;
|
|
3712
|
+
animation.stop();
|
|
3713
|
+
return undefined;
|
|
3714
|
+
};
|
|
3715
|
+
}, []);
|
|
3716
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactNative.Animated.View, {
|
|
3717
|
+
style: {
|
|
3718
|
+
transform: [{
|
|
3719
|
+
rotate: rotation
|
|
3720
|
+
}]
|
|
3721
|
+
},
|
|
3696
3722
|
children: clonedIcon
|
|
3697
3723
|
});
|
|
3698
3724
|
}
|