decathlon-ui 0.1.7 → 0.1.9
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loading.component.d.ts","sourceRoot":"","sources":["../../../src/components/loading/loading.component.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"loading.component.d.ts","sourceRoot":"","sources":["../../../src/components/loading/loading.component.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAmC1C,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import Lottie from 'lottie-react';
|
|
2
3
|
import LottieView from 'lottie-react-native';
|
|
3
|
-
import { View } from 'react-native';
|
|
4
|
+
import { Platform, View } from 'react-native';
|
|
5
|
+
import loadingAnimation from '../../assets/animations/loading-animation.json';
|
|
4
6
|
import { useLoadingStyles } from './loading.styles';
|
|
5
7
|
export const Loading = ({ source, isDotLottie = false, // TODO: trabalhar nisso depois para aceitar dotLottie
|
|
6
8
|
autoPlay = true, loop = true, speed = 1, containerStyle, style, onAnimationFinish, size = 100, }) => {
|
|
@@ -10,6 +12,6 @@ autoPlay = true, loop = true, speed = 1, containerStyle, style, onAnimationFinis
|
|
|
10
12
|
{ width: size, height: size },
|
|
11
13
|
containerStyle,
|
|
12
14
|
];
|
|
13
|
-
return (_jsx(View, { style: containerStyles, children: _jsx(LottieView, { source: source || require('../../assets/animations/loading-animation.json'), style: [styles.animation, style], autoPlay: autoPlay, loop: loop, speed: speed, onAnimationFinish: onAnimationFinish }) }));
|
|
15
|
+
return (_jsx(View, { style: containerStyles, children: Platform.OS === 'web' ? (_jsx(Lottie, { animationData: loadingAnimation, loop: true })) : (_jsx(LottieView, { source: source || require('../../assets/animations/loading-animation.json'), style: [styles.animation, style], autoPlay: autoPlay, loop: loop, speed: speed, onAnimationFinish: onAnimationFinish })) }));
|
|
14
16
|
};
|
|
15
17
|
export default Loading;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "decathlon-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Biblioteca de componentes React Native com Storybook e documentação via GitHub Pages.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
],
|
|
11
11
|
"sideEffects": false,
|
|
12
12
|
"scripts": {
|
|
13
|
-
"storybook": "storybook dev -p 6006",
|
|
14
|
-
"build-storybook": "storybook build --output-dir docs",
|
|
13
|
+
"storybook": "npx storybook dev -p 6006",
|
|
14
|
+
"build-storybook": "npx storybook build --output-dir docs",
|
|
15
15
|
"build": "tsc -p tsconfig.build.json",
|
|
16
16
|
"prepublishOnly": "yarn build",
|
|
17
17
|
"generate-icons": "svgr --config-file svgr.config.js --out-dir src/icons/components src/icons/foundations/*.svg",
|
|
@@ -24,23 +24,33 @@
|
|
|
24
24
|
"react-native-svg": ">=12.0.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@
|
|
28
|
-
"@storybook/addon-
|
|
29
|
-
"@storybook/addon-links": "^9.
|
|
30
|
-
"@storybook/react
|
|
27
|
+
"@lottiefiles/react-lottie-player": "^3.5.4",
|
|
28
|
+
"@storybook/addon-docs": "9.0.15",
|
|
29
|
+
"@storybook/addon-links": "^9.0.15",
|
|
30
|
+
"@storybook/react": "9.0.15",
|
|
31
|
+
"@storybook/react-vite": "^9.0.15",
|
|
32
|
+
"@svgr/cli": "^8.1.0",
|
|
33
|
+
"@svgr/core": "^8.1.0",
|
|
34
|
+
"@svgr/plugin-jsx": "^8.1.0",
|
|
35
|
+
"@svgr/plugin-svgo": "^8.1.0",
|
|
31
36
|
"@types/react": "^18.2.24",
|
|
32
37
|
"@types/react-dom": "^18.2.8",
|
|
33
38
|
"@types/react-native": "^0.73.0",
|
|
34
39
|
"esbuild": "^0.25.5",
|
|
40
|
+
"lottie-react": "^2.4.1",
|
|
35
41
|
"lottie-react-native": "^5.0.0",
|
|
42
|
+
"lottie-web": "^5.12.2",
|
|
43
|
+
"prop-types": "^15.8.1",
|
|
36
44
|
"react": "^19.1.0",
|
|
37
45
|
"react-dom": "^19.1.0",
|
|
38
46
|
"react-native": "^0.78.0",
|
|
39
47
|
"react-native-svg": "^15.10.0",
|
|
48
|
+
"react-native-svg-web": "^1.0.9",
|
|
40
49
|
"react-native-web": "^0.19.9",
|
|
41
|
-
"storybook": "
|
|
50
|
+
"storybook": "9.0.15",
|
|
42
51
|
"typescript": "^5.2.2",
|
|
43
|
-
"vite": "^5.0.0"
|
|
52
|
+
"vite": "^5.0.0",
|
|
53
|
+
"vite-plugin-svgr": "^4.3.0"
|
|
44
54
|
},
|
|
45
55
|
"repository": {
|
|
46
56
|
"type": "git",
|