@cuemath/leap 3.1.2-j2 → 3.1.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.
- package/dist/assets/illustrations/illustrations.js +2 -1
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/line-icons/icons/check.js +3 -3
- package/dist/assets/line-icons/icons/check.js.map +1 -1
- package/dist/assets/line-icons/icons/puzzle-icon.js +51 -0
- package/dist/assets/line-icons/icons/puzzle-icon.js.map +1 -0
- package/dist/assets/line-icons/icons/share.js +48 -0
- package/dist/assets/line-icons/icons/share.js.map +1 -0
- package/dist/assets/line-icons/icons/tile.js +54 -0
- package/dist/assets/line-icons/icons/tile.js.map +1 -0
- package/dist/features/auth/account-selector/account-selector.js +36 -56
- package/dist/features/auth/account-selector/account-selector.js.map +1 -1
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styles.js +12 -0
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styles.js.map +1 -0
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +9 -8
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -1
- package/dist/features/auth/comps/auth-static-panel/auth-static-panel.js +1 -1
- package/dist/features/auth/comps/auth-static-panel/auth-static-panel.js.map +1 -1
- package/dist/features/auth/forgot-password/forgot-password-styled.js +3 -15
- package/dist/features/auth/forgot-password/forgot-password-styled.js.map +1 -1
- package/dist/features/auth/forgot-password/otp-form/otp-form.js +29 -29
- package/dist/features/auth/forgot-password/otp-form/otp-form.js.map +1 -1
- package/dist/features/auth/forgot-password/reset-password-form/reset-password-form.js +18 -14
- package/dist/features/auth/forgot-password/reset-password-form/reset-password-form.js.map +1 -1
- package/dist/features/auth/forgot-password/user-identifier-form/user-identifier-form.js +24 -23
- package/dist/features/auth/forgot-password/user-identifier-form/user-identifier-form.js.map +1 -1
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js +2 -4
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js.map +1 -1
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form.js +75 -85
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form.js.map +1 -1
- package/dist/features/auth/login/social-account-not-found/social-account-not-found.js +20 -26
- package/dist/features/auth/login/social-account-not-found/social-account-not-found.js.map +1 -1
- package/dist/features/auth/login/social-login-methods/social-login-methods.js +34 -43
- package/dist/features/auth/login/social-login-methods/social-login-methods.js.map +1 -1
- package/dist/features/auth/login/username-password-form/username-password-form.js +21 -22
- package/dist/features/auth/login/username-password-form/username-password-form.js.map +1 -1
- package/dist/features/auth/user-list/user-item/user-item.js +24 -25
- package/dist/features/auth/user-list/user-item/user-item.js.map +1 -1
- package/dist/features/auth/user-list/user-list.js +51 -60
- package/dist/features/auth/user-list/user-list.js.map +1 -1
- package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js +74 -74
- package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js.map +1 -1
- package/dist/features/cue-canvas/bottombar/homework-controls.js +73 -0
- package/dist/features/cue-canvas/bottombar/homework-controls.js.map +1 -0
- package/dist/features/cue-canvas/cue-canvas-context.js +8 -5
- package/dist/features/cue-canvas/cue-canvas-context.js.map +1 -1
- package/dist/features/cue-canvas/cue-canvas-core.js +84 -74
- package/dist/features/cue-canvas/cue-canvas-core.js.map +1 -1
- package/dist/features/cue-canvas/cue-canvas-helpers.js +31 -25
- package/dist/features/cue-canvas/cue-canvas-helpers.js.map +1 -1
- package/dist/features/cue-canvas/cue-canvas-provider.js +14 -12
- package/dist/features/cue-canvas/cue-canvas-provider.js.map +1 -1
- package/dist/features/cue-canvas/cue-canvas.js +66 -59
- package/dist/features/cue-canvas/cue-canvas.js.map +1 -1
- package/dist/features/cue-canvas/cue-cavas-styled.js +45 -42
- package/dist/features/cue-canvas/cue-cavas-styled.js.map +1 -1
- package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js +61 -54
- package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js.map +1 -1
- package/dist/features/cue-canvas/hooks/use-config-updater.js +12 -0
- package/dist/features/cue-canvas/hooks/use-config-updater.js.map +1 -0
- package/dist/features/cue-canvas/hooks/use-cue-canvas-actions.js +18 -14
- package/dist/features/cue-canvas/hooks/use-cue-canvas-actions.js.map +1 -1
- package/dist/features/cue-canvas/hooks/use-upload-helper.js +23 -0
- package/dist/features/cue-canvas/hooks/use-upload-helper.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/homework/helper.js +20 -0
- package/dist/features/cue-canvas/sidebar/homework/helper.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/homework/homework-menu.js +33 -0
- package/dist/features/cue-canvas/sidebar/homework/homework-menu.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/homework/homework-request.js +68 -0
- package/dist/features/cue-canvas/sidebar/homework/homework-request.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/homework/homework-styled.js +25 -0
- package/dist/features/cue-canvas/sidebar/homework/homework-styled.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/homework/homework.js +39 -0
- package/dist/features/cue-canvas/sidebar/homework/homework.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/puzzles/api/get-puzzles.js +13 -0
- package/dist/features/cue-canvas/sidebar/puzzles/api/get-puzzles.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/puzzles/filter-selection-menu.js +60 -0
- package/dist/features/cue-canvas/sidebar/puzzles/filter-selection-menu.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/puzzles/filters-section.js +44 -0
- package/dist/features/cue-canvas/sidebar/puzzles/filters-section.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/puzzles/filters.js +107 -0
- package/dist/features/cue-canvas/sidebar/puzzles/filters.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/puzzles/hooks/use-fetch-cue-canvas-activity.js +42 -0
- package/dist/features/cue-canvas/sidebar/puzzles/hooks/use-fetch-cue-canvas-activity.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/puzzles/launch-puzzle.js +84 -0
- package/dist/features/cue-canvas/sidebar/puzzles/launch-puzzle.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/puzzles/puzzle-menu-header.js +36 -0
- package/dist/features/cue-canvas/sidebar/puzzles/puzzle-menu-header.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/puzzles/puzzle-menu.js +133 -0
- package/dist/features/cue-canvas/sidebar/puzzles/puzzle-menu.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/puzzles/puzzles-styled.js +96 -0
- package/dist/features/cue-canvas/sidebar/puzzles/puzzles-styled.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/puzzles/puzzles.js +29 -0
- package/dist/features/cue-canvas/sidebar/puzzles/puzzles.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/puzzles/utils.js +120 -0
- package/dist/features/cue-canvas/sidebar/puzzles/utils.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/sidebar-styled.js +32 -0
- package/dist/features/cue-canvas/sidebar/sidebar-styled.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/sidebar.js +29 -0
- package/dist/features/cue-canvas/sidebar/sidebar.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/tiles/tile.js +16 -0
- package/dist/features/cue-canvas/sidebar/tiles/tile.js.map +1 -0
- package/dist/features/cue-canvas/toolbar/grid-menu.js +13 -13
- package/dist/features/cue-canvas/toolbar/grid-menu.js.map +1 -1
- package/dist/features/cue-canvas/toolbar/tool.js +22 -20
- package/dist/features/cue-canvas/toolbar/tool.js.map +1 -1
- package/dist/features/homework/styles.js +5 -4
- package/dist/features/homework/styles.js.map +1 -1
- package/dist/features/hooks/use-debounce.js +16 -0
- package/dist/features/hooks/use-debounce.js.map +1 -0
- package/dist/features/milestone/create/comps/add-custom-chapter/course-catalog.js +38 -36
- package/dist/features/milestone/create/comps/add-custom-chapter/course-catalog.js.map +1 -1
- package/dist/features/milestone/create/comps/add-custom-chapter/hooks/use-catalog-helpers.js +24 -22
- package/dist/features/milestone/create/comps/add-custom-chapter/hooks/use-catalog-helpers.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapter-category/chapter-category-container.js +23 -22
- package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapter-category/chapter-category-container.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/utils.js +49 -47
- package/dist/features/milestone/create/comps/chapters-selection-step/utils.js.map +1 -1
- package/dist/features/milestone/create/comps/class-details-step/class-details-step.js +94 -87
- package/dist/features/milestone/create/comps/class-details-step/class-details-step.js.map +1 -1
- package/dist/features/milestone/create/comps/class-details-step/class-details-utils.js +13 -12
- package/dist/features/milestone/create/comps/class-details-step/class-details-utils.js.map +1 -1
- package/dist/features/milestone/create/comps/test-type-step/test-type-step.js +23 -21
- package/dist/features/milestone/create/comps/test-type-step/test-type-step.js.map +1 -1
- package/dist/features/milestone/create/milestone-create-helpers.js +165 -162
- package/dist/features/milestone/create/milestone-create-helpers.js.map +1 -1
- package/dist/features/trial-session/comps/pricing/india-pricing/index.js +96 -0
- package/dist/features/trial-session/comps/pricing/india-pricing/index.js.map +1 -0
- package/dist/features/trial-session/comps/pricing/india-pricing/india-pricing-styled.js +59 -0
- package/dist/features/trial-session/comps/pricing/india-pricing/india-pricing-styled.js.map +1 -0
- package/dist/features/trial-session/comps/pricing/pricing.js +36 -35
- package/dist/features/trial-session/comps/pricing/pricing.js.map +1 -1
- package/dist/features/ui/buttons/button/button-styled.js +29 -29
- package/dist/features/ui/buttons/button/button-styled.js.map +1 -1
- package/dist/features/ui/stepper/stepper.js +7 -7
- package/dist/features/worksheet/worksheet/hooks/use-s3-helper.js +22 -19
- package/dist/features/worksheet/worksheet/hooks/use-s3-helper.js.map +1 -1
- package/dist/index.d.ts +54 -24
- package/dist/index.js +202 -202
- package/dist/static/ellipse-clip.dfb25608.svg +1 -0
- package/package.json +1 -1
- package/dist/features/auth/account-selector/account-selector-styled.js +0 -9
- package/dist/features/auth/account-selector/account-selector-styled.js.map +0 -1
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styled.js +0 -21
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styled.js.map +0 -1
- package/dist/features/auth/login/login-styled.js +0 -13
- package/dist/features/auth/login/login-styled.js.map +0 -1
- package/dist/features/auth/login/social-login-methods/social-login-methods-styled.js +0 -9
- package/dist/features/auth/login/social-login-methods/social-login-methods-styled.js.map +0 -1
- package/dist/features/hooks/use-device-type.js +0 -25
- package/dist/features/hooks/use-device-type.js.map +0 -1
- package/dist/features/utils/media.js +0 -16
- package/dist/features/utils/media.js.map +0 -1
- package/dist/static/cuemath-app-qr-code.7205ee79.svg +0 -1
@@ -1,66 +1,66 @@
|
|
1
|
-
import { jsx as e, jsxs as
|
2
|
-
import { memo as
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
|
8
|
-
|
9
|
-
onSubmit: n,
|
1
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
2
|
+
import { memo as p, useCallback as l } from "react";
|
3
|
+
import f from "../../../ui/inputs/text-input/text-input.js";
|
4
|
+
import o from "../../../ui/layout/flex-view.js";
|
5
|
+
import g from "../../comps/input-status-icon/input-status-icon.js";
|
6
|
+
import b from "../../comps/resend-otp/resend-otp.js";
|
7
|
+
const h = ({
|
8
|
+
onSubmit: a,
|
10
9
|
onChange: r,
|
11
|
-
value:
|
10
|
+
value: i,
|
12
11
|
error: t,
|
13
|
-
isProcessing:
|
12
|
+
isProcessing: n,
|
14
13
|
isValid: s = !1,
|
15
|
-
helperText:
|
14
|
+
helperText: m
|
16
15
|
}) => {
|
17
|
-
const
|
18
|
-
(
|
19
|
-
r("otp",
|
16
|
+
const u = l(
|
17
|
+
(d) => {
|
18
|
+
r("otp", d.target.value);
|
20
19
|
},
|
21
20
|
[r]
|
22
21
|
);
|
23
22
|
return /* @__PURE__ */ e(
|
24
|
-
|
23
|
+
o,
|
25
24
|
{
|
26
|
-
$gutterX:
|
25
|
+
$gutterX: 2,
|
27
26
|
$gapX: 1.5,
|
28
27
|
$alignItems: "center",
|
29
28
|
$justifyContent: "center",
|
30
29
|
$background: "BLACK_2",
|
31
30
|
$height: 308,
|
32
|
-
children: /* @__PURE__ */
|
31
|
+
children: /* @__PURE__ */ c(o, { $alignItems: "center", $justifyContent: "space-between", $flex: 1, children: [
|
33
32
|
/* @__PURE__ */ e(
|
34
|
-
|
33
|
+
f,
|
35
34
|
{
|
36
35
|
renderAs: t ? "error-dark" : s ? "success-dark" : "primary-dark",
|
37
36
|
autoFocus: !0,
|
38
37
|
label: "Verification code",
|
39
|
-
value:
|
40
|
-
onChange:
|
38
|
+
value: i,
|
39
|
+
onChange: u,
|
40
|
+
width: 330,
|
41
41
|
required: !0,
|
42
42
|
shape: "borderLess",
|
43
43
|
type: "number",
|
44
44
|
errorMessage: t,
|
45
|
-
siblingElement: /* @__PURE__ */ e(
|
46
|
-
helperText:
|
45
|
+
siblingElement: /* @__PURE__ */ e(g, { isError: !!t, isValid: s, isLoading: n }),
|
46
|
+
helperText: m
|
47
47
|
}
|
48
48
|
),
|
49
49
|
/* @__PURE__ */ e(
|
50
|
-
|
50
|
+
b,
|
51
51
|
{
|
52
52
|
renderAs: "submit",
|
53
53
|
timerSeconds: 15,
|
54
|
-
onResendOTP:
|
55
|
-
|
56
|
-
|
54
|
+
onResendOTP: a,
|
55
|
+
width: 336,
|
56
|
+
disabled: n
|
57
57
|
}
|
58
58
|
)
|
59
59
|
] })
|
60
60
|
}
|
61
61
|
);
|
62
|
-
},
|
62
|
+
}, y = p(h);
|
63
63
|
export {
|
64
|
-
|
64
|
+
y as default
|
65
65
|
};
|
66
66
|
//# sourceMappingURL=otp-form.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"otp-form.js","sources":["../../../../../src/features/auth/forgot-password/otp-form/otp-form.tsx"],"sourcesContent":["import type { ISingleFieldFormProps } from '../forgot-password-types';\n\nimport { type ChangeEvent, memo, useCallback } from 'react';\n\nimport TextInput from '../../../ui/inputs/text-input/text-input';\nimport FlexView from '../../../ui/layout/flex-view';\nimport InputStatusIcon from '../../comps/input-status-icon/input-status-icon';\nimport ResendOtp from '../../comps/resend-otp/resend-otp';\
|
1
|
+
{"version":3,"file":"otp-form.js","sources":["../../../../../src/features/auth/forgot-password/otp-form/otp-form.tsx"],"sourcesContent":["import type { ISingleFieldFormProps } from '../forgot-password-types';\n\nimport { type ChangeEvent, memo, useCallback } from 'react';\n\nimport TextInput from '../../../ui/inputs/text-input/text-input';\nimport FlexView from '../../../ui/layout/flex-view';\nimport InputStatusIcon from '../../comps/input-status-icon/input-status-icon';\nimport ResendOtp from '../../comps/resend-otp/resend-otp';\n\nconst OTPForm = ({\n onSubmit,\n onChange,\n value,\n error,\n isProcessing,\n isValid = false,\n helperText,\n}: ISingleFieldFormProps) => {\n const handleOTPChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onChange('otp', e.target.value);\n },\n [onChange],\n );\n\n const statusVariant = isValid ? 'success-dark' : 'primary-dark';\n\n return (\n <FlexView\n $gutterX={2}\n $gapX={1.5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"BLACK_2\"\n $height={308}\n >\n <FlexView $alignItems=\"center\" $justifyContent=\"space-between\" $flex={1}>\n <TextInput\n renderAs={error ? 'error-dark' : statusVariant}\n autoFocus\n label=\"Verification code\"\n value={value}\n onChange={handleOTPChange}\n width={330}\n required\n shape=\"borderLess\"\n type=\"number\"\n errorMessage={error}\n siblingElement={\n <InputStatusIcon isError={!!error} isValid={isValid} isLoading={isProcessing} />\n }\n helperText={helperText}\n />\n <ResendOtp\n renderAs=\"submit\"\n timerSeconds={15}\n onResendOTP={onSubmit}\n width={336}\n disabled={isProcessing}\n />\n </FlexView>\n </FlexView>\n );\n};\n\nexport default memo(OTPForm);\n"],"names":["OTPForm","onSubmit","onChange","value","error","isProcessing","isValid","helperText","handleOTPCh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+4,15 @@ import P from "../../../ui/buttons/button/button.js";
|
|
4
4
|
import n from "../../../ui/inputs/text-input/text-input.js";
|
5
5
|
import m from "../../../ui/layout/flex-view.js";
|
6
6
|
import b from "../../../ui/separator/separator.js";
|
7
|
-
import
|
8
|
-
import { FormWrapper as
|
9
|
-
const
|
10
|
-
onSubmit:
|
7
|
+
import p from "../../comps/input-status-icon/input-status-icon.js";
|
8
|
+
import { FormWrapper as C } from "../forgot-password-styled.js";
|
9
|
+
const y = ({
|
10
|
+
onSubmit: l,
|
11
11
|
onChange: e,
|
12
12
|
formData: o,
|
13
13
|
errors: s,
|
14
|
-
isSubmitDisabled:
|
15
|
-
isProcessing:
|
14
|
+
isSubmitDisabled: w,
|
15
|
+
isProcessing: u,
|
16
16
|
isValid: t = !1
|
17
17
|
}) => {
|
18
18
|
const c = t && o.password === o.confirmPassword, f = i(
|
@@ -29,27 +29,29 @@ const k = ({
|
|
29
29
|
return /* @__PURE__ */ r(
|
30
30
|
m,
|
31
31
|
{
|
32
|
-
$gutterX:
|
32
|
+
$gutterX: 2,
|
33
33
|
$gapX: 1.5,
|
34
34
|
$alignItems: "center",
|
35
35
|
$justifyContent: "center",
|
36
36
|
$background: "BLACK_2",
|
37
37
|
$height: 308,
|
38
|
-
children: /* @__PURE__ */ d(
|
38
|
+
children: /* @__PURE__ */ d(C, { onSubmit: l, children: [
|
39
39
|
/* @__PURE__ */ d(m, { children: [
|
40
40
|
/* @__PURE__ */ r(
|
41
41
|
n,
|
42
42
|
{
|
43
43
|
type: "password",
|
44
44
|
renderAs: s.password ? "error-dark" : "primary-dark",
|
45
|
+
autoComplete: "new-password",
|
45
46
|
label: "New Password",
|
46
47
|
value: o.password,
|
47
48
|
onChange: f,
|
49
|
+
width: 330,
|
48
50
|
autoFocus: !0,
|
49
51
|
required: !0,
|
50
52
|
shape: "borderLess",
|
51
53
|
errorMessage: s.password,
|
52
|
-
siblingElement: /* @__PURE__ */ r(
|
54
|
+
siblingElement: /* @__PURE__ */ r(p, { isError: !!s.password, isValid: t, isLoading: !1 })
|
53
55
|
}
|
54
56
|
),
|
55
57
|
/* @__PURE__ */ r(b, { height: 36 }),
|
@@ -58,14 +60,16 @@ const k = ({
|
|
58
60
|
{
|
59
61
|
type: "password",
|
60
62
|
renderAs: s.confirmPassword ? "error-dark" : "primary-dark",
|
63
|
+
autoComplete: "new-password",
|
61
64
|
label: "Re-enter Password",
|
62
65
|
value: o.confirmPassword,
|
63
66
|
onChange: g,
|
67
|
+
width: 330,
|
64
68
|
required: !0,
|
65
69
|
shape: "borderLess",
|
66
70
|
errorMessage: s.confirmPassword,
|
67
71
|
siblingElement: /* @__PURE__ */ r(
|
68
|
-
|
72
|
+
p,
|
69
73
|
{
|
70
74
|
isError: !!s.confirmPassword,
|
71
75
|
isValid: c,
|
@@ -82,15 +86,15 @@ const k = ({
|
|
82
86
|
renderAs: "secondary-dark",
|
83
87
|
type: "submit",
|
84
88
|
label: "Continue",
|
85
|
-
width:
|
86
|
-
busy:
|
87
|
-
disabled:
|
89
|
+
width: 336,
|
90
|
+
busy: u,
|
91
|
+
disabled: w
|
88
92
|
}
|
89
93
|
)
|
90
94
|
] })
|
91
95
|
}
|
92
96
|
);
|
93
|
-
}, I = h(
|
97
|
+
}, I = h(y);
|
94
98
|
export {
|
95
99
|
I as default
|
96
100
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"reset-password-form.js","sources":["../../../../../src/features/auth/forgot-password/reset-password-form/reset-password-form.tsx"],"sourcesContent":["import type { IResetPasswordFormProps } from './reset-password-form-types';\n\nimport { type ChangeEvent, memo, useCallback } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport TextInput from '../../../ui/inputs/text-input/text-input';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport InputStatusIcon from '../../comps/input-status-icon/input-status-icon';\nimport * as Styled from '../forgot-password-styled';\n\nconst ResetPasswordForm = ({\n onSubmit,\n onChange,\n formData,\n errors,\n isSubmitDisabled,\n isProcessing,\n isValid = false,\n}: IResetPasswordFormProps) => {\n const isConfirmPasswordValid = isValid && formData.password === formData.confirmPassword;\n\n const handlePasswordChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onChange('password', e.target.value);\n },\n [onChange],\n );\n\n const handleConfirmPasswordChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onChange('confirmPassword', e.target.value);\n },\n [onChange],\n );\n\n return (\n <FlexView\n $gutterX={
|
1
|
+
{"version":3,"file":"reset-password-form.js","sources":["../../../../../src/features/auth/forgot-password/reset-password-form/reset-password-form.tsx"],"sourcesContent":["import type { IResetPasswordFormProps } from './reset-password-form-types';\n\nimport { type ChangeEvent, memo, useCallback } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport TextInput from '../../../ui/inputs/text-input/text-input';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport InputStatusIcon from '../../comps/input-status-icon/input-status-icon';\nimport * as Styled from '../forgot-password-styled';\n\nconst ResetPasswordForm = ({\n onSubmit,\n onChange,\n formData,\n errors,\n isSubmitDisabled,\n isProcessing,\n isValid = false,\n}: IResetPasswordFormProps) => {\n const isConfirmPasswordValid = isValid && formData.password === formData.confirmPassword;\n\n const handlePasswordChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onChange('password', e.target.value);\n },\n [onChange],\n );\n\n const handleConfirmPasswordChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onChange('confirmPassword', e.target.value);\n },\n [onChange],\n );\n\n return (\n <FlexView\n $gutterX={2}\n $gapX={1.5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"BLACK_2\"\n $height={308}\n >\n <Styled.FormWrapper onSubmit={onSubmit}>\n <FlexView>\n <TextInput\n type={'password'}\n renderAs={errors.password ? 'error-dark' : 'primary-dark'}\n autoComplete=\"new-password\"\n label=\"New Password\"\n value={formData.password}\n onChange={handlePasswordChange}\n width={330}\n autoFocus\n required\n shape=\"borderLess\"\n errorMessage={errors.password}\n siblingElement={\n <InputStatusIcon isError={!!errors.password} isValid={isValid} isLoading={false} />\n }\n />\n <Separator height={36} />\n <TextInput\n type=\"password\"\n renderAs={errors.confirmPassword ? 'error-dark' : 'primary-dark'}\n autoComplete=\"new-password\"\n label=\"Re-enter Password\"\n value={formData.confirmPassword}\n onChange={handleConfirmPasswordChange}\n width={330}\n required\n shape=\"borderLess\"\n errorMessage={errors.confirmPassword}\n siblingElement={\n <InputStatusIcon\n isError={!!errors.confirmPassword}\n isValid={isConfirmPasswordValid}\n isLoading={false}\n />\n }\n />\n </FlexView>\n <Button\n size=\"small\"\n renderAs=\"secondary-dark\"\n type=\"submit\"\n label=\"Continue\"\n width={336}\n busy={isProcessing}\n disabled={isSubmitDisabled}\n />\n </Styled.FormWrapper>\n </FlexView>\n );\n};\n\nexport default memo(ResetPasswordForm);\n"],"names":["ResetPasswordForm","onSubmit","onChange","formData","errors","isSubmitDisabled","isProcessing","isValid","isConfirmPasswordValid","handlePasswordChange","useCallback","e","handleConfirmPasswordChange","jsx","FlexView","jsxs","Styled.FormWrapper","TextInput","InputStatusIcon","Separator","Button","resetPasswordForm","memo"],"mappings":";;;;;;;;AAWA,MAAMA,IAAoB,CAAC;AAAA,EACzB,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,SAAAC,IAAU;AACZ,MAA+B;AAC7B,QAAMC,IAAyBD,KAAWJ,EAAS,aAAaA,EAAS,iBAEnEM,IAAuBC;AAAA,IAC3B,CAACC,MAAqC;AAC3B,MAAAT,EAAA,YAAYS,EAAE,OAAO,KAAK;AAAA,IACrC;AAAA,IACA,CAACT,CAAQ;AAAA,EAAA,GAGLU,IAA8BF;AAAA,IAClC,CAACC,MAAqC;AAC3B,MAAAT,EAAA,mBAAmBS,EAAE,OAAO,KAAK;AAAA,IA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UAACO;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,UAAS;AAAA,YACT,MAAK;AAAA,YACL,OAAM;AAAA,YACN,OAAO;AAAA,YACP,MAAMd;AAAA,YACN,UAAUD;AAAA,UAAA;AAAA,QACZ;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN,GAEegB,IAAAC,EAAKtB,CAAiB;"}
|
@@ -1,66 +1,67 @@
|
|
1
1
|
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
2
2
|
import { memo as p, useCallback as f } from "react";
|
3
|
-
import c from "../../../ui/
|
4
|
-
import g from "../../../ui/
|
3
|
+
import c from "../../../ui/buttons/button/button.js";
|
4
|
+
import g from "../../../ui/inputs/text-input/text-input.js";
|
5
|
+
import h from "../../../ui/layout/flex-view.js";
|
5
6
|
import b from "../../comps/input-status-icon/input-status-icon.js";
|
6
|
-
import { FormWrapper as
|
7
|
-
const
|
8
|
-
onSubmit:
|
7
|
+
import { FormWrapper as I } from "../forgot-password-styled.js";
|
8
|
+
const $ = ({
|
9
|
+
onSubmit: i,
|
9
10
|
onChange: t,
|
10
|
-
value:
|
11
|
+
value: o,
|
11
12
|
error: r,
|
12
13
|
isSubmitDisabled: s,
|
13
|
-
isProcessing:
|
14
|
-
isValid:
|
14
|
+
isProcessing: n,
|
15
|
+
isValid: a = !1,
|
15
16
|
label: m
|
16
17
|
}) => {
|
17
|
-
const
|
18
|
-
(
|
19
|
-
t("identifier",
|
18
|
+
const d = f(
|
19
|
+
(u) => {
|
20
|
+
t("identifier", u.target.value);
|
20
21
|
},
|
21
22
|
[t]
|
22
23
|
);
|
23
24
|
return /* @__PURE__ */ e(
|
24
|
-
|
25
|
+
h,
|
25
26
|
{
|
26
|
-
$gutterX:
|
27
|
+
$gutterX: 2,
|
27
28
|
$gapX: 1.5,
|
28
29
|
$alignItems: "center",
|
29
30
|
$justifyContent: "center",
|
30
31
|
$background: "BLACK_2",
|
31
32
|
$height: 308,
|
32
|
-
children: /* @__PURE__ */ l(
|
33
|
+
children: /* @__PURE__ */ l(I, { onSubmit: i, children: [
|
33
34
|
/* @__PURE__ */ e(
|
34
|
-
|
35
|
+
g,
|
35
36
|
{
|
36
37
|
renderAs: r ? "error-dark" : "primary-dark",
|
37
38
|
autoFocus: !0,
|
38
39
|
label: m,
|
39
|
-
value:
|
40
|
-
onChange:
|
40
|
+
value: o,
|
41
|
+
onChange: d,
|
42
|
+
width: 330,
|
41
43
|
required: !0,
|
42
44
|
shape: "borderLess",
|
43
|
-
autoComplete: "username",
|
44
45
|
errorMessage: r,
|
45
|
-
siblingElement: /* @__PURE__ */ e(b, { isError: !!r, isValid:
|
46
|
+
siblingElement: /* @__PURE__ */ e(b, { isError: !!r, isValid: a, isLoading: !1 })
|
46
47
|
}
|
47
48
|
),
|
48
49
|
/* @__PURE__ */ e(
|
49
|
-
|
50
|
+
c,
|
50
51
|
{
|
51
52
|
size: "small",
|
52
53
|
renderAs: "secondary-dark",
|
53
54
|
type: "submit",
|
54
|
-
width: "100%",
|
55
55
|
label: "Get Verification Code",
|
56
|
-
|
56
|
+
width: 336,
|
57
|
+
busy: n,
|
57
58
|
disabled: s
|
58
59
|
}
|
59
60
|
)
|
60
61
|
] })
|
61
62
|
}
|
62
63
|
);
|
63
|
-
}, A = p(
|
64
|
+
}, A = p($);
|
64
65
|
export {
|
65
66
|
A as default
|
66
67
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"user-identifier-form.js","sources":["../../../../../src/features/auth/forgot-password/user-identifier-form/user-identifier-form.tsx"],"sourcesContent":["import type { ISingleFieldFormProps } from '../forgot-password-types';\n\nimport { memo, useCallback, type ChangeEvent } from 'react';\n\nimport TextInput from '../../../ui/inputs/text-input/text-input';\nimport FlexView from '../../../ui/layout/flex-view';\nimport InputStatusIcon from '../../comps/input-status-icon/input-status-icon';\nimport * as Styled from '../forgot-password-styled';\n\nconst UserIdentifierForm = ({\n onSubmit,\n onChange,\n value,\n error,\n isSubmitDisabled,\n isProcessing,\n isValid = false,\n label,\n}: ISingleFieldFormProps) => {\n const handleInputChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onChange('identifier', e.target.value);\n },\n [onChange],\n );\n\n return (\n <FlexView\n $gutterX={
|
1
|
+
{"version":3,"file":"user-identifier-form.js","sources":["../../../../../src/features/auth/forgot-password/user-identifier-form/user-identifier-form.tsx"],"sourcesContent":["import type { ISingleFieldFormProps } from '../forgot-password-types';\n\nimport { memo, useCallback, type ChangeEvent } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport TextInput from '../../../ui/inputs/text-input/text-input';\nimport FlexView from '../../../ui/layout/flex-view';\nimport InputStatusIcon from '../../comps/input-status-icon/input-status-icon';\nimport * as Styled from '../forgot-password-styled';\n\nconst UserIdentifierForm = ({\n onSubmit,\n onChange,\n value,\n error,\n isSubmitDisabled,\n isProcessing,\n isValid = false,\n label,\n}: ISingleFieldFormProps) => {\n const handleInputChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onChange('identifier', e.target.value);\n },\n [onChange],\n );\n\n return (\n <FlexView\n $gutterX={2}\n $gapX={1.5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"BLACK_2\"\n $height={308}\n >\n <Styled.FormWrapper onSubmit={onSubmit}>\n <TextInput\n renderAs={error ? 'error-dark' : 'primary-dark'}\n autoFocus\n label={label}\n value={value}\n onChange={handleInputChange}\n width={330}\n required\n shape=\"borderLess\"\n errorMessage={error}\n siblingElement={<InputStatusIcon isError={!!error} isValid={isValid} isLoading={false} />}\n />\n <Button\n size=\"small\"\n renderAs=\"secondary-dark\"\n type=\"submit\"\n label=\"Get Verification Code\"\n width={336}\n busy={isProcessing}\n disabled={isSubmitDisabled}\n />\n </Styled.FormWrapper>\n </FlexView>\n );\n};\n\nexport default memo(UserIdentifierForm);\n"],"names":["UserIdentifierForm","onSubmit","onChange","value","error","isSubmitDisabled","isProcessing","isValid","label","handleInputChange","useCallback","e","jsx","FlexView","js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@@
|
|
1
1
|
import e from "styled-components";
|
2
|
-
const
|
2
|
+
const t = e.form`
|
3
3
|
display: flex;
|
4
4
|
flex-direction: column;
|
5
5
|
justify-content: space-between;
|
6
6
|
margin-top: 8px;
|
7
7
|
flex: 1;
|
8
|
-
max-width: 336px;
|
9
|
-
width: 100%;
|
10
8
|
`;
|
11
9
|
export {
|
12
|
-
|
10
|
+
t as FormWrapper
|
13
11
|
};
|
14
12
|
//# sourceMappingURL=identifier-otp-form-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"identifier-otp-form-styled.js","sources":["../../../../../src/features/auth/login/identifier-otp-form/identifier-otp-form-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nconst FormWrapper = styled.form`\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n margin-top: 8px;\n flex: 1;\n
|
1
|
+
{"version":3,"file":"identifier-otp-form-styled.js","sources":["../../../../../src/features/auth/login/identifier-otp-form/identifier-otp-form-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nconst FormWrapper = styled.form`\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n margin-top: 8px;\n flex: 1;\n`;\n\nexport { FormWrapper };\n"],"names":["FormWrapper","styled"],"mappings":";AAEA,MAAMA,IAAcC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
@@ -1,110 +1,100 @@
|
|
1
|
-
import { jsx as e, jsxs as
|
1
|
+
import { jsx as e, jsxs as n, Fragment as x } from "react/jsx-runtime";
|
2
2
|
import { memo as C, useCallback as c } from "react";
|
3
3
|
import E from "../../../ui/buttons/button/button.js";
|
4
4
|
import u from "../../../ui/inputs/text-input/text-input.js";
|
5
5
|
import s from "../../../ui/layout/flex-view.js";
|
6
6
|
import l from "../../../ui/separator/separator.js";
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import { FormWrapper as
|
10
|
-
const
|
11
|
-
identifier:
|
7
|
+
import p from "../../comps/input-status-icon/input-status-icon.js";
|
8
|
+
import v from "../../comps/resend-otp/resend-otp.js";
|
9
|
+
import { FormWrapper as A } from "./identifier-otp-form-styled.js";
|
10
|
+
const S = ({
|
11
|
+
identifier: f,
|
12
12
|
otp: m,
|
13
13
|
errors: r,
|
14
14
|
isOtpVerified: i,
|
15
|
-
isLoading:
|
16
|
-
isSubmitDisabled:
|
15
|
+
isLoading: o,
|
16
|
+
isSubmitDisabled: h,
|
17
17
|
showOtpInput: t,
|
18
18
|
onChange: a,
|
19
|
-
onSubmit:
|
19
|
+
onSubmit: g,
|
20
20
|
onSendOtp: b
|
21
21
|
}) => {
|
22
|
-
const
|
23
|
-
(
|
24
|
-
a("identifier",
|
22
|
+
const k = t ? "success-dark" : "primary-dark", $ = i ? "success-dark" : "primary-dark", y = c(
|
23
|
+
(d) => {
|
24
|
+
a("identifier", d.target.value);
|
25
25
|
},
|
26
26
|
[a]
|
27
27
|
), F = c(
|
28
|
-
(
|
29
|
-
a("otp",
|
28
|
+
(d) => {
|
29
|
+
a("otp", d.target.value);
|
30
30
|
},
|
31
31
|
[a]
|
32
32
|
);
|
33
|
-
return /* @__PURE__ */ e(
|
34
|
-
s,
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
width: "100%",
|
54
|
-
shape: "borderLess",
|
55
|
-
errorMessage: r.identifier,
|
56
|
-
disabled: t,
|
57
|
-
siblingElement: /* @__PURE__ */ e(f, { isValid: t, isError: !!r.identifier })
|
58
|
-
}
|
59
|
-
),
|
60
|
-
t && /* @__PURE__ */ d(x, { children: [
|
61
|
-
/* @__PURE__ */ e(l, { height: 36 }),
|
62
|
-
/* @__PURE__ */ e(
|
63
|
-
u,
|
64
|
-
{
|
65
|
-
type: "password",
|
66
|
-
renderAs: r.otp ? "error-dark" : k,
|
67
|
-
label: "Verification code",
|
68
|
-
value: m,
|
69
|
-
onChange: F,
|
70
|
-
width: "100%",
|
71
|
-
required: !0,
|
72
|
-
autoFocus: !0,
|
73
|
-
shape: "borderLess",
|
74
|
-
errorMessage: r.otp,
|
75
|
-
disabled: i || m.length === 4 && n,
|
76
|
-
siblingElement: /* @__PURE__ */ e(
|
77
|
-
f,
|
78
|
-
{
|
79
|
-
isLoading: n,
|
80
|
-
isValid: i,
|
81
|
-
isError: !!r.otp
|
82
|
-
}
|
83
|
-
)
|
84
|
-
}
|
85
|
-
),
|
86
|
-
/* @__PURE__ */ e(l, { heightX: 1.25 }),
|
87
|
-
/* @__PURE__ */ e(s, { $alignItems: "flex-end", $width: "100%", children: /* @__PURE__ */ e(j, { onResendOTP: b, disabled: i }) }),
|
88
|
-
/* @__PURE__ */ e(l, { heightX: 2 })
|
89
|
-
] })
|
90
|
-
] }),
|
33
|
+
return /* @__PURE__ */ e(s, { $gutterX: 2, $gapX: 1.5, $background: "BLACK_2", $height: 308, children: /* @__PURE__ */ n(A, { onSubmit: g, children: [
|
34
|
+
/* @__PURE__ */ n(s, { $alignItems: "center", $justifyContent: "center", children: [
|
35
|
+
/* @__PURE__ */ e(
|
36
|
+
u,
|
37
|
+
{
|
38
|
+
renderAs: r.identifier ? "error-dark" : k,
|
39
|
+
autoFocus: !0,
|
40
|
+
label: "Email or Phone",
|
41
|
+
value: f,
|
42
|
+
onChange: y,
|
43
|
+
width: 330,
|
44
|
+
required: !0,
|
45
|
+
shape: "borderLess",
|
46
|
+
errorMessage: r.identifier,
|
47
|
+
disabled: t,
|
48
|
+
siblingElement: /* @__PURE__ */ e(p, { isValid: t, isError: !!r.identifier })
|
49
|
+
}
|
50
|
+
),
|
51
|
+
t && /* @__PURE__ */ n(x, { children: [
|
52
|
+
/* @__PURE__ */ e(l, { height: 36 }),
|
91
53
|
/* @__PURE__ */ e(
|
92
|
-
|
54
|
+
u,
|
93
55
|
{
|
94
|
-
|
95
|
-
renderAs: "
|
96
|
-
|
97
|
-
label:
|
98
|
-
|
99
|
-
|
100
|
-
|
56
|
+
type: "password",
|
57
|
+
renderAs: r.otp ? "error-dark" : $,
|
58
|
+
autoComplete: "password",
|
59
|
+
label: "Verification code",
|
60
|
+
value: m,
|
61
|
+
onChange: F,
|
62
|
+
width: 330,
|
63
|
+
required: !0,
|
64
|
+
autoFocus: !0,
|
65
|
+
shape: "borderLess",
|
66
|
+
errorMessage: r.otp,
|
67
|
+
disabled: i || m.length === 4 && o,
|
68
|
+
siblingElement: /* @__PURE__ */ e(
|
69
|
+
p,
|
70
|
+
{
|
71
|
+
isLoading: o,
|
72
|
+
isValid: i,
|
73
|
+
isError: !!r.otp
|
74
|
+
}
|
75
|
+
)
|
101
76
|
}
|
102
|
-
)
|
77
|
+
),
|
78
|
+
/* @__PURE__ */ e(l, { heightX: 1.25 }),
|
79
|
+
/* @__PURE__ */ e(s, { $alignItems: "flex-end", $width: "100%", children: /* @__PURE__ */ e(v, { onResendOTP: b, disabled: i }) }),
|
80
|
+
/* @__PURE__ */ e(l, { heightX: 2 })
|
103
81
|
] })
|
104
|
-
}
|
105
|
-
|
106
|
-
|
82
|
+
] }),
|
83
|
+
/* @__PURE__ */ e(
|
84
|
+
E,
|
85
|
+
{
|
86
|
+
size: "small",
|
87
|
+
renderAs: "secondary-dark",
|
88
|
+
type: "submit",
|
89
|
+
label: t ? "Log In" : "Get Verification Code",
|
90
|
+
width: 336,
|
91
|
+
busy: !t && o,
|
92
|
+
disabled: h
|
93
|
+
}
|
94
|
+
)
|
95
|
+
] }) });
|
96
|
+
}, P = C(S);
|
107
97
|
export {
|
108
|
-
|
98
|
+
P as default
|
109
99
|
};
|
110
100
|
//# sourceMappingURL=identifier-otp-form.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"identifier-otp-form.js","sources":["../../../../../src/features/auth/login/identifier-otp-form/identifier-otp-form.tsx"],"sourcesContent":["// In @cuemath/leap/src/components/IdentifierOtpForm.tsx\n\nimport type { IIdentifierOtpFormProps } from './identifier-otp-form-types';\n\nimport React, { type ChangeEvent, memo, useCallback } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport TextInput from '../../../ui/inputs/text-input/text-input';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport InputStatusIcon from '../../comps/input-status-icon/input-status-icon';\nimport ResendOTP from '../../comps/resend-otp/resend-otp';\nimport * as Styled from './identifier-otp-form-styled';\n\nconst IdentifierOtpForm: React.FC<IIdentifierOtpFormProps> = ({\n identifier,\n otp,\n errors,\n isOtpVerified,\n isLoading,\n isSubmitDisabled,\n showOtpInput,\n onChange,\n onSubmit,\n onSendOtp,\n}) => {\n const identifierStatusVariant = showOtpInput ? 'success-dark' : 'primary-dark';\n const otpStatusVariant = isOtpVerified ? 'success-dark' : 'primary-dark';\n\n const handleIdentifierChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onChange('identifier', e.target.value);\n },\n [onChange],\n );\n\n const handleOtpChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onChange('otp', e.target.value);\n },\n [onChange],\n );\n\n return (\n <FlexView
|
1
|
+
{"version":3,"file":"identifier-otp-form.js","sources":["../../../../../src/features/auth/login/identifier-otp-form/identifier-otp-form.tsx"],"sourcesContent":["// In @cuemath/leap/src/components/IdentifierOtpForm.tsx\n\nimport type { IIdentifierOtpFormProps } from './identifier-otp-form-types';\n\nimport React, { type ChangeEvent, memo, useCallback } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport TextInput from '../../../ui/inputs/text-input/text-input';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport InputStatusIcon from '../../comps/input-status-icon/input-status-icon';\nimport ResendOTP from '../../comps/resend-otp/resend-otp';\nimport * as Styled from './identifier-otp-form-styled';\n\nconst IdentifierOtpForm: React.FC<IIdentifierOtpFormProps> = ({\n identifier,\n otp,\n errors,\n isOtpVerified,\n isLoading,\n isSubmitDisabled,\n showOtpInput,\n onChange,\n onSubmit,\n onSendOtp,\n}) => {\n const identifierStatusVariant = showOtpInput ? 'success-dark' : 'primary-dark';\n const otpStatusVariant = isOtpVerified ? 'success-dark' : 'primary-dark';\n\n const handleIdentifierChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onChange('identifier', e.target.value);\n },\n [onChange],\n );\n\n const handleOtpChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onChange('otp', e.target.value);\n },\n [onChange],\n );\n\n return (\n <FlexView $gutterX={2} $gapX={1.5} $background=\"BLACK_2\" $height={308}>\n <Styled.FormWrapper onSubmit={onSubmit}>\n <FlexView $alignItems=\"center\" $justifyContent=\"center\">\n <TextInput\n renderAs={errors.identifier ? 'error-dark' : identifierStatusVariant}\n autoFocus\n label=\"Email or Phone\"\n value={identifier}\n onChange={handleIdentifierChange}\n width={330}\n required\n shape=\"borderLess\"\n errorMessage={errors.identifier}\n disabled={showOtpInput}\n siblingElement={\n <InputStatusIcon isValid={showOtpInput} isError={!!errors.identifier} />\n }\n />\n {showOtpInput && (\n <>\n <Separator height={36} />\n <TextInput\n type=\"password\"\n renderAs={errors.otp ? 'error-dark' : otpStatusVariant}\n autoComplete=\"password\"\n label=\"Verification code\"\n value={otp}\n onChange={handleOtpChange}\n width={330}\n required\n autoFocus\n shape=\"borderLess\"\n errorMessage={errors.otp}\n disabled={isOtpVerified || (otp.length === 4 && isLoading)}\n siblingElement={\n <InputStatusIcon\n isLoading={isLoading}\n isValid={isOtpVerified}\n isError={!!errors.otp}\n />\n }\n />\n <Separator heightX={1.25} />\n <FlexView $alignItems=\"flex-end\" $width=\"100%\">\n <ResendOTP onResendOTP={onSendOtp} disabled={isOtpVerified} />\n </FlexView>\n <Separator heightX={2} />\n </>\n )}\n </FlexView>\n <Button\n size=\"small\"\n renderAs=\"secondary-dark\"\n type=\"submit\"\n label={showOtpInput ? 'Log In' : 'Get Verification Code'}\n width={336}\n busy={!showOtpInput && isLoading}\n disabled={isSubmitDisabled}\n />\n </Styled.FormWrapper>\n </FlexView>\n );\n};\n\nexport default memo(IdentifierOtpForm);\n"],"names":["IdentifierOtpForm","identifier","otp","errors","isOtpVerified","isLoading","isSubmitDisabled","showOtpInput","onChange","onSubmit","onSendOtp","identifierStatusVariant","otpStatusVariant","handleIdentifierChange","useCallback","e","handleOtpChange","jsx","FlexView","jsxs","Styled.FormWrapper","TextInput","InputStatusIcon","Fragment","Separator","ResendOTP","Button","identifierOtpForm","memo"],"mappings":";;;;;;;;;AAcA,MAAMA,IAAuD,CAAC;AAAA,EAC5D,YAAAC;AAAA,EACA,KAAAC;AAAA,EACA,QAAAC;AAAA,EACA,eAAAC;AAAA,EACA,WAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AACF,MAAM;AACE,QAAAC,IAA0BJ,IAAe,iBAAiB,gBAC1DK,IAAmBR,IAAgB,iBAAiB,gBAEpDS,IAAyBC;AAAA,IAC7B,CAACC,MAAqC;AAC3B,MAAAP,EAAA,cAAcO,EAAE,OAAO,KAAK;AAAA,IACvC;AAAA,IACA,CAACP,CAAQ;AAAA,EAAA,GAGLQ,IAAkBF;AAAA,IACtB,CAACC,MAAqC;AAC3B,MAAAP,EAAA,OAAOO,EAAE,OAAO,KAAK;AAAA,IAChC;AAAA,IACA,CAACP,CAAQ;AAAA,EAAA;AAGX,SACG,gBAAAS,EAAAC,GAAA,EAAS,UAAU,GAAG,OAAO,KAAK,aAAY,WAAU,SAAS,KAChE,UAAA,gBAAAC,EAACC,GAAA,EAAmB,UAAAX,GAClB,UAAA;AAAA,IAAA,gBAAAU,EAACD,GAAS,EAAA,aAAY,UAAS,iBAAgB,UAC7C,UAAA;AAAA,MAAA,gBAAAD;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,UAAUlB,EAAO,aAAa,eAAeQ;AAAA,UAC7C,WAAS;AAAA,UACT,OAAM;A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