@cuemath/leap 3.0.19 → 3.0.20-j

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,19 +1,19 @@
1
1
  import t from "styled-components";
2
- import i from "../../../ui/layout/flex-view.js";
3
- const n = t(i)`
2
+ import r from "../../../ui/layout/flex-view.js";
3
+ const n = t(r)`
4
4
  position: relative;
5
- `, s = t(i)`
5
+ `, s = t(r)`
6
6
  position: absolute;
7
7
  border-radius: 100%;
8
8
  top: 216px;
9
9
  border: ${({ theme: o }) => `2px solid ${o.colors.BLACK_5}`};
10
- `, p = t(i)`
10
+ `, p = t(r)`
11
11
  opacity: ${({ $isVisible: o }) => o ? 1 : 0};
12
12
  transition: opacity 0.5s ease-in-out;
13
- `, l = t.div`
13
+ `, a = t.div`
14
14
  position: relative;
15
15
  `;
16
- t(i)`
16
+ t(r)`
17
17
  position: relative;
18
18
  overflow: hidden;
19
19
  background: ${({ theme: o }) => o.colors.BLACK_2};
@@ -30,11 +30,14 @@ t.div`
30
30
  height: 100%;
31
31
  z-index: 2;
32
32
  `;
33
- const a = t(i)`
33
+ const l = t(r)`
34
34
  position: absolute;
35
35
  top: 55%;
36
36
  right: 24px;
37
- `, c = t(i)`
37
+ `, c = t(r)`
38
+ position: absolute;
39
+ top: 642px;
40
+ `, d = t(r)`
38
41
  position: absolute;
39
42
  top: 55%;
40
43
  left: 24px;
@@ -49,8 +52,9 @@ export {
49
52
  s as CircularStepContainer,
50
53
  n as Container,
51
54
  p as ContentWrapper,
52
- l as InputContainer,
53
- a as NextButtonWrapper,
54
- c as PrevButtonWrapper
55
+ c as FooterWrapper,
56
+ a as InputContainer,
57
+ l as NextButtonWrapper,
58
+ d as PrevButtonWrapper
55
59
  };
56
60
  //# sourceMappingURL=circular-step-wrapper-styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"circular-step-wrapper-styled.js","sources":["../../../../../src/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nconst Container = styled(FlexView)`\n position: relative;\n`;\n\nconst CircularStepContainer = styled(FlexView)`\n position: absolute;\n border-radius: 100%;\n top: 216px;\n border: ${({ theme }) => `2px solid ${theme.colors.BLACK_5}`};\n`;\n\nconst ContentWrapper = styled(FlexView)<{ $isVisible: boolean }>`\n opacity: ${({ $isVisible }) => ($isVisible ? 1 : 0)};\n transition: opacity 0.5s ease-in-out;\n`;\n\nconst InputContainer = styled.div`\n position: relative;\n`;\n\nconst CircularProgressContainer = styled(FlexView)<{\n isVerticallyCentered?: boolean;\n}>`\n position: relative;\n overflow: hidden;\n background: ${({ theme }) => theme.colors.BLACK_2};\n border-radius: 100%;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: ${({ theme }) => theme.colors.WHITE};\n`;\n\nexport const CircularProgress = styled.div`\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 2;\n`;\n\nconst NextButtonWrapper = styled(FlexView)`\n position: absolute;\n top: 55%;\n right: 24px;\n`;\nconst PrevButtonWrapper = styled(FlexView)`\n position: absolute;\n top: 55%;\n left: 24px;\n button {\n background-color: ${({ theme }) => theme.colors.BLACK_1};\n svg {\n color: ${({ theme }) => theme.colors.WHITE};\n }\n }\n`;\n\nexport {\n NextButtonWrapper,\n PrevButtonWrapper,\n InputContainer,\n Container,\n CircularStepContainer,\n CircularProgressContainer,\n ContentWrapper,\n};\n"],"names":["Container","styled","FlexView","CircularStepContainer","theme","ContentWrapper","$isVisible","InputContainer","NextButtonWrapper","PrevButtonWrapper"],"mappings":";;AAIM,MAAAA,IAAYC,EAAOC,CAAQ;AAAA;AAAA,GAI3BC,IAAwBF,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA,YAIjC,CAAC,EAAE,OAAAE,EAAM,MAAM,aAAaA,EAAM,OAAO,OAAO,EAAE;AAAA,GAGxDC,IAAiBJ,EAAOC,CAAQ;AAAA,aACzB,CAAC,EAAE,YAAAI,EAAA,MAAkBA,IAAa,IAAI,CAAE;AAAA;AAAA,GAI/CC,IAAiBN,EAAO;AAAA;AAAA;AAIIA,EAAOC,CAAQ;AAAA;AAAA;AAAA,gBAKjC,CAAC,EAAE,OAAAE,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAMxC,CAAC,EAAE,OAAAA,EAAA,MAAYA,EAAM,OAAO,KAAK;AAAA;AAGZH,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAOjC,MAAAO,IAAoBP,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA,GAKnCO,IAAoBR,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,wBAKjB,CAAC,EAAE,OAAAE,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA,eAE5C,CAAC,EAAE,OAAAA,EAAA,MAAYA,EAAM,OAAO,KAAK;AAAA;AAAA;AAAA;"}
1
+ {"version":3,"file":"circular-step-wrapper-styled.js","sources":["../../../../../src/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nconst Container = styled(FlexView)`\n position: relative;\n`;\n\nconst CircularStepContainer = styled(FlexView)`\n position: absolute;\n border-radius: 100%;\n top: 216px;\n border: ${({ theme }) => `2px solid ${theme.colors.BLACK_5}`};\n`;\n\nconst ContentWrapper = styled(FlexView)<{ $isVisible: boolean }>`\n opacity: ${({ $isVisible }) => ($isVisible ? 1 : 0)};\n transition: opacity 0.5s ease-in-out;\n`;\n\nconst InputContainer = styled.div`\n position: relative;\n`;\n\nconst CircularProgressContainer = styled(FlexView)<{\n isVerticallyCentered?: boolean;\n}>`\n position: relative;\n overflow: hidden;\n background: ${({ theme }) => theme.colors.BLACK_2};\n border-radius: 100%;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: ${({ theme }) => theme.colors.WHITE};\n`;\n\nexport const CircularProgress = styled.div`\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 2;\n`;\n\nconst NextButtonWrapper = styled(FlexView)`\n position: absolute;\n top: 55%;\n right: 24px;\n`;\n\nconst FooterWrapper = styled(FlexView)`\n position: absolute;\n top: 642px;\n`;\n\nconst PrevButtonWrapper = styled(FlexView)`\n position: absolute;\n top: 55%;\n left: 24px;\n button {\n background-color: ${({ theme }) => theme.colors.BLACK_1};\n svg {\n color: ${({ theme }) => theme.colors.WHITE};\n }\n }\n`;\n\nexport {\n NextButtonWrapper,\n PrevButtonWrapper,\n InputContainer,\n Container,\n CircularStepContainer,\n CircularProgressContainer,\n ContentWrapper,\n FooterWrapper,\n};\n"],"names":["Container","styled","FlexView","CircularStepContainer","theme","ContentWrapper","$isVisible","InputContainer","NextButtonWrapper","FooterWrapper","PrevButtonWrapper"],"mappings":";;AAIM,MAAAA,IAAYC,EAAOC,CAAQ;AAAA;AAAA,GAI3BC,IAAwBF,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA,YAIjC,CAAC,EAAE,OAAAE,EAAM,MAAM,aAAaA,EAAM,OAAO,OAAO,EAAE;AAAA,GAGxDC,IAAiBJ,EAAOC,CAAQ;AAAA,aACzB,CAAC,EAAE,YAAAI,EAAA,MAAkBA,IAAa,IAAI,CAAE;AAAA;AAAA,GAI/CC,IAAiBN,EAAO;AAAA;AAAA;AAIIA,EAAOC,CAAQ;AAAA;AAAA;AAAA,gBAKjC,CAAC,EAAE,OAAAE,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAMxC,CAAC,EAAE,OAAAA,EAAA,MAAYA,EAAM,OAAO,KAAK;AAAA;AAGZH,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAOjC,MAAAO,IAAoBP,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA,GAMnCO,IAAgBR,EAAOC,CAAQ;AAAA;AAAA;AAAA,GAK/BQ,IAAoBT,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,wBAKjB,CAAC,EAAE,OAAAE,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA,eAE5C,CAAC,EAAE,OAAAA,EAAA,MAAYA,EAAM,OAAO,KAAK;AAAA;AAAA;AAAA;"}
@@ -1,53 +1,54 @@
1
1
  import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
- import { memo as b, forwardRef as E, useRef as c, useState as $, useCallback as H, useEffect as B, useImperativeHandle as T, useLayoutEffect as j } from "react";
2
+ import { memo as E, forwardRef as H, useRef as c, useState as g, useCallback as j, useEffect as B, useImperativeHandle as T, useLayoutEffect as F } from "react";
3
3
  import P from "../../../../assets/line-icons/icons/back2.js";
4
4
  import z from "../../../../assets/line-icons/icons/next2.js";
5
- import F from "../../../ui/animated-arc/animated-arc.js";
6
- import g from "../../../ui/buttons/icon-button/icon-button.js";
7
- import M from "../../../ui/layout/flex-view.js";
8
- import N from "../../../ui/lottie-animation/lottie-animation.js";
9
- import O from "../../../ui/separator/separator.js";
10
- import V from "../../../ui/text/text.js";
11
- import { Container as X, CircularStepContainer as D, ContentWrapper as K, InputContainer as Y, PrevButtonWrapper as _, NextButtonWrapper as q } from "./circular-step-wrapper-styled.js";
12
- const G = {
5
+ import M from "../../../ui/animated-arc/animated-arc.js";
6
+ import C from "../../../ui/buttons/icon-button/icon-button.js";
7
+ import N from "../../../ui/layout/flex-view.js";
8
+ import O from "../../../ui/lottie-animation/lottie-animation.js";
9
+ import V from "../../../ui/separator/separator.js";
10
+ import X from "../../../ui/text/text.js";
11
+ import { Container as D, CircularStepContainer as K, ContentWrapper as Y, InputContainer as _, FooterWrapper as q, PrevButtonWrapper as G, NextButtonWrapper as J } from "./circular-step-wrapper-styled.js";
12
+ const Q = {
13
13
  autoplay: !1,
14
14
  loop: !1,
15
15
  renderer: "canvas",
16
16
  rendererSettings: {
17
17
  preserveAspectRatio: "xMidYMin slice"
18
18
  }
19
- }, J = E(
19
+ }, U = H(
20
20
  ({
21
- children: C,
22
- onGoBack: y,
23
- onNext: I,
21
+ children: y,
22
+ onGoBack: I,
23
+ onNext: x,
24
24
  label: a,
25
- showNext: x,
26
- showPrevious: A,
25
+ showNext: A,
26
+ showPrevious: S,
27
27
  animation: r,
28
- introFrames: S,
29
- outroFrames: w,
28
+ introFrames: w,
29
+ outroFrames: R,
30
30
  isNextLoading: s,
31
- progressAngle: l
32
- }, R) => {
33
- const t = c(null), o = c(null), [u, k] = $(), [v, m] = $(!1), i = c(null), L = H(() => {
34
- r && t.current && (t.current.playSegments(S, !0), m(!0));
31
+ progressAngle: l,
32
+ footerElement: u
33
+ }, W) => {
34
+ const t = c(null), o = c(null), [m, k] = g(), [v, d] = g(!1), i = c(null), L = j(() => {
35
+ r && t.current && (t.current.playSegments(w, !0), d(!0));
35
36
  }, [r]);
36
37
  return B(() => () => {
37
38
  i.current && clearTimeout(i.current);
38
- }, [r]), T(R, () => ({
39
- playOutroAndFadeOut: async () => new Promise((W) => {
40
- var f, p;
41
- const d = () => {
42
- var h;
43
- W(), (h = t.current) == null || h.removeEventListener("complete", d);
39
+ }, [r]), T(W, () => ({
40
+ playOutroAndFadeOut: async () => new Promise((b) => {
41
+ var f, h;
42
+ const p = () => {
43
+ var $;
44
+ b(), ($ = t.current) == null || $.removeEventListener("complete", p);
44
45
  };
45
- (f = t.current) == null || f.playSegments(w, !0), i.current = setTimeout(() => m(!1), 400), (p = t.current) == null || p.addEventListener("complete", d);
46
+ (f = t.current) == null || f.playSegments(R, !0), i.current = setTimeout(() => d(!1), 400), (h = t.current) == null || h.addEventListener("complete", p);
46
47
  })
47
- })), j(() => {
48
+ })), F(() => {
48
49
  o.current && k(o.current.offsetHeight);
49
50
  }, []), /* @__PURE__ */ n(
50
- X,
51
+ D,
51
52
  {
52
53
  $flex: 1,
53
54
  $flexDirection: "column",
@@ -57,19 +58,19 @@ const G = {
57
58
  $height: "100%",
58
59
  ref: o,
59
60
  children: [
60
- u && /* @__PURE__ */ e(
61
- N,
61
+ m && /* @__PURE__ */ e(
62
+ O,
62
63
  {
63
64
  width: 1280,
64
- height: u,
65
+ height: m,
65
66
  src: r,
66
67
  ref: t,
67
68
  onRender: L,
68
- settings: G
69
+ settings: Q
69
70
  }
70
71
  ),
71
72
  /* @__PURE__ */ n(
72
- D,
73
+ K,
73
74
  {
74
75
  $width: 400,
75
76
  $height: 400,
@@ -78,7 +79,7 @@ const G = {
78
79
  $justifyContent: "center",
79
80
  children: [
80
81
  l && /* @__PURE__ */ e(
81
- F,
82
+ M,
82
83
  {
83
84
  radius: 200,
84
85
  strokeWidth: 2,
@@ -88,35 +89,36 @@ const G = {
88
89
  duration: 1
89
90
  }
90
91
  ),
91
- /* @__PURE__ */ n(K, { $isVisible: v, $width: "100%", children: [
92
- a && /* @__PURE__ */ n(M, { $gutterX: 3.5, children: [
93
- /* @__PURE__ */ e(V, { $renderAs: "ab2", $color: "WHITE", $align: "center", children: a }),
94
- /* @__PURE__ */ e(O, { heightX: 1 })
92
+ /* @__PURE__ */ n(Y, { $isVisible: v, $width: "100%", children: [
93
+ a && /* @__PURE__ */ n(N, { $gutterX: 3.5, children: [
94
+ /* @__PURE__ */ e(X, { $renderAs: "ab2", $color: "WHITE", $align: "center", children: a }),
95
+ /* @__PURE__ */ e(V, { heightX: 1 })
95
96
  ] }),
96
- /* @__PURE__ */ e(Y, { children: C })
97
+ /* @__PURE__ */ e(_, { children: y })
97
98
  ] })
98
99
  ]
99
100
  }
100
101
  ),
101
- A && /* @__PURE__ */ e(_, { children: /* @__PURE__ */ e(
102
- g,
102
+ u && /* @__PURE__ */ e(q, { $alignItems: "center", $justifyContent: "center", children: u }),
103
+ S && /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(
104
+ C,
103
105
  {
104
106
  Icon: P,
105
107
  renderAs: "secondary-dark",
106
108
  analyticsLabel: "Prev",
107
- onClick: y,
109
+ onClick: I,
108
110
  disabled: s,
109
111
  size: "small"
110
112
  }
111
113
  ) }),
112
- x && /* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(
113
- g,
114
+ A && /* @__PURE__ */ e(J, { children: /* @__PURE__ */ e(
115
+ C,
114
116
  {
115
117
  size: "small",
116
118
  Icon: z,
117
119
  renderAs: "secondary-dark",
118
120
  analyticsLabel: "Next",
119
- onClick: I,
121
+ onClick: x,
120
122
  busy: s
121
123
  }
122
124
  ) })
@@ -124,8 +126,8 @@ const G = {
124
126
  }
125
127
  );
126
128
  }
127
- ), se = b(J);
129
+ ), ue = E(U);
128
130
  export {
129
- se as default
131
+ ue as default
130
132
  };
131
133
  //# sourceMappingURL=circular-step-wrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"circular-step-wrapper.js","sources":["../../../../../src/features/auth/signup/circular-step-wrapper/circular-step-wrapper.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../../ui/lottie-animation/types';\nimport type { ICircularStepRef, ICircularStepWrapperProps } from './circular-step-wrapper-types';\n\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useLayoutEffect,\n useRef,\n useState,\n memo,\n type Ref,\n} from 'react';\n\nimport Back2Icon from '../../../../assets/line-icons/icons/back2';\nimport Next2Icon from '../../../../assets/line-icons/icons/next2';\nimport AnimatedArc from '../../../ui/animated-arc/animated-arc';\nimport IconButton from '../../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../ui/lottie-animation/lottie-animation';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport * as Styled from './circular-step-wrapper-styled';\n\nconst animationSettings = {\n autoplay: false,\n loop: false,\n renderer: 'canvas',\n rendererSettings: {\n preserveAspectRatio: 'xMidYMin slice',\n },\n};\n\nconst CircularStepWrapper = forwardRef<ICircularStepRef, ICircularStepWrapperProps>(\n (\n {\n children,\n onGoBack,\n onNext,\n label,\n showNext,\n showPrevious,\n animation,\n introFrames,\n outroFrames,\n isNextLoading,\n progressAngle,\n },\n ref: Ref<ICircularStepRef>,\n ) => {\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const [containerHeight, setContainerHeight] = useState<number | undefined>();\n const [showContent, setShowContent] = useState(false);\n const timeoutRef = useRef<NodeJS.Timeout | null>(null);\n\n const onLottieRender = useCallback(() => {\n if (animation && animationRef.current) {\n animationRef.current.playSegments(introFrames, true);\n setShowContent(true);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [animation]);\n\n useEffect(() => {\n return () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n };\n }, [animation]);\n\n useImperativeHandle(ref, () => ({\n playOutroAndFadeOut: async () => {\n return new Promise<void>(resolve => {\n const handleComplete = () => {\n resolve();\n animationRef.current?.removeEventListener('complete', handleComplete);\n };\n\n animationRef.current?.playSegments(outroFrames, true);\n timeoutRef.current = setTimeout(() => setShowContent(false), 400);\n animationRef.current?.addEventListener('complete', handleComplete);\n });\n },\n }));\n\n useLayoutEffect(() => {\n if (containerRef.current) {\n setContainerHeight(containerRef.current.offsetHeight);\n }\n }, []);\n\n return (\n <Styled.Container\n $flex={1}\n $flexDirection=\"column\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $width=\"100%\"\n $height=\"100%\"\n ref={containerRef}\n >\n {containerHeight && (\n <LottieAnimation\n width={1280}\n height={containerHeight}\n src={animation}\n ref={animationRef}\n onRender={onLottieRender}\n settings={animationSettings}\n />\n )}\n <Styled.CircularStepContainer\n $width={400}\n $height={400}\n $background=\"REAL_BLACK\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n {progressAngle && (\n <AnimatedArc\n radius={200}\n strokeWidth={2}\n color=\"WHITE\"\n targetAngle={progressAngle}\n mode=\"fade\"\n duration={1}\n />\n )}\n <Styled.ContentWrapper $isVisible={showContent} $width=\"100%\">\n {label && (\n <FlexView $gutterX={3.5}>\n <Text $renderAs=\"ab2\" $color=\"WHITE\" $align=\"center\">\n {label}\n </Text>\n <Separator heightX={1} />\n </FlexView>\n )}\n <Styled.InputContainer>{children}</Styled.InputContainer>\n </Styled.ContentWrapper>\n </Styled.CircularStepContainer>\n {showPrevious && (\n <Styled.PrevButtonWrapper>\n <IconButton\n Icon={Back2Icon}\n renderAs=\"secondary-dark\"\n analyticsLabel=\"Prev\"\n onClick={onGoBack}\n disabled={isNextLoading}\n size=\"small\"\n />\n </Styled.PrevButtonWrapper>\n )}\n {showNext && (\n <Styled.NextButtonWrapper>\n <IconButton\n size=\"small\"\n Icon={Next2Icon}\n renderAs=\"secondary-dark\"\n analyticsLabel=\"Next\"\n onClick={onNext}\n busy={isNextLoading}\n />\n </Styled.NextButtonWrapper>\n )}\n </Styled.Container>\n );\n },\n);\n\nexport default memo(CircularStepWrapper);\n"],"names":["animationSettings","CircularStepWrapper","forwardRef","children","onGoBack","onNext","label","showNext","showPrevious","animation","introFrames","outroFrames","isNextLoading","progressAngle","ref","animationRef","useRef","containerRef","containerHeight","setContainerHeight","useState","showContent","setShowContent","timeoutRef","onLottieRender","useCallback","useEffect","useImperativeHandle","resolve","handleComplete","_a","_b","useLayoutEffect","jsxs","Styled.Container","jsx","LottieAnimation","Styled.CircularStepContainer","AnimatedArc","Styled.ContentWrapper","FlexView","Text","Separator","Styled.InputContainer","Styled.PrevButtonWrapper","IconButton","Back2Icon","Styled.NextButtonWrapper","Next2Icon","circularStepWrapper","memo"],"mappings":";;;;;;;;;;;AAyBA,MAAMA,IAAoB;AAAA,EACxB,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AAAA,EACV,kBAAkB;AAAA,IAChB,qBAAqB;AAAA,EACvB;AACF,GAEMC,IAAsBC;AAAA,EAC1B,CACE;AAAA,IACE,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,a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AAA,cACL,MAAMG;AAAA,cACN,UAAS;AAAA,cACT,gBAAe;AAAA,cACf,SAAS3C;AAAA,cACT,MAAMO;AAAA,YAAA;AAAA,UAAA,GAEV;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF,GAEeqC,KAAAC,EAAKjD,CAAmB;"}
1
+ {"version":3,"file":"circular-step-wrapper.js","sources":["../../../../../src/features/auth/signup/circular-step-wrapper/circular-step-wrapper.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../../ui/lottie-animation/types';\nimport type { ICircularStepRef, ICircularStepWrapperProps } from './circular-step-wrapper-types';\n\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useLayoutEffect,\n useRef,\n useState,\n memo,\n type Ref,\n} from 'react';\n\nimport Back2Icon from '../../../../assets/line-icons/icons/back2';\nimport Next2Icon from '../../../../assets/line-icons/icons/next2';\nimport AnimatedArc from '../../../ui/animated-arc/animated-arc';\nimport IconButton from '../../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../ui/lottie-animation/lottie-animation';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport * as Styled from './circular-step-wrapper-styled';\n\nconst animationSettings = {\n autoplay: false,\n loop: false,\n renderer: 'canvas',\n rendererSettings: {\n preserveAspectRatio: 'xMidYMin slice',\n },\n};\n\nconst CircularStepWrapper = forwardRef<ICircularStepRef, ICircularStepWrapperProps>(\n (\n {\n children,\n onGoBack,\n onNext,\n label,\n showNext,\n showPrevious,\n animation,\n introFrames,\n outroFrames,\n isNextLoading,\n progressAngle,\n footerElement,\n },\n ref: Ref<ICircularStepRef>,\n ) => {\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const [containerHeight, setContainerHeight] = useState<number | undefined>();\n const [showContent, setShowContent] = useState(false);\n const timeoutRef = useRef<NodeJS.Timeout | null>(null);\n\n const onLottieRender = useCallback(() => {\n if (animation && animationRef.current) {\n animationRef.current.playSegments(introFrames, true);\n setShowContent(true);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [animation]);\n\n useEffect(() => {\n return () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n };\n }, [animation]);\n\n useImperativeHandle(ref, () => ({\n playOutroAndFadeOut: async () => {\n return new Promise<void>(resolve => {\n const handleComplete = () => {\n resolve();\n animationRef.current?.removeEventListener('complete', handleComplete);\n };\n\n animationRef.current?.playSegments(outroFrames, true);\n timeoutRef.current = setTimeout(() => setShowContent(false), 400);\n animationRef.current?.addEventListener('complete', handleComplete);\n });\n },\n }));\n\n useLayoutEffect(() => {\n if (containerRef.current) {\n setContainerHeight(containerRef.current.offsetHeight);\n }\n }, []);\n\n return (\n <Styled.Container\n $flex={1}\n $flexDirection=\"column\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $width=\"100%\"\n $height=\"100%\"\n ref={containerRef}\n >\n {containerHeight && (\n <LottieAnimation\n width={1280}\n height={containerHeight}\n src={animation}\n ref={animationRef}\n onRender={onLottieRender}\n settings={animationSettings}\n />\n )}\n <Styled.CircularStepContainer\n $width={400}\n $height={400}\n $background=\"REAL_BLACK\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n {progressAngle && (\n <AnimatedArc\n radius={200}\n strokeWidth={2}\n color=\"WHITE\"\n targetAngle={progressAngle}\n mode=\"fade\"\n duration={1}\n />\n )}\n <Styled.ContentWrapper $isVisible={showContent} $width=\"100%\">\n {label && (\n <FlexView $gutterX={3.5}>\n <Text $renderAs=\"ab2\" $color=\"WHITE\" $align=\"center\">\n {label}\n </Text>\n <Separator heightX={1} />\n </FlexView>\n )}\n <Styled.InputContainer>{children}</Styled.InputContainer>\n </Styled.ContentWrapper>\n </Styled.CircularStepContainer>\n {footerElement && (\n <Styled.FooterWrapper $alignItems=\"center\" $justifyContent=\"center\">\n {footerElement}\n </Styled.FooterWrapper>\n )}\n {showPrevious && (\n <Styled.PrevButtonWrapper>\n <IconButton\n Icon={Back2Icon}\n renderAs=\"secondary-dark\"\n analyticsLabel=\"Prev\"\n onClick={onGoBack}\n disabled={isNextLoading}\n size=\"small\"\n />\n </Styled.PrevButtonWrapper>\n )}\n {showNext && (\n <Styled.NextButtonWrapper>\n <IconButton\n size=\"small\"\n Icon={Next2Icon}\n renderAs=\"secondary-dark\"\n analyticsLabel=\"Next\"\n onClick={onNext}\n busy={isNextLoading}\n />\n </Styled.NextButtonWrapper>\n )}\n </Styled.Container>\n );\n },\n);\n\nexport default memo(CircularStepWrapper);\n"],"names":["animationSettings","CircularStepWrapper","forwardRef","children","onGoBack","onNext","label","showNext","showPrevious","animation","introFrames","outroFrames","isNextLoading","progressAngle","footerElement","ref","animationRef","useRef","containerRef","containerHeight","setContainerHeight","useState","showContent","setShowContent","timeoutRef","onLottieRender","useCallback","useEffect","useImperativeHandle","resolve","handleComplete","_a","_b","useLayoutEffect","jsxs","Styled.Container","jsx","LottieAnimation","Styled.CircularStepContainer","AnimatedArc","Styled.ContentWrapper","FlexView","Text","Separator","Styled.InputContainer","Styled.FooterWrapper","Styled.PrevButtonWrapper","IconButton","Back2Icon","Styled.NextButtonWrapper","Next2Icon","circularStepWrapper","memo"],"mappings":";;;;;;;;;;;AAyBA,MAAMA,IAAoB;AAAA,EACxB,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AAAA,EACV,kBAAkB;AAAA,IAChB,qBAAqB;AAAA,EACvB;AACF,GAEMC,IAAsBC;AAAA,EAC1B,CACE;AAAA,IACE,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,aAAAC;AAAA,IACA,eAAAC;AAAA,IACA,eAAAC;AAAA,IACA,eAAAC;AAAA,KAEFC,MACG;AACG,UAAAC,IAAeC,EAAmC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AAS;AAAA,cACT,gBAAe;AAAA,cACf,SAAS7C;AAAA,cACT,MAAMO;AAAA,YAAA;AAAA,UAAA,GAEV;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF,GAEeuC,KAAAC,EAAKnD,CAAmB;"}
package/dist/index.d.ts CHANGED
@@ -1062,6 +1062,7 @@ declare interface ICircularStepWrapperProps {
1062
1062
  showPrevious?: boolean;
1063
1063
  isNextLoading?: boolean;
1064
1064
  progressAngle?: number;
1065
+ footerElement?: JSX.Element;
1065
1066
  }
1066
1067
 
1067
1068
  declare interface IClaimUserAccountProps {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuemath/leap",
3
- "version": "3.0.19",
3
+ "version": "3.0.20-j",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"