@cuemath/leap 3.3.5 → 3.3.6
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/assets/illustrations/illustrations.js +3 -1
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/lottie/lottie.js +1 -0
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/constants/config.js +5 -0
- package/dist/constants/config.js.map +1 -0
- package/dist/features/auth/comps/otp-input/otp-input.js +19 -18
- package/dist/features/auth/comps/otp-input/otp-input.js.map +1 -1
- package/dist/features/auth/comps/pill-button/pill-button-styled.js +17 -17
- package/dist/features/auth/comps/pill-button/pill-button-styled.js.map +1 -1
- package/dist/features/auth/comps/pill-button/pill-button.js +35 -33
- package/dist/features/auth/comps/pill-button/pill-button.js.map +1 -1
- package/dist/features/auth/comps/user-list/user-item/user-item.js +32 -30
- package/dist/features/auth/comps/user-list/user-item/user-item.js.map +1 -1
- package/dist/features/auth/comps/user-list/user-list.js +20 -19
- package/dist/features/auth/comps/user-list/user-list.js.map +1 -1
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-constants.js +9 -9
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-constants.js.map +1 -1
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-styled.js +58 -29
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-styled.js.map +1 -1
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide.js +78 -41
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide.js.map +1 -1
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.js +37 -35
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.js.map +1 -1
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js +76 -71
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js.map +1 -1
- package/dist/features/auth/signup/custom-input-field/custom-input-field.js +55 -50
- package/dist/features/auth/signup/custom-input-field/custom-input-field.js.map +1 -1
- package/dist/features/auth/signup/custom-input-field/input-wrapper/input-wrapper.js +47 -25
- package/dist/features/auth/signup/custom-input-field/input-wrapper/input-wrapper.js.map +1 -1
- package/dist/features/milestone/constants.js +2 -1
- package/dist/features/milestone/constants.js.map +1 -1
- package/dist/features/milestone/create/comps/goal-completion-date-selector/goal-completion-date-selector.js +6 -6
- package/dist/features/parent-dashboard/comps/cuemath-app-features/cuemath-app-features-constants.js +25 -0
- package/dist/features/parent-dashboard/comps/cuemath-app-features/cuemath-app-features-constants.js.map +1 -0
- package/dist/features/parent-dashboard/comps/cuemath-app-features/cuemath-app-features-styled.js +15 -0
- package/dist/features/parent-dashboard/comps/cuemath-app-features/cuemath-app-features-styled.js.map +1 -0
- package/dist/features/parent-dashboard/comps/cuemath-app-features/cuemath-app-features.js +90 -0
- package/dist/features/parent-dashboard/comps/cuemath-app-features/cuemath-app-features.js.map +1 -0
- package/dist/features/parent-dashboard/comps/math-practice/math-practice-constants.js +19 -0
- package/dist/features/parent-dashboard/comps/math-practice/math-practice-constants.js.map +1 -0
- package/dist/features/parent-dashboard/comps/math-practice/math-practice-styled.js +32 -0
- package/dist/features/parent-dashboard/comps/math-practice/math-practice-styled.js.map +1 -0
- package/dist/features/parent-dashboard/comps/math-practice/math-practice.js +67 -0
- package/dist/features/parent-dashboard/comps/math-practice/math-practice.js.map +1 -0
- package/dist/features/parent-dashboard/comps/parent-dashboard-faqs/parent-dashboard-faqs-constants.js +42 -0
- package/dist/features/parent-dashboard/comps/parent-dashboard-faqs/parent-dashboard-faqs-constants.js.map +1 -0
- package/dist/features/parent-dashboard/comps/parent-dashboard-faqs/parent-dashboard-faqs.js +20 -0
- package/dist/features/parent-dashboard/comps/parent-dashboard-faqs/parent-dashboard-faqs.js.map +1 -0
- package/dist/features/student-details/class-details/class-details-utils.js +6 -6
- package/dist/features/trial-session/comps/pla/next-steps/next-steps-constants.js +25 -0
- package/dist/features/trial-session/comps/pla/next-steps/next-steps-constants.js.map +1 -0
- package/dist/features/trial-session/comps/pla/next-steps/next-steps-styled.js +43 -0
- package/dist/features/trial-session/comps/pla/next-steps/next-steps-styled.js.map +1 -0
- package/dist/features/trial-session/comps/pla/next-steps/next-steps.js +49 -0
- package/dist/features/trial-session/comps/pla/next-steps/next-steps.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-countdown.js +29 -0
- package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-countdown.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-status-config.js +131 -0
- package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-status-config.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status-constants.js +11 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status-constants.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status-helpers.js +19 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status-helpers.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status-styled.js +17 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status-styled.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status.js +126 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js +52 -0
- package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-summary/session-summary.js +52 -0
- package/dist/features/trial-session/comps/pla/session-summary/session-summary.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card-styled.js +17 -0
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card-styled.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js +56 -0
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js.map +1 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-constants.js +5 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-constants.js.map +1 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-styled.js +17 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-styled.js.map +1 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-types.js +5 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-types.js.map +1 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js +96 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js.map +1 -0
- package/dist/features/trial-session/comps/session-report/report-information/report-card.js +31 -16
- package/dist/features/trial-session/comps/session-report/report-information/report-card.js.map +1 -1
- package/dist/features/trial-session/comps/session-report/report-information/report-information-styled.js +21 -13
- package/dist/features/trial-session/comps/session-report/report-information/report-information-styled.js.map +1 -1
- package/dist/features/trial-session/comps/session-report/report-information/report-information.js +166 -94
- package/dist/features/trial-session/comps/session-report/report-information/report-information.js.map +1 -1
- package/dist/features/trial-session/comps/student-profile/student-profile-highlights/student-profile-highlights.js +46 -31
- package/dist/features/trial-session/comps/student-profile/student-profile-highlights/student-profile-highlights.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-helpers.js +12 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-helpers.js.map +1 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js +121 -42
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js +174 -56
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +1 -1
- package/dist/features/trial-session/trial-session-types.js.map +1 -1
- package/dist/features/ui/buttons/icon-button/icon-button.js +32 -29
- package/dist/features/ui/buttons/icon-button/icon-button.js.map +1 -1
- package/dist/features/ui/modals/modal.js +30 -28
- package/dist/features/ui/modals/modal.js.map +1 -1
- package/dist/index.d.ts +95 -10
- package/dist/index.js +388 -368
- package/dist/index.js.map +1 -1
- package/dist/node_modules/date-fns/_lib/getRoundingMethod.js +10 -0
- package/dist/node_modules/date-fns/_lib/getRoundingMethod.js.map +1 -0
- package/dist/node_modules/date-fns/differenceInMilliseconds.js +9 -0
- package/dist/node_modules/date-fns/differenceInMilliseconds.js.map +1 -0
- package/dist/node_modules/date-fns/differenceInSeconds.js +11 -0
- package/dist/node_modules/date-fns/differenceInSeconds.js.map +1 -0
- package/dist/node_modules/date-fns/fromUnixTime.js +9 -0
- package/dist/node_modules/date-fns/fromUnixTime.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/native.js +7 -0
- package/dist/node_modules/uuid/dist/esm-browser/native.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +3 -2
- package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +6 -10
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +12 -9
- package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
- package/dist/static/{book-checked-green.c275dbd9.svg → book-checked-green.0436b91e.svg} +1 -1
- package/dist/static/community-bulb-yellow-2.f89c30f9.svg +1 -0
- package/dist/static/learning-puzzle-bot.6fe93cf6.svg +1 -0
- package/dist/static/username-responsive.787b5515.json +1 -0
- package/package.json +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +0 -5
- package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +0 -8
- package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +0 -1
|
@@ -1,54 +1,58 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { memo as j, forwardRef as M, useRef as l, useState as g, useCallback as F, useEffect as O, useImperativeHandle as P, useLayoutEffect as z } from "react";
|
|
3
|
+
import { useTheme as D } from "styled-components";
|
|
4
|
+
import V from "../../../../assets/line-icons/icons/back2.js";
|
|
5
|
+
import X from "../../../../assets/line-icons/icons/next2.js";
|
|
6
|
+
import K from "../../../ui/animated-arc/animated-arc.js";
|
|
7
|
+
import y from "../../../ui/buttons/icon-button/icon-button.js";
|
|
7
8
|
import N from "../../../ui/layout/flex-view.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
|
|
9
|
+
import Y from "../../../ui/lottie-animation/lottie-animation.js";
|
|
10
|
+
import _ from "../../../ui/separator/separator.js";
|
|
11
|
+
import q from "../../../ui/text/text.js";
|
|
12
|
+
import { EDeviceType as G } from "../../../ui/theme/constants.js";
|
|
13
|
+
import { Container as J, CircularStepContainer as Q, ContentWrapper as U, InputContainer as Z, FooterWrapper as ee, PrevButtonWrapper as te, NextButtonWrapper as re } from "./circular-step-wrapper-styled.js";
|
|
14
|
+
const ne = {
|
|
13
15
|
autoplay: !1,
|
|
14
16
|
loop: !1,
|
|
15
17
|
renderer: "canvas",
|
|
16
18
|
rendererSettings: {
|
|
17
19
|
preserveAspectRatio: "xMidYMin slice"
|
|
18
20
|
}
|
|
19
|
-
},
|
|
21
|
+
}, oe = M(
|
|
20
22
|
({
|
|
21
|
-
children:
|
|
22
|
-
onGoBack:
|
|
23
|
-
onNext:
|
|
24
|
-
label:
|
|
25
|
-
showNext:
|
|
26
|
-
showPrevious:
|
|
23
|
+
children: I,
|
|
24
|
+
onGoBack: b,
|
|
25
|
+
onNext: v,
|
|
26
|
+
label: u,
|
|
27
|
+
showNext: S,
|
|
28
|
+
showPrevious: k,
|
|
27
29
|
animation: r,
|
|
28
30
|
introFrames: w,
|
|
29
|
-
outroFrames:
|
|
30
|
-
isNextLoading:
|
|
31
|
-
progressAngle:
|
|
32
|
-
footerElement:
|
|
31
|
+
outroFrames: x,
|
|
32
|
+
isNextLoading: i,
|
|
33
|
+
progressAngle: c,
|
|
34
|
+
footerElement: m,
|
|
35
|
+
isNextDisabled: A,
|
|
36
|
+
animationSrcMobile: R
|
|
33
37
|
}, W) => {
|
|
34
|
-
const t =
|
|
35
|
-
r && t.current && (t.current.playSegments(w, !0),
|
|
38
|
+
const t = l(null), s = l(null), [d, E] = g(), [L, p] = g(!1), a = l(null), { device: T } = D(), n = T <= G.MOBILE, B = F(() => {
|
|
39
|
+
r && t.current && (t.current.playSegments(w, !0), p(!0));
|
|
36
40
|
}, [r]);
|
|
37
|
-
return
|
|
38
|
-
|
|
39
|
-
}, [r]),
|
|
40
|
-
playOutroAndFadeOut: async () => new Promise((
|
|
41
|
-
var
|
|
42
|
-
const
|
|
43
|
-
var
|
|
44
|
-
|
|
41
|
+
return O(() => () => {
|
|
42
|
+
a.current && clearTimeout(a.current);
|
|
43
|
+
}, [r]), P(W, () => ({
|
|
44
|
+
playOutroAndFadeOut: async () => new Promise((H) => {
|
|
45
|
+
var h, $;
|
|
46
|
+
const f = () => {
|
|
47
|
+
var C;
|
|
48
|
+
H(), (C = t.current) == null || C.removeEventListener("complete", f);
|
|
45
49
|
};
|
|
46
|
-
(
|
|
50
|
+
(h = t.current) == null || h.playSegments(x, !0), a.current = setTimeout(() => p(!1), 400), ($ = t.current) == null || $.addEventListener("complete", f);
|
|
47
51
|
})
|
|
48
|
-
})),
|
|
49
|
-
|
|
50
|
-
}, []), /* @__PURE__ */
|
|
51
|
-
|
|
52
|
+
})), z(() => {
|
|
53
|
+
s.current && E(s.current.offsetHeight);
|
|
54
|
+
}, []), /* @__PURE__ */ o(
|
|
55
|
+
J,
|
|
52
56
|
{
|
|
53
57
|
$flex: 1,
|
|
54
58
|
$flexDirection: "column",
|
|
@@ -56,78 +60,79 @@ const Q = {
|
|
|
56
60
|
$justifyContent: "center",
|
|
57
61
|
$width: "100%",
|
|
58
62
|
$height: "100%",
|
|
59
|
-
ref:
|
|
63
|
+
ref: s,
|
|
60
64
|
children: [
|
|
61
|
-
|
|
62
|
-
|
|
65
|
+
d && /* @__PURE__ */ e(
|
|
66
|
+
Y,
|
|
63
67
|
{
|
|
64
68
|
width: 1280,
|
|
65
|
-
height:
|
|
66
|
-
src: r,
|
|
69
|
+
height: d,
|
|
70
|
+
src: n ? R ?? r : r,
|
|
67
71
|
ref: t,
|
|
68
|
-
onRender:
|
|
69
|
-
settings:
|
|
72
|
+
onRender: B,
|
|
73
|
+
settings: ne
|
|
70
74
|
}
|
|
71
75
|
),
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
|
|
76
|
+
/* @__PURE__ */ o(
|
|
77
|
+
Q,
|
|
74
78
|
{
|
|
75
|
-
$width: 400,
|
|
76
|
-
$height: 400,
|
|
79
|
+
$width: n ? 290 : 400,
|
|
80
|
+
$height: n ? 290 : 400,
|
|
77
81
|
$background: "REAL_BLACK",
|
|
78
82
|
$alignItems: "center",
|
|
79
83
|
$justifyContent: "center",
|
|
80
84
|
children: [
|
|
81
|
-
|
|
82
|
-
|
|
85
|
+
c && /* @__PURE__ */ e(
|
|
86
|
+
K,
|
|
83
87
|
{
|
|
84
|
-
radius: 200,
|
|
88
|
+
radius: c ? 145 : 200,
|
|
85
89
|
strokeWidth: 2,
|
|
86
90
|
color: "WHITE",
|
|
87
|
-
targetAngle:
|
|
91
|
+
targetAngle: c,
|
|
88
92
|
mode: "fade",
|
|
89
93
|
duration: 1
|
|
90
94
|
}
|
|
91
95
|
),
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
|
|
94
|
-
/* @__PURE__ */ e(
|
|
95
|
-
/* @__PURE__ */ e(
|
|
96
|
+
/* @__PURE__ */ o(U, { $isVisible: L, $width: "100%", children: [
|
|
97
|
+
u && /* @__PURE__ */ o(N, { $gutterX: n ? 1.5 : 3.5, children: [
|
|
98
|
+
/* @__PURE__ */ e(q, { $renderAs: "ab2", $color: "WHITE", $align: "center", children: u }),
|
|
99
|
+
/* @__PURE__ */ e(_, { heightX: 1 })
|
|
96
100
|
] }),
|
|
97
|
-
/* @__PURE__ */ e(
|
|
101
|
+
/* @__PURE__ */ e(Z, { children: I })
|
|
98
102
|
] })
|
|
99
103
|
]
|
|
100
104
|
}
|
|
101
105
|
),
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
106
|
+
m && /* @__PURE__ */ e(ee, { $alignItems: "center", $justifyContent: "center", children: m }),
|
|
107
|
+
k && /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(
|
|
108
|
+
y,
|
|
105
109
|
{
|
|
106
|
-
Icon:
|
|
107
|
-
renderAs: "
|
|
110
|
+
Icon: V,
|
|
111
|
+
renderAs: "black-dark",
|
|
108
112
|
analyticsLabel: "Prev",
|
|
109
|
-
onClick:
|
|
110
|
-
disabled:
|
|
113
|
+
onClick: b,
|
|
114
|
+
disabled: i,
|
|
111
115
|
size: "small"
|
|
112
116
|
}
|
|
113
117
|
) }),
|
|
114
|
-
|
|
115
|
-
|
|
118
|
+
S && /* @__PURE__ */ e(re, { children: /* @__PURE__ */ e(
|
|
119
|
+
y,
|
|
116
120
|
{
|
|
117
121
|
size: "small",
|
|
118
|
-
Icon:
|
|
122
|
+
Icon: X,
|
|
119
123
|
renderAs: "secondary-dark",
|
|
120
124
|
analyticsLabel: "Next",
|
|
121
|
-
onClick:
|
|
122
|
-
busy:
|
|
125
|
+
onClick: v,
|
|
126
|
+
busy: i,
|
|
127
|
+
disabled: i || A
|
|
123
128
|
}
|
|
124
129
|
) })
|
|
125
130
|
]
|
|
126
131
|
}
|
|
127
132
|
);
|
|
128
133
|
}
|
|
129
|
-
),
|
|
134
|
+
), ge = j(oe);
|
|
130
135
|
export {
|
|
131
|
-
|
|
136
|
+
ge as default
|
|
132
137
|
};
|
|
133
138
|
//# 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 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=\"
|
|
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';\nimport { useTheme } from 'styled-components';\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 { EDeviceType } from '../../../ui/theme/constants';\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 isNextDisabled,\n animationSrcMobile,\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 const { device } = useTheme();\n const isMobile = device <= EDeviceType.MOBILE;\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={isMobile ? animationSrcMobile ?? animation : animation}\n ref={animationRef}\n onRender={onLottieRender}\n settings={animationSettings}\n />\n )}\n <Styled.CircularStepContainer\n $width={isMobile ? 290 : 400}\n $height={isMobile ? 290 : 400}\n $background=\"REAL_BLACK\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n {progressAngle && (\n <AnimatedArc\n radius={progressAngle ? 145 : 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={isMobile ? 1.5 : 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=\"black-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 disabled={isNextLoading || isNextDisabled}\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","isNextDisabled","animationSrcMobile","ref","animationRef","useRef","containerRef","containerHeight","setContainerHeight","useState","showContent","setShowContent","timeoutRef","device","useTheme","isMobile","EDeviceType","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":"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"}
|
|
@@ -1,91 +1,96 @@
|
|
|
1
|
-
import { jsx as c, jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { useTheme as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { jsx as c, jsxs as K } from "react/jsx-runtime";
|
|
2
|
+
import { memo as L, useState as C, useRef as I, useCallback as p, useMemo as T, useEffect as W } from "react";
|
|
3
|
+
import { useTheme as A } from "styled-components";
|
|
4
|
+
import B from "../../../ui/layout/flex-view.js";
|
|
5
|
+
import { EDeviceType as H } from "../../../ui/theme/constants.js";
|
|
6
|
+
import N from "./country-selector/country-selector.js";
|
|
7
|
+
import { CustomInput as O } from "./custom-input-field-styled.js";
|
|
7
8
|
import X from "./input-wrapper/input-wrapper.js";
|
|
8
9
|
import _ from "./password-toggle/password-toggle.js";
|
|
9
10
|
const q = ({
|
|
10
|
-
value:
|
|
11
|
-
onChange:
|
|
11
|
+
value: r,
|
|
12
|
+
onChange: d,
|
|
12
13
|
error: u,
|
|
13
|
-
helperText:
|
|
14
|
+
helperText: b,
|
|
14
15
|
onEnter: n,
|
|
15
|
-
isLoading:
|
|
16
|
-
isValid:
|
|
17
|
-
type:
|
|
16
|
+
isLoading: D,
|
|
17
|
+
isValid: h,
|
|
18
|
+
type: t = "text",
|
|
18
19
|
placeholder: F,
|
|
19
20
|
actionElement: R,
|
|
20
21
|
maxLength: $,
|
|
21
|
-
width:
|
|
22
|
+
width: E,
|
|
22
23
|
textTransform: P,
|
|
23
|
-
textAlign:
|
|
24
|
-
selectedCountry:
|
|
25
|
-
onCountryChange:
|
|
26
|
-
autoSize:
|
|
24
|
+
textAlign: v = "center",
|
|
25
|
+
selectedCountry: M,
|
|
26
|
+
onCountryChange: S,
|
|
27
|
+
autoSize: x = !1
|
|
27
28
|
}) => {
|
|
28
|
-
const
|
|
29
|
-
(
|
|
30
|
-
|
|
29
|
+
const o = A(), l = o.device <= H.MOBILE, [f, V] = C(!1), [j, m] = C(l ? 24 : 32), a = I(null), s = I(null), k = p(
|
|
30
|
+
(e) => {
|
|
31
|
+
e.key === "Enter" && (n == null || n());
|
|
31
32
|
},
|
|
32
33
|
[n]
|
|
33
|
-
),
|
|
34
|
+
), y = T(() => t === "password" ? f ? "text" : "password" : t === "phone" ? "number" : t, [t, f]), z = T(() => u ? o.colors.RED : h ? o.colors.GREEN_4 : o.colors.WHITE, [u, h, o.colors]), w = p((e, g) => {
|
|
34
35
|
s.current || (s.current = document.createElement("canvas"));
|
|
35
36
|
const i = s.current.getContext("2d");
|
|
36
|
-
return i ? (i.font =
|
|
37
|
+
return i ? (i.font = g, i.measureText(e).width) : 0;
|
|
37
38
|
}, []);
|
|
38
|
-
|
|
39
|
-
if (!
|
|
39
|
+
W(() => {
|
|
40
|
+
if (!a.current || !r || !x)
|
|
40
41
|
return;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
if (l) {
|
|
43
|
+
m(24);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const e = a.current.clientWidth;
|
|
47
|
+
w(r, "32px 'Athletics-Light'") > e ? m(24) : m(32);
|
|
48
|
+
}, [r, w, x, l]), W(() => () => {
|
|
44
49
|
s.current = null;
|
|
45
50
|
}, []);
|
|
46
|
-
const
|
|
47
|
-
(
|
|
48
|
-
[
|
|
51
|
+
const G = p(
|
|
52
|
+
(e) => d(e.target.value),
|
|
53
|
+
[d]
|
|
49
54
|
);
|
|
50
55
|
return /* @__PURE__ */ c(
|
|
51
56
|
X,
|
|
52
57
|
{
|
|
53
|
-
helperText: u ||
|
|
54
|
-
isLoading:
|
|
58
|
+
helperText: u || b,
|
|
59
|
+
isLoading: D,
|
|
55
60
|
actionElement: R,
|
|
56
|
-
children: /* @__PURE__ */
|
|
57
|
-
|
|
61
|
+
children: /* @__PURE__ */ K(
|
|
62
|
+
B,
|
|
58
63
|
{
|
|
59
|
-
$width:
|
|
64
|
+
$width: E ?? "100%",
|
|
60
65
|
$flex: 1,
|
|
61
66
|
$alignItems: "center",
|
|
62
67
|
$flexDirection: "row",
|
|
63
68
|
$flexGapX: 0.5,
|
|
64
69
|
children: [
|
|
65
|
-
|
|
70
|
+
t === "phone" && /* @__PURE__ */ c(N, { onChange: S, value: M }),
|
|
66
71
|
/* @__PURE__ */ c(
|
|
67
|
-
|
|
72
|
+
O,
|
|
68
73
|
{
|
|
69
|
-
ref:
|
|
70
|
-
value:
|
|
71
|
-
onChange:
|
|
74
|
+
ref: a,
|
|
75
|
+
value: r,
|
|
76
|
+
onChange: G,
|
|
72
77
|
autoFocus: !0,
|
|
73
78
|
placeholder: F,
|
|
74
|
-
color:
|
|
79
|
+
color: z,
|
|
75
80
|
autoCapitalize: "none",
|
|
76
81
|
textTransform: P,
|
|
77
|
-
type:
|
|
78
|
-
onKeyDown:
|
|
82
|
+
type: y,
|
|
83
|
+
onKeyDown: k,
|
|
79
84
|
maxLength: $,
|
|
80
|
-
align:
|
|
81
|
-
fontSize:
|
|
85
|
+
align: v,
|
|
86
|
+
fontSize: j
|
|
82
87
|
}
|
|
83
88
|
),
|
|
84
|
-
|
|
89
|
+
t === "password" && /* @__PURE__ */ c(
|
|
85
90
|
_,
|
|
86
91
|
{
|
|
87
|
-
isVisible:
|
|
88
|
-
onToggle: () =>
|
|
92
|
+
isVisible: f,
|
|
93
|
+
onToggle: () => V((e) => !e)
|
|
89
94
|
}
|
|
90
95
|
)
|
|
91
96
|
]
|
|
@@ -93,8 +98,8 @@ const q = ({
|
|
|
93
98
|
)
|
|
94
99
|
}
|
|
95
100
|
);
|
|
96
|
-
},
|
|
101
|
+
}, ne = L(q);
|
|
97
102
|
export {
|
|
98
|
-
|
|
103
|
+
ne as default
|
|
99
104
|
};
|
|
100
105
|
//# sourceMappingURL=custom-input-field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-input-field.js","sources":["../../../../../src/features/auth/signup/custom-input-field/custom-input-field.tsx"],"sourcesContent":["import type { ICustomInputFieldProps } from './custom-input-field-types';\n\nimport {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n memo,\n type FC,\n type KeyboardEvent,\n type ChangeEvent,\n} from 'react';\nimport { useTheme } from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport PhoneCountrySelector from './country-selector/country-selector';\nimport * as Styled from './custom-input-field-styled';\nimport InputWrapper from './input-wrapper/input-wrapper';\nimport PasswordToggleIcon from './password-toggle/password-toggle';\n\nconst CustomInputField: FC<ICustomInputFieldProps> = ({\n value,\n onChange,\n error,\n helperText,\n onEnter,\n isLoading,\n isValid,\n type = 'text',\n placeholder,\n actionElement,\n maxLength,\n width,\n textTransform,\n textAlign = 'center',\n selectedCountry,\n onCountryChange,\n autoSize = false,\n}) => {\n const theme = useTheme();\n const [isPasswordVisible, setIsPasswordVisible] = useState(false);\n const [fontSize, setFontSize] = useState(32);\n const inputRef = useRef<HTMLInputElement>(null);\n const canvasRef = useRef<HTMLCanvasElement | null>(null);\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter') {\n onEnter?.();\n }\n },\n [onEnter],\n );\n\n const inputType = useMemo(() => {\n if (type === 'password') return isPasswordVisible ? 'text' : 'password';\n\n if (type === 'phone') return 'number';\n\n return type;\n }, [type, isPasswordVisible]);\n\n const inputColor = useMemo(() => {\n if (error) return theme.colors.RED;\n\n if (isValid) return theme.colors.GREEN_4;\n\n return theme.colors.WHITE;\n }, [error, isValid, theme.colors]);\n\n const measureTextWidth = useCallback((text: string, font: string): number => {\n if (!canvasRef.current) {\n canvasRef.current = document.createElement('canvas');\n }\n\n const context = canvasRef.current.getContext('2d');\n\n if (!context) return 0;\n\n context.font = font;\n\n return context.measureText(text).width;\n }, []);\n\n useEffect(() => {\n if (!inputRef.current || !value || !autoSize) {\n return;\n }\n\n const inputWidth = inputRef.current.clientWidth;\n\n const font32 = \"32px 'Athletics-Light'\";\n\n const textWidth32 = measureTextWidth(value, font32);\n\n if (textWidth32 > inputWidth) {\n setFontSize(24);\n } else {\n setFontSize(32);\n }\n }, [value, measureTextWidth, autoSize]);\n\n useEffect(() => {\n return () => {\n canvasRef.current = null;\n };\n }, []);\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => onChange(event.target.value),\n [onChange],\n );\n\n return (\n <InputWrapper\n helperText={error || helperText}\n isLoading={isLoading}\n actionElement={actionElement}\n >\n <FlexView\n $width={width ?? '100%'}\n $flex={1}\n $alignItems=\"center\"\n $flexDirection=\"row\"\n $flexGapX={0.5}\n >\n {type === 'phone' && (\n <PhoneCountrySelector onChange={onCountryChange} value={selectedCountry} />\n )}\n <Styled.CustomInput\n ref={inputRef}\n value={value}\n onChange={handleChange}\n autoFocus\n placeholder={placeholder}\n color={inputColor}\n autoCapitalize=\"none\"\n textTransform={textTransform}\n type={inputType}\n onKeyDown={handleKeyDown}\n maxLength={maxLength}\n align={textAlign}\n fontSize={fontSize}\n />\n {type === 'password' && (\n <PasswordToggleIcon\n isVisible={isPasswordVisible}\n onToggle={() => setIsPasswordVisible(prev => !prev)}\n />\n )}\n </FlexView>\n </InputWrapper>\n );\n};\n\nexport default memo(CustomInputField);\n"],"names":["CustomInputField","value","onChange","error","helperText","onEnter","isLoading","isValid","type","placeholder","actionElement","maxLength","width","textTransform","textAlign","selectedCountry","onCountryChange","autoSize","theme","useTheme","isPasswordVisible","setIsPasswordVisible","useState","fontSize","setFontSize","inputRef","useRef","canvasRef","handleKeyDown","useCallback","event","inputType","useMemo","inputColor","measureTextWidth","text","font","context","useEffect","inputWidth","handleChange","jsx","InputWrapper","jsxs","FlexView","PhoneCountrySelector","Styled.CustomInput","PasswordToggleIcon","prev","customInputField","memo"],"mappings":"
|
|
1
|
+
{"version":3,"file":"custom-input-field.js","sources":["../../../../../src/features/auth/signup/custom-input-field/custom-input-field.tsx"],"sourcesContent":["import type { ICustomInputFieldProps } from './custom-input-field-types';\n\nimport {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n memo,\n type FC,\n type KeyboardEvent,\n type ChangeEvent,\n} from 'react';\nimport { useTheme } from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport { EDeviceType } from '../../../ui/theme/constants';\nimport PhoneCountrySelector from './country-selector/country-selector';\nimport * as Styled from './custom-input-field-styled';\nimport InputWrapper from './input-wrapper/input-wrapper';\nimport PasswordToggleIcon from './password-toggle/password-toggle';\n\nconst CustomInputField: FC<ICustomInputFieldProps> = ({\n value,\n onChange,\n error,\n helperText,\n onEnter,\n isLoading,\n isValid,\n type = 'text',\n placeholder,\n actionElement,\n maxLength,\n width,\n textTransform,\n textAlign = 'center',\n selectedCountry,\n onCountryChange,\n autoSize = false,\n}) => {\n const theme = useTheme();\n const isMobile = theme.device <= EDeviceType.MOBILE;\n const [isPasswordVisible, setIsPasswordVisible] = useState(false);\n const [fontSize, setFontSize] = useState(isMobile ? 24 : 32);\n const inputRef = useRef<HTMLInputElement>(null);\n const canvasRef = useRef<HTMLCanvasElement | null>(null);\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter') {\n onEnter?.();\n }\n },\n [onEnter],\n );\n\n const inputType = useMemo(() => {\n if (type === 'password') return isPasswordVisible ? 'text' : 'password';\n\n if (type === 'phone') return 'number';\n\n return type;\n }, [type, isPasswordVisible]);\n\n const inputColor = useMemo(() => {\n if (error) return theme.colors.RED;\n\n if (isValid) return theme.colors.GREEN_4;\n\n return theme.colors.WHITE;\n }, [error, isValid, theme.colors]);\n\n const measureTextWidth = useCallback((text: string, font: string): number => {\n if (!canvasRef.current) {\n canvasRef.current = document.createElement('canvas');\n }\n\n const context = canvasRef.current.getContext('2d');\n\n if (!context) return 0;\n\n context.font = font;\n\n return context.measureText(text).width;\n }, []);\n\n useEffect(() => {\n if (!inputRef.current || !value || !autoSize) {\n return;\n }\n\n if (isMobile) {\n setFontSize(24);\n\n return;\n }\n\n const inputWidth = inputRef.current.clientWidth;\n\n const font32 = \"32px 'Athletics-Light'\";\n\n const textWidth32 = measureTextWidth(value, font32);\n\n if (textWidth32 > inputWidth) {\n setFontSize(24);\n } else {\n setFontSize(32);\n }\n }, [value, measureTextWidth, autoSize, isMobile]);\n\n useEffect(() => {\n return () => {\n canvasRef.current = null;\n };\n }, []);\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => onChange(event.target.value),\n [onChange],\n );\n\n return (\n <InputWrapper\n helperText={error || helperText}\n isLoading={isLoading}\n actionElement={actionElement}\n >\n <FlexView\n $width={width ?? '100%'}\n $flex={1}\n $alignItems=\"center\"\n $flexDirection=\"row\"\n $flexGapX={0.5}\n >\n {type === 'phone' && (\n <PhoneCountrySelector onChange={onCountryChange} value={selectedCountry} />\n )}\n <Styled.CustomInput\n ref={inputRef}\n value={value}\n onChange={handleChange}\n autoFocus\n placeholder={placeholder}\n color={inputColor}\n autoCapitalize=\"none\"\n textTransform={textTransform}\n type={inputType}\n onKeyDown={handleKeyDown}\n maxLength={maxLength}\n align={textAlign}\n fontSize={fontSize}\n />\n {type === 'password' && (\n <PasswordToggleIcon\n isVisible={isPasswordVisible}\n onToggle={() => setIsPasswordVisible(prev => !prev)}\n />\n )}\n </FlexView>\n </InputWrapper>\n );\n};\n\nexport default memo(CustomInputField);\n"],"names":["CustomInputField","value","onChange","error","helperText","onEnter","isLoading","isValid","type","placeholder","actionElement","maxLength","width","textTransform","textAlign","selectedCountry","onCountryChange","autoSize","theme","useTheme","isMobile","EDeviceType","isPasswordVisible","setIsPasswordVisible","useState","fontSize","setFontSize","inputRef","useRef","canvasRef","handleKeyDown","useCallback","event","inputType","useMemo","inputColor","measureTextWidth","text","font","context","useEffect","inputWidth","handleChange","jsx","InputWrapper","jsxs","FlexView","PhoneCountrySelector","Styled.CustomInput","PasswordToggleIcon","prev","customInputField","memo"],"mappings":"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"}
|
|
@@ -1,29 +1,51 @@
|
|
|
1
|
-
import { jsxs as t, jsx as
|
|
2
|
-
import { memo as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { memo as h } from "react";
|
|
3
|
+
import { useTheme as s } from "styled-components";
|
|
4
|
+
import { LOTTIE as f } from "../../../../../assets/lottie/lottie.js";
|
|
5
|
+
import i from "../../../../ui/layout/flex-view.js";
|
|
5
6
|
import $ from "../../../../ui/lottie-animation/lottie-animation.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
7
|
+
import o from "../../../../ui/separator/separator.js";
|
|
8
|
+
import l from "../../../../ui/text/text.js";
|
|
9
|
+
import { EDeviceType as a } from "../../../../ui/theme/constants.js";
|
|
10
|
+
import { ContentWrapper as d } from "./input-wrapper-styled.js";
|
|
11
|
+
const u = ({ children: p, helperText: n, actionElement: m, isLoading: c }) => {
|
|
12
|
+
const e = s().device <= a.MOBILE;
|
|
13
|
+
return /* @__PURE__ */ t(
|
|
14
|
+
i,
|
|
15
|
+
{
|
|
16
|
+
$flex: 1,
|
|
17
|
+
$gutterX: e ? 1.5 : 2,
|
|
18
|
+
$alignItems: "center",
|
|
19
|
+
$justifyContent: "center",
|
|
20
|
+
$width: "100%",
|
|
21
|
+
children: [
|
|
22
|
+
p,
|
|
23
|
+
/* @__PURE__ */ t(d, { $alignItems: "center", $justifyContent: "center", children: [
|
|
24
|
+
n && /* @__PURE__ */ t(i, { $gutterX: e ? 2.25 : 3.5, children: [
|
|
25
|
+
/* @__PURE__ */ r(l, { $renderAs: "ub2", $color: "WHITE_T_60", $align: "center", $whiteSpace: "pre-line", children: n }),
|
|
26
|
+
/* @__PURE__ */ r(o, { heightX: 0.5 })
|
|
27
|
+
] }),
|
|
28
|
+
m && /* @__PURE__ */ t(i, { $justifyContent: "center", $alignItems: "center", children: [
|
|
29
|
+
m,
|
|
30
|
+
/* @__PURE__ */ r(o, { heightX: 1 })
|
|
31
|
+
] }),
|
|
32
|
+
c && /* @__PURE__ */ t(i, { children: [
|
|
33
|
+
/* @__PURE__ */ r(o, { heightX: e ? 0.5 : 2 }),
|
|
34
|
+
/* @__PURE__ */ r(
|
|
35
|
+
$,
|
|
36
|
+
{
|
|
37
|
+
src: f.SPINNER_WHITE,
|
|
38
|
+
height: e ? 14 : 20,
|
|
39
|
+
width: e ? 14 : 40
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
] })
|
|
43
|
+
] })
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
}, L = h(u);
|
|
26
48
|
export {
|
|
27
|
-
|
|
49
|
+
L as default
|
|
28
50
|
};
|
|
29
51
|
//# sourceMappingURL=input-wrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-wrapper.js","sources":["../../../../../../src/features/auth/signup/custom-input-field/input-wrapper/input-wrapper.tsx"],"sourcesContent":["import type { IInputWrapperProps } from './input-wrapper-types';\n\nimport { memo } from 'react';\n\nimport { LOTTIE } from '../../../../../assets/lottie/lottie';\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 './input-wrapper-styled';\n\nconst InputWrapper = ({ children, helperText, actionElement, isLoading }: IInputWrapperProps) => {\n return (\n <FlexView
|
|
1
|
+
{"version":3,"file":"input-wrapper.js","sources":["../../../../../../src/features/auth/signup/custom-input-field/input-wrapper/input-wrapper.tsx"],"sourcesContent":["import type { IInputWrapperProps } from './input-wrapper-types';\n\nimport { memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { LOTTIE } from '../../../../../assets/lottie/lottie';\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 { EDeviceType } from '../../../../ui/theme/constants';\nimport * as Styled from './input-wrapper-styled';\n\nconst InputWrapper = ({ children, helperText, actionElement, isLoading }: IInputWrapperProps) => {\n const theme = useTheme();\n const isMobile = theme.device <= EDeviceType.MOBILE;\n\n return (\n <FlexView\n $flex={1}\n $gutterX={isMobile ? 1.5 : 2}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $width=\"100%\"\n >\n {children}\n <Styled.ContentWrapper $alignItems=\"center\" $justifyContent=\"center\">\n {helperText && (\n <FlexView $gutterX={isMobile ? 2.25 : 3.5}>\n <Text $renderAs=\"ub2\" $color=\"WHITE_T_60\" $align=\"center\" $whiteSpace=\"pre-line\">\n {helperText}\n </Text>\n <Separator heightX={0.5} />\n </FlexView>\n )}\n {actionElement && (\n <FlexView $justifyContent=\"center\" $alignItems=\"center\">\n {actionElement}\n <Separator heightX={1} />\n </FlexView>\n )}\n {isLoading && (\n <FlexView>\n <Separator heightX={isMobile ? 0.5 : 2} />\n <LottieAnimation\n src={LOTTIE.SPINNER_WHITE}\n height={isMobile ? 14 : 20}\n width={isMobile ? 14 : 40}\n />\n </FlexView>\n )}\n </Styled.ContentWrapper>\n </FlexView>\n );\n};\n\nexport default memo(InputWrapper);\n"],"names":["InputWrapper","children","helperText","actionElement","isLoading","isMobile","useTheme","EDeviceType","jsxs","FlexView","Styled.ContentWrapper","jsx","Text","Separator","LottieAnimation","LOTTIE","InputWrapper$1","memo"],"mappings":";;;;;;;;;;AAaA,MAAMA,IAAe,CAAC,EAAE,UAAAC,GAAU,YAAAC,GAAY,eAAAC,GAAe,WAAAC,QAAoC;AAEzF,QAAAC,IADQC,IACS,UAAUC,EAAY;AAG3C,SAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,MACP,UAAUJ,IAAW,MAAM;AAAA,MAC3B,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAChB,QAAO;AAAA,MAEN,UAAA;AAAA,QAAAJ;AAAA,0BACAS,GAAA,EAAsB,aAAY,UAAS,iBAAgB,UACzD,UAAA;AAAA,UAAAR,KACE,gBAAAM,EAAAC,GAAA,EAAS,UAAUJ,IAAW,OAAO,KACpC,UAAA;AAAA,YAAC,gBAAAM,EAAAC,GAAA,EAAK,WAAU,OAAM,QAAO,cAAa,QAAO,UAAS,aAAY,YACnE,UACHV,EAAA,CAAA;AAAA,YACA,gBAAAS,EAACE,GAAU,EAAA,SAAS,IAAK,CAAA;AAAA,UAAA,GAC3B;AAAA,UAEDV,KACE,gBAAAK,EAAAC,GAAA,EAAS,iBAAgB,UAAS,aAAY,UAC5C,UAAA;AAAA,YAAAN;AAAA,YACD,gBAAAQ,EAACE,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,UAAA,GACzB;AAAA,UAEDT,uBACEK,GACC,EAAA,UAAA;AAAA,YAAA,gBAAAE,EAACE,GAAU,EAAA,SAASR,IAAW,MAAM,GAAG;AAAA,YACxC,gBAAAM;AAAA,cAACG;AAAA,cAAA;AAAA,gBACC,KAAKC,EAAO;AAAA,gBACZ,QAAQV,IAAW,KAAK;AAAA,gBACxB,OAAOA,IAAW,KAAK;AAAA,cAAA;AAAA,YACzB;AAAA,UAAA,GACF;AAAA,QAAA,GAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,GAEeW,IAAAC,EAAKjB,CAAY;"}
|
|
@@ -19,7 +19,8 @@ const S = 31536e3, T = 31536e6, _ = 480, E = {
|
|
|
19
19
|
FOCUS: "Focus",
|
|
20
20
|
BEHAVIOR: "Behaviors",
|
|
21
21
|
OBJECTIVES: "Objectives",
|
|
22
|
-
POSITION: "Position"
|
|
22
|
+
POSITION: "Position",
|
|
23
|
+
COURSE: "Course"
|
|
23
24
|
}, O = {
|
|
24
25
|
"no-test": "School Success goals",
|
|
25
26
|
"non-standardized": "Test Prep goals",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../src/features/milestone/constants.ts"],"sourcesContent":["const ONE_YEAR_TIMESTAMP_IN_SECONDS = 365 * 24 * 60 * 60;\nconst ONE_YEAR_TIMESTAMP_IN_MILLISECONDS = ONE_YEAR_TIMESTAMP_IN_SECONDS * 1000;\n\nconst MILESTONE_WIDGET_MIN_HEIGHT = 480;\n\nconst SAT_COURSES = {\n SAT_DEMO: 'SAT-DEMO',\n SAT_MATH: 'SAT-MATH',\n SAT_ENGLISH: 'SAT-ENGLISH',\n SAT_TESTS: 'SAT-TESTS',\n} as const;\n\nconst COURSE_STREAMS = {\n MATH: 'MATH',\n CODING: 'CODING',\n SCIENCE: 'SCIENCE',\n ELA: 'ELA',\n ELP: 'ELP',\n ...SAT_COURSES,\n} as const;\n\nconst ENROLLMENT_TYPES = {\n ONLINE: 'ONLINE',\n PLUS: 'PLUS',\n REGULAR: 'REGULAR',\n HYBRID: 'HYBRID',\n HYBRID_PLUS: 'HYBRID_PLUS',\n ARMY: 'ARMY',\n CLASS_K5: 'CLASS_K5',\n OLYMPIAD: 'OLYMPIAD',\n HIGH: 'HIGH',\n GROUP_CLASS: 'GROUP_CLASS',\n CUECENTER: 'CUECENTER',\n} as const;\n\nconst GOAL_CATEGORY = {\n SCHOOL_SUCCESS: 'SCHOOL_SUCCESS',\n TEST_PREP: 'TEST_PREP',\n ENRICHMENT: 'ENRICHMENT',\n} as const;\n\nconst PREFERENCE_CATEGORY = {\n LEVEL: 'Level',\n FOCUS: 'Focus',\n BEHAVIOR: 'Behaviors',\n OBJECTIVES: 'Objectives',\n POSITION: 'Position',\n} as const;\n\nconst TEST_TYPE_TO_TEST_NAME = {\n 'no-test': 'School Success goals',\n 'non-standardized': 'Test Prep goals',\n 'standardized': 'Enrichment goals',\n};\n\nconst WARNING_MESSAGES = {\n CHAPTER_EXIT_WARNING:\n 'Going back will clear your currently selected chapters. Do you wish to proceed?',\n GOAL_CHANGE_WARNING:\n 'Choosing a different goal will clear your currently selected chapters. Do you wish to proceed?',\n};\n\nconst GOAL_HEADER_HEIGHT = 60;\nconst GOAL_FOOTER_HEIGHT = 88;\n\nexport {\n ONE_YEAR_TIMESTAMP_IN_SECONDS,\n ONE_YEAR_TIMESTAMP_IN_MILLISECONDS,\n MILESTONE_WIDGET_MIN_HEIGHT,\n COURSE_STREAMS,\n GOAL_CATEGORY,\n GOAL_HEADER_HEIGHT,\n GOAL_FOOTER_HEIGHT,\n WARNING_MESSAGES,\n TEST_TYPE_TO_TEST_NAME,\n PREFERENCE_CATEGORY,\n ENROLLMENT_TYPES,\n};\n"],"names":["ONE_YEAR_TIMESTAMP_IN_SECONDS","ONE_YEAR_TIMESTAMP_IN_MILLISECONDS","MILESTONE_WIDGET_MIN_HEIGHT","SAT_COURSES","COURSE_STREAMS","GOAL_CATEGORY","PREFERENCE_CATEGORY","TEST_TYPE_TO_TEST_NAME","WARNING_MESSAGES","GOAL_HEADER_HEIGHT","GOAL_FOOTER_HEIGHT"],"mappings":"AAAM,MAAAA,IAAgC,SAChCC,IAAqC,SAErCC,IAA8B,KAE9BC,IAAc;AAAA,EAClB,UAAU;AAAA,EACV,UAAU;AAAA,EACV,aAAa;AAAA,EACb,WAAW;AACb,GAEMC,IAAiB;AAAA,EACrB,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,KAAK;AAAA,EACL,KAAK;AAAA,EACL,GAAGD;AACL,GAgBME,IAAgB;AAAA,EACpB,gBAAgB;AAAA,EAChB,WAAW;AAAA,EACX,YAAY;AACd,GAEMC,IAAsB;AAAA,EAC1B,OAAO;AAAA,EACP,OAAO;AAAA,EACP,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,UAAU;
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../src/features/milestone/constants.ts"],"sourcesContent":["const ONE_YEAR_TIMESTAMP_IN_SECONDS = 365 * 24 * 60 * 60;\nconst ONE_YEAR_TIMESTAMP_IN_MILLISECONDS = ONE_YEAR_TIMESTAMP_IN_SECONDS * 1000;\n\nconst MILESTONE_WIDGET_MIN_HEIGHT = 480;\n\nconst SAT_COURSES = {\n SAT_DEMO: 'SAT-DEMO',\n SAT_MATH: 'SAT-MATH',\n SAT_ENGLISH: 'SAT-ENGLISH',\n SAT_TESTS: 'SAT-TESTS',\n} as const;\n\nconst COURSE_STREAMS = {\n MATH: 'MATH',\n CODING: 'CODING',\n SCIENCE: 'SCIENCE',\n ELA: 'ELA',\n ELP: 'ELP',\n ...SAT_COURSES,\n} as const;\n\nconst ENROLLMENT_TYPES = {\n ONLINE: 'ONLINE',\n PLUS: 'PLUS',\n REGULAR: 'REGULAR',\n HYBRID: 'HYBRID',\n HYBRID_PLUS: 'HYBRID_PLUS',\n ARMY: 'ARMY',\n CLASS_K5: 'CLASS_K5',\n OLYMPIAD: 'OLYMPIAD',\n HIGH: 'HIGH',\n GROUP_CLASS: 'GROUP_CLASS',\n CUECENTER: 'CUECENTER',\n} as const;\n\nconst GOAL_CATEGORY = {\n SCHOOL_SUCCESS: 'SCHOOL_SUCCESS',\n TEST_PREP: 'TEST_PREP',\n ENRICHMENT: 'ENRICHMENT',\n} as const;\n\nconst PREFERENCE_CATEGORY = {\n LEVEL: 'Level',\n FOCUS: 'Focus',\n BEHAVIOR: 'Behaviors',\n OBJECTIVES: 'Objectives',\n POSITION: 'Position',\n COURSE: 'Course',\n} as const;\n\nconst TEST_TYPE_TO_TEST_NAME = {\n 'no-test': 'School Success goals',\n 'non-standardized': 'Test Prep goals',\n 'standardized': 'Enrichment goals',\n};\n\nconst WARNING_MESSAGES = {\n CHAPTER_EXIT_WARNING:\n 'Going back will clear your currently selected chapters. Do you wish to proceed?',\n GOAL_CHANGE_WARNING:\n 'Choosing a different goal will clear your currently selected chapters. Do you wish to proceed?',\n};\n\nconst GOAL_HEADER_HEIGHT = 60;\nconst GOAL_FOOTER_HEIGHT = 88;\n\nexport {\n ONE_YEAR_TIMESTAMP_IN_SECONDS,\n ONE_YEAR_TIMESTAMP_IN_MILLISECONDS,\n MILESTONE_WIDGET_MIN_HEIGHT,\n COURSE_STREAMS,\n GOAL_CATEGORY,\n GOAL_HEADER_HEIGHT,\n GOAL_FOOTER_HEIGHT,\n WARNING_MESSAGES,\n TEST_TYPE_TO_TEST_NAME,\n PREFERENCE_CATEGORY,\n ENROLLMENT_TYPES,\n};\n"],"names":["ONE_YEAR_TIMESTAMP_IN_SECONDS","ONE_YEAR_TIMESTAMP_IN_MILLISECONDS","MILESTONE_WIDGET_MIN_HEIGHT","SAT_COURSES","COURSE_STREAMS","GOAL_CATEGORY","PREFERENCE_CATEGORY","TEST_TYPE_TO_TEST_NAME","WARNING_MESSAGES","GOAL_HEADER_HEIGHT","GOAL_FOOTER_HEIGHT"],"mappings":"AAAM,MAAAA,IAAgC,SAChCC,IAAqC,SAErCC,IAA8B,KAE9BC,IAAc;AAAA,EAClB,UAAU;AAAA,EACV,UAAU;AAAA,EACV,aAAa;AAAA,EACb,WAAW;AACb,GAEMC,IAAiB;AAAA,EACrB,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,KAAK;AAAA,EACL,KAAK;AAAA,EACL,GAAGD;AACL,GAgBME,IAAgB;AAAA,EACpB,gBAAgB;AAAA,EAChB,WAAW;AAAA,EACX,YAAY;AACd,GAEMC,IAAsB;AAAA,EAC1B,OAAO;AAAA,EACP,OAAO;AAAA,EACP,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,QAAQ;AACV,GAEMC,IAAyB;AAAA,EAC7B,WAAW;AAAA,EACX,oBAAoB;AAAA,EACpB,cAAgB;AAClB,GAEMC,IAAmB;AAAA,EACvB,sBACE;AAAA,EACF,qBACE;AACJ,GAEMC,IAAqB,IACrBC,IAAqB;"}
|