@idealyst/components 1.0.71 → 1.0.73
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@idealyst/components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.73",
|
|
4
4
|
"description": "Shared component library for React and React Native",
|
|
5
5
|
"documentation": "https://github.com/IdealystIO/idealyst-framework/tree/main/packages/components#readme",
|
|
6
6
|
"readme": "README.md",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"publish:npm": "npm publish"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@idealyst/theme": "^1.0.
|
|
44
|
+
"@idealyst/theme": "^1.0.73",
|
|
45
45
|
"@mdi/js": "^7.4.47",
|
|
46
46
|
"@mdi/react": "^1.6.1",
|
|
47
47
|
"@react-native-vector-icons/common": "^12.0.1",
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { getWebProps } from 'react-native-unistyles/web';
|
|
3
3
|
import { ActivityIndicatorProps } from './types';
|
|
4
4
|
import { activityIndicatorStyles } from './ActivityIndicator.styles';
|
|
5
|
-
import './ActivityIndicator.web.css';
|
|
6
5
|
|
|
7
6
|
const ActivityIndicator: React.FC<ActivityIndicatorProps> = ({
|
|
8
7
|
animating = true,
|
|
@@ -47,6 +46,10 @@ const ActivityIndicator: React.FC<ActivityIndicatorProps> = ({
|
|
|
47
46
|
borderWidth: Math.max(2, customSize / 10),
|
|
48
47
|
},
|
|
49
48
|
color && { borderTopColor: color, borderRightColor: color },
|
|
49
|
+
// Add inline CSS animation
|
|
50
|
+
animating && {
|
|
51
|
+
animation: 'spin 1s linear infinite',
|
|
52
|
+
},
|
|
50
53
|
];
|
|
51
54
|
|
|
52
55
|
// Use getWebProps to generate className and ref for web
|
|
@@ -54,9 +57,20 @@ const ActivityIndicator: React.FC<ActivityIndicatorProps> = ({
|
|
|
54
57
|
const spinnerProps = getWebProps(spinnerStyleArray);
|
|
55
58
|
|
|
56
59
|
return (
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
+
<>
|
|
61
|
+
{/* Inject keyframes animation into the document head */}
|
|
62
|
+
<style>
|
|
63
|
+
{`
|
|
64
|
+
@keyframes spin {
|
|
65
|
+
from { transform: rotate(0deg); }
|
|
66
|
+
to { transform: rotate(360deg); }
|
|
67
|
+
}
|
|
68
|
+
`}
|
|
69
|
+
</style>
|
|
70
|
+
<div {...containerProps} data-testid={testID}>
|
|
71
|
+
<div {...spinnerProps} />
|
|
72
|
+
</div>
|
|
73
|
+
</>
|
|
60
74
|
);
|
|
61
75
|
};
|
|
62
76
|
|