@stokr/components-library 3.0.72-beta.1 → 3.0.72-beta.2
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,11 +1,13 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useRef, useCallback, useEffect } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
-
import { DotLottieReact } from "@lottiefiles/dotlottie-react";
|
|
4
|
+
import { DotLottieReact, setWasmUrl } from "@lottiefiles/dotlottie-react";
|
|
5
5
|
import { AnimationWrapper } from "./LottieAnimation.styles.js";
|
|
6
6
|
import progressAnimation from "../../static/animations/progress.lottie.js";
|
|
7
7
|
import uploadAnimation from "../../static/animations/upload.lottie.js";
|
|
8
8
|
import successAnimation from "../../static/animations/checked.lottie.js";
|
|
9
|
+
import dotLottiePlayerWasm from "@lottiefiles/dotlottie-web/dotlottie-player.wasm?url";
|
|
10
|
+
setWasmUrl(dotLottiePlayerWasm);
|
|
9
11
|
const LOTTIE_ANIMATIONS = {
|
|
10
12
|
progress: { src: progressAnimation, segment: null, loop: false },
|
|
11
13
|
upload: { src: uploadAnimation, segment: null, loop: false },
|
|
@@ -36,8 +38,7 @@ const LottieAnimation = ({
|
|
|
36
38
|
(dot) => {
|
|
37
39
|
clearTimers();
|
|
38
40
|
dotRef.current = dot || null;
|
|
39
|
-
if (!dot || animationLoop
|
|
40
|
-
const [startFrame, endFrame] = animationSegment;
|
|
41
|
+
if (!dot || animationLoop) return;
|
|
41
42
|
const armHold = () => {
|
|
42
43
|
const d = dotRef.current;
|
|
43
44
|
if (!d) return;
|
|
@@ -45,6 +46,7 @@ const LottieAnimation = ({
|
|
|
45
46
|
timersRef.current.push(setTimeout(armHold, 40));
|
|
46
47
|
return;
|
|
47
48
|
}
|
|
49
|
+
const [startFrame, endFrame] = animationSegment || [0, d.totalFrames];
|
|
48
50
|
const fps = d.totalFrames / d.duration;
|
|
49
51
|
const playMs = (endFrame - startFrame) / fps / (speed || 1) * 1e3;
|
|
50
52
|
timersRef.current.push(
|
|
@@ -7,6 +7,9 @@ const Rows = styled.div`
|
|
|
7
7
|
display: flex;
|
|
8
8
|
flex-direction: column;
|
|
9
9
|
width: 100%;
|
|
10
|
+
/* DetailItem's own 6px vertical padding + this 6px gap on both sides of the
|
|
11
|
+
divider = 25px between rows, matching Figma's 12px-gap-around-divider spec. */
|
|
12
|
+
gap: 6px;
|
|
10
13
|
`;
|
|
11
14
|
const RowDivider = styled.div`
|
|
12
15
|
height: 1px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stokr/components-library",
|
|
3
|
-
"version": "3.0.72-beta.
|
|
3
|
+
"version": "3.0.72-beta.2",
|
|
4
4
|
"description": "STOKR - Components Library",
|
|
5
5
|
"author": "Bilal Hodzic <bilal@stokr.io>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@lottiefiles/dotlottie-react": "^0.19.4",
|
|
58
|
+
"@lottiefiles/dotlottie-web": "^0.74.0",
|
|
58
59
|
"axios": "^1.13.5",
|
|
59
60
|
"country-flag-icons": "^1.6.17",
|
|
60
61
|
"date-fns": "^4.1.0",
|