@alveole/components 0.31.4 → 0.32.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/dist/core/Lottie/Lottie.d.ts +9 -1
- package/dist/core/Lottie/Lottie.d.ts.map +1 -1
- package/dist/core/Lottie/Lottie.js +1 -1
- package/dist/core/Lottie/Lottie.stories.d.ts +2 -0
- package/dist/core/Lottie/Lottie.stories.d.ts.map +1 -1
- package/dist/core/Lottie/Lottie.stories.js +4 -2
- package/package.json +1 -1
|
@@ -2,7 +2,15 @@ import LottieView from 'lottie-react-native';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export type LottieDimensionValue = number | `${string}%` | undefined;
|
|
4
4
|
export declare const isLottieDimensionValue: (dimension: unknown) => dimension is LottieDimensionValue;
|
|
5
|
-
export type
|
|
5
|
+
export type LottieLoopProps = {
|
|
6
|
+
loop: true;
|
|
7
|
+
onLoop?: React.ComponentProps<typeof LottieView>['onAnimationLoop'];
|
|
8
|
+
};
|
|
9
|
+
export type LottieOneTimeProps = {
|
|
10
|
+
loop: false;
|
|
11
|
+
onFinish?: React.ComponentProps<typeof LottieView>['onAnimationFinish'];
|
|
12
|
+
};
|
|
13
|
+
export type LottieProps = (LottieLoopProps | LottieOneTimeProps) & {
|
|
6
14
|
style: React.ComponentProps<typeof LottieView>['style'];
|
|
7
15
|
source: React.ComponentProps<typeof LottieView>['source'];
|
|
8
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Lottie.d.ts","sourceRoot":"","sources":["../../../src/core/Lottie/Lottie.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,GAAG,MAAM,GAAG,GAAG,SAAS,CAAC;AACrE,eAAO,MAAM,sBAAsB,GAAI,WAAW,OAAO,KAAG,SAAS,IAAI,oBAMxE,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;
|
|
1
|
+
{"version":3,"file":"Lottie.d.ts","sourceRoot":"","sources":["../../../src/core/Lottie/Lottie.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,GAAG,MAAM,GAAG,GAAG,SAAS,CAAC;AACrE,eAAO,MAAM,sBAAsB,GAAI,WAAW,OAAO,KAAG,SAAS,IAAI,oBAMxE,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,CAAC,iBAAiB,CAAC,CAAC;CACrE,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,KAAK,CAAC;IACZ,QAAQ,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,CAAC,mBAAmB,CAAC,CAAC;CACzE,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,eAAe,GAAG,kBAAkB,CAAC,GAAG;IACjE,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC;IACxD,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAC;CAC3D,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,OAAO,WAAW,4CAUxC,CAAC"}
|
|
@@ -16,5 +16,5 @@ export const Lottie = (props) => {
|
|
|
16
16
|
const { style } = props;
|
|
17
17
|
const height = style && 'height' in style && isLottieDimensionValue(style.height) ? style.height : undefined;
|
|
18
18
|
const width = style && 'width' in style && isLottieDimensionValue(style.width) ? style.width : undefined;
|
|
19
|
-
return (_jsx(View, { style: { height, width }, children: _jsx(LottieView, { autoPlay: true,
|
|
19
|
+
return (_jsx(View, { style: { height, width }, children: _jsx(LottieView, { autoPlay: true, resizeMode: "contain", ...props }) }));
|
|
20
20
|
};
|
|
@@ -9,4 +9,6 @@ declare const _default: {
|
|
|
9
9
|
export default _default;
|
|
10
10
|
export declare const Default: () => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export declare const Size: () => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const Loop: () => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const OneTime: () => import("react/jsx-runtime").JSX.Element;
|
|
12
14
|
//# sourceMappingURL=Lottie.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Lottie.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Lottie/Lottie.stories.tsx"],"names":[],"mappings":";;;;;;;;AAIA,wBAOkB;AAElB,eAAO,MAAM,OAAO,+
|
|
1
|
+
{"version":3,"file":"Lottie.stories.d.ts","sourceRoot":"","sources":["../../../src/core/Lottie/Lottie.stories.tsx"],"names":[],"mappings":";;;;;;;;AAIA,wBAOkB;AAElB,eAAO,MAAM,OAAO,+CAAiF,CAAC;AAEtG,eAAO,MAAM,IAAI,+CAAiF,CAAC;AAEnG,eAAO,MAAM,IAAI,+CAAsG,CAAC;AAExH,eAAO,MAAM,OAAO,+CAEnB,CAAC"}
|
|
@@ -9,5 +9,7 @@ export default {
|
|
|
9
9
|
component: Lottie,
|
|
10
10
|
styleFn: () => 'Aucun style',
|
|
11
11
|
};
|
|
12
|
-
export const Default = () => _jsx(Lottie, { style: { width: 32, height: 32 }, source: dotsAnimation });
|
|
13
|
-
export const Size = () => _jsx(Lottie, { style: { width: 60, height: 60 }, source: dotsAnimation });
|
|
12
|
+
export const Default = () => _jsx(Lottie, { loop: true, style: { width: 32, height: 32 }, source: dotsAnimation });
|
|
13
|
+
export const Size = () => _jsx(Lottie, { loop: true, style: { width: 60, height: 60 }, source: dotsAnimation });
|
|
14
|
+
export const Loop = () => _jsx(Lottie, { loop: true, style: { width: 60, height: 60 }, source: dotsAnimation, onLoop: console.log });
|
|
15
|
+
export const OneTime = () => (_jsx(Lottie, { loop: false, style: { width: 60, height: 60 }, source: dotsAnimation, onFinish: console.log }));
|