@cuemath/leap 3.0.11-j → 3.0.11-j2
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/features/auth/account-selector/account-selector.js +35 -82
- package/dist/features/auth/account-selector/account-selector.js.map +1 -1
- 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 +13 -12
- package/dist/features/auth/comps/auth-static-panel/auth-static-panel.js.map +1 -1
- package/dist/features/auth/comps/input-status-icon/input-status-icon.js +14 -13
- package/dist/features/auth/comps/input-status-icon/input-status-icon.js.map +1 -1
- package/dist/features/auth/comps/overlay-loader/overlay-loader.js +5 -4
- package/dist/features/auth/comps/overlay-loader/overlay-loader.js.map +1 -1
- package/dist/features/auth/comps/resend-otp/hooks/use-resend-timer.js +24 -0
- package/dist/features/auth/comps/resend-otp/hooks/use-resend-timer.js.map +1 -0
- package/dist/features/auth/comps/resend-otp/resend-otp.js +34 -30
- package/dist/features/auth/comps/resend-otp/resend-otp.js.map +1 -1
- package/dist/features/auth/comps/tabs/tab-tem/tab-item.js +23 -0
- package/dist/features/auth/comps/tabs/tab-tem/tab-item.js.map +1 -0
- package/dist/features/auth/comps/tabs/tabs.js +6 -20
- package/dist/features/auth/comps/tabs/tabs.js.map +1 -1
- package/dist/features/auth/forgot-password/otp-form/otp-form.js +39 -36
- 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 +41 -30
- 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 +63 -54
- 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.js +21 -20
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form.js.map +1 -1
- package/dist/features/auth/login/login-constants.js +6 -4
- package/dist/features/auth/login/login-constants.js.map +1 -1
- package/dist/features/auth/login/social-account-not-found/social-account-not-found.js +7 -6
- 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 +15 -14
- 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 +15 -14
- package/dist/features/auth/login/username-password-form/username-password-form.js.map +1 -1
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js +36 -36
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js.map +1 -1
- package/dist/features/auth/signup/claim-user-account/claim-user-account.js +47 -70
- package/dist/features/auth/signup/claim-user-account/claim-user-account.js.map +1 -1
- package/dist/features/auth/signup/custom-input-field/country-selector/country-selector.js +11 -11
- package/dist/features/auth/signup/custom-input-field/country-selector/country-selector.js.map +1 -1
- package/dist/features/auth/signup/custom-input-field/custom-input-field.js +30 -30
- package/dist/features/auth/signup/custom-input-field/custom-input-field.js.map +1 -1
- package/dist/features/auth/signup/custom-input-field/date-picker-input/date-picker-input.js +27 -26
- package/dist/features/auth/signup/custom-input-field/date-picker-input/date-picker-input.js.map +1 -1
- package/dist/features/auth/signup/custom-input-field/grade-input/grade-input.js +9 -8
- package/dist/features/auth/signup/custom-input-field/grade-input/grade-input.js.map +1 -1
- package/dist/features/auth/signup/custom-input-field/input-wrapper/input-wrapper.js +11 -15
- package/dist/features/auth/signup/custom-input-field/input-wrapper/input-wrapper.js.map +1 -1
- package/dist/features/auth/signup/signup-methods/signup-methods.js +8 -7
- package/dist/features/auth/signup/signup-methods/signup-methods.js.map +1 -1
- package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card.js +17 -17
- package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card.js.map +1 -1
- package/dist/features/auth/signup/user-type-selector/user-type-selector.js +1 -3
- package/dist/features/auth/signup/user-type-selector/user-type-selector.js.map +1 -1
- package/dist/features/auth/user-list/user-item/user-item-styled.js +21 -0
- package/dist/features/auth/user-list/user-item/user-item-styled.js.map +1 -0
- package/dist/features/auth/user-list/user-item/user-item.js +48 -0
- package/dist/features/auth/user-list/user-item/user-item.js.map +1 -0
- package/dist/features/auth/user-list/user-list-styled.js +19 -0
- package/dist/features/auth/user-list/user-list-styled.js.map +1 -0
- package/dist/features/auth/user-list/user-list.js +56 -0
- package/dist/features/auth/user-list/user-list.js.map +1 -0
- package/dist/index.d.ts +34 -30
- package/dist/index.js +282 -282
- package/package.json +1 -1
- package/dist/features/auth/account-selector/account-selector-styled.js +0 -37
- package/dist/features/auth/account-selector/account-selector-styled.js.map +0 -1
- package/dist/features/auth/comps/resend-otp/otp-timer/otp-timer.js +0 -25
- package/dist/features/auth/comps/resend-otp/otp-timer/otp-timer.js.map +0 -1
- package/dist/features/auth/signup/claim-user-account/claim-user-account-styled.js +0 -27
- package/dist/features/auth/signup/claim-user-account/claim-user-account-styled.js.map +0 -1
@@ -1,27 +1,30 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import {
|
3
|
-
import
|
1
|
+
import { jsx as e, jsxs as f } from "react/jsx-runtime";
|
2
|
+
import { memo as g, useCallback as h } from "react";
|
3
|
+
import $ from "../../../ui/buttons/button/button.js";
|
4
4
|
import b from "../../../ui/inputs/text-input/text-input.js";
|
5
|
-
import
|
6
|
-
import
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
5
|
+
import a from "../../../ui/layout/flex-view.js";
|
6
|
+
import k from "../../comps/input-status-icon/input-status-icon.js";
|
7
|
+
import { useResendTimer as C } from "../../comps/resend-otp/hooks/use-resend-timer.js";
|
8
|
+
const x = ({
|
9
|
+
onSubmit: i,
|
10
|
+
onChange: t,
|
11
|
+
value: r,
|
12
|
+
error: s,
|
13
|
+
isProcessing: m,
|
14
|
+
isValid: n = !1
|
14
15
|
}) => {
|
15
|
-
const
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
16
|
+
const { canResend: o, resetTimer: d, timeLeft: c } = C({
|
17
|
+
initialSeconds: 30
|
18
|
+
}), l = () => {
|
19
|
+
i(), d();
|
20
|
+
}, u = h(
|
21
|
+
(p) => {
|
22
|
+
t("username", p.target.value);
|
23
|
+
},
|
24
|
+
[t]
|
25
|
+
);
|
26
|
+
return /* @__PURE__ */ e(
|
27
|
+
a,
|
25
28
|
{
|
26
29
|
$gutterX: 2,
|
27
30
|
$gapX: 1.5,
|
@@ -29,39 +32,39 @@ const C = ({
|
|
29
32
|
$justifyContent: "center",
|
30
33
|
$background: "BLACK_2",
|
31
34
|
$height: 308,
|
32
|
-
children: /* @__PURE__ */
|
33
|
-
/* @__PURE__ */
|
35
|
+
children: /* @__PURE__ */ f(a, { $alignItems: "center", $justifyContent: "space-between", $flex: 1, children: [
|
36
|
+
/* @__PURE__ */ e(
|
34
37
|
b,
|
35
38
|
{
|
36
|
-
renderAs:
|
39
|
+
renderAs: s ? "error-dark" : n ? "success-dark" : "primary-dark",
|
37
40
|
autoFocus: !0,
|
38
41
|
label: "Verification code",
|
39
|
-
value:
|
40
|
-
onChange:
|
42
|
+
value: r,
|
43
|
+
onChange: u,
|
41
44
|
width: 330,
|
42
45
|
required: !0,
|
43
46
|
shape: "borderLess",
|
44
|
-
errorMessage:
|
45
|
-
siblingElement: /* @__PURE__ */
|
47
|
+
errorMessage: r,
|
48
|
+
siblingElement: /* @__PURE__ */ e(k, { isError: !!s, isValid: n, isLoading: m })
|
46
49
|
}
|
47
50
|
),
|
48
|
-
/* @__PURE__ */
|
49
|
-
|
51
|
+
/* @__PURE__ */ e(
|
52
|
+
$,
|
50
53
|
{
|
51
54
|
size: "small",
|
52
55
|
renderAs: "secondary-dark",
|
53
56
|
type: "submit",
|
54
|
-
label:
|
57
|
+
label: o ? "Resend" : `Resend in ${c}`,
|
55
58
|
width: 336,
|
56
|
-
onClick:
|
57
|
-
disabled: !
|
59
|
+
onClick: l,
|
60
|
+
disabled: !o
|
58
61
|
}
|
59
62
|
)
|
60
63
|
] })
|
61
64
|
}
|
62
65
|
);
|
63
|
-
},
|
66
|
+
}, A = g(x);
|
64
67
|
export {
|
65
|
-
|
68
|
+
A as default
|
66
69
|
};
|
67
70
|
//# 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 {
|
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 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 { useResendTimer } from '../../comps/resend-otp/hooks/use-resend-timer';\n\nconst OTPForm = ({\n onSubmit,\n onChange,\n value,\n error,\n isProcessing,\n isValid = false,\n}: ISingleFieldFormProps) => {\n const { canResend, resetTimer, timeLeft } = useResendTimer({\n initialSeconds: 30,\n });\n\n const handleResendClick = () => {\n onSubmit();\n resetTimer();\n };\n\n const handleUsernameChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n onChange('username', 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={handleUsernameChange}\n width={330}\n required\n shape=\"borderLess\"\n errorMessage={value}\n siblingElement={\n <InputStatusIcon isError={!!error} isValid={isValid} isLoading={isProcessing} />\n }\n />\n <Button\n size=\"small\"\n renderAs=\"secondary-dark\"\n type=\"submit\"\n label={canResend ? 'Resend' : `Resend in ${timeLeft}`}\n width={336}\n onClick={handleResendClick}\n disabled={!canResend}\n />\n </FlexView>\n </FlexView>\n );\n};\n\nexport default memo(OTPForm);\n"],"names":["OTPForm","onSubmit","onChange","value","error","isProcessing","isValid","canResend","resetTimer","timeLeft","useResendTimer","handleResendClick","handleUsernameChange","useCallback","e","jsx","FlexView","TextInput","InputStatusIcon","Button","otpForm","memo"],"mappings":";;;;;;;AAUA,MAAMA,IAAU,CAAC;AAAA,EACf,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,SAAAC,IAAU;AACZ,MAA6B;AAC3B,QAAM,EAAE,WAAAC,GAAW,YAAAC,GAAY,UAAAC,EAAA,IAAaC,EAAe;AAAA,IACzD,gBAAgB;AAAA,EAAA,CACjB,GAEKC,IAAoB,MAAM;AACrB,IAAAV,KACEO;EAAA,GAGPI,IAAuBC;AAAA,IAC3B,CAACC,MAAqC;AAC3B,MAAAZ,EAAA,YAAYY,EAAE,OAAO,KAAK;AAAA,IACrC;AAAA,IACA,CAACZ,CAAQ;AAAA,EAAA;AAMT,SAAA,gBAAAa;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAChB,aAAY;AAAA,MACZ,SAAS;AAAA,MAET,4BAACA,GAAS,EAAA,aAAY,UAAS,iBAAgB,iBAAgB,OAAO,GACpE,UAAA;AAAA,QAAA,gBAAAD;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,UAAUb,IAAQ,eAbJE,IAAU,iBAAiB;AAAA,YAczC,WAAS;AAAA,YACT,OAAM;AAAA,YACN,OAAAH;AAAA,YACA,UAAUS;AAAA,YACV,OAAO;AAAA,YACP,UAAQ;AAAA,YACR,OAAM;AAAA,YACN,cAAcT;AAAA,YACd,kCACGe,GAAgB,EAAA,SAAS,CAAC,CAACd,GAAO,SAAAE,GAAkB,WAAWD,GAAc;AAAA,UAAA;AAAA,QAElF;AAAA,QACA,gBAAAU;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,UAAS;AAAA,YACT,MAAK;AAAA,YACL,OAAOZ,IAAY,WAAW,aAAaE,CAAQ;AAAA,YACnD,OAAO;AAAA,YACP,SAASE;AAAA,YACT,UAAU,CAACJ;AAAA,UAAA;AAAA,QACb;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN,GAEea,IAAAC,EAAKrB,CAAO;"}
|
@@ -1,22 +1,33 @@
|
|
1
1
|
import { jsx as r, jsxs as d } from "react/jsx-runtime";
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import n from "../../../ui/
|
5
|
-
import
|
2
|
+
import { memo as h, useCallback as i } from "react";
|
3
|
+
import P from "../../../ui/buttons/button/button.js";
|
4
|
+
import n from "../../../ui/inputs/text-input/text-input.js";
|
5
|
+
import m from "../../../ui/layout/flex-view.js";
|
6
|
+
import b from "../../../ui/separator/separator.js";
|
6
7
|
import p from "../../comps/input-status-icon/input-status-icon.js";
|
7
|
-
import { FormWrapper as
|
8
|
-
const
|
9
|
-
onSubmit:
|
10
|
-
onChange:
|
11
|
-
formData:
|
8
|
+
import { FormWrapper as C } from "../forgot-password-styled.js";
|
9
|
+
const y = ({
|
10
|
+
onSubmit: l,
|
11
|
+
onChange: e,
|
12
|
+
formData: o,
|
12
13
|
errors: s,
|
13
|
-
isSubmitDisabled:
|
14
|
-
isProcessing:
|
14
|
+
isSubmitDisabled: w,
|
15
|
+
isProcessing: u,
|
15
16
|
isValid: t = !1
|
16
17
|
}) => {
|
17
|
-
const
|
18
|
+
const c = t && o.password === o.confirmPassword, f = i(
|
19
|
+
(a) => {
|
20
|
+
e("password", a.target.value);
|
21
|
+
},
|
22
|
+
[e]
|
23
|
+
), g = i(
|
24
|
+
(a) => {
|
25
|
+
e("confirmPassword", a.target.value);
|
26
|
+
},
|
27
|
+
[e]
|
28
|
+
);
|
18
29
|
return /* @__PURE__ */ r(
|
19
|
-
|
30
|
+
m,
|
20
31
|
{
|
21
32
|
$gutterX: 2,
|
22
33
|
$gapX: 1.5,
|
@@ -24,17 +35,17 @@ const h = ({
|
|
24
35
|
$justifyContent: "center",
|
25
36
|
$background: "BLACK_2",
|
26
37
|
$height: 308,
|
27
|
-
children: /* @__PURE__ */ d(
|
28
|
-
/* @__PURE__ */ d(
|
38
|
+
children: /* @__PURE__ */ d(C, { onSubmit: l, children: [
|
39
|
+
/* @__PURE__ */ d(m, { children: [
|
29
40
|
/* @__PURE__ */ r(
|
30
|
-
|
41
|
+
n,
|
31
42
|
{
|
32
43
|
type: "password",
|
33
44
|
renderAs: s.password ? "error-dark" : "primary-dark",
|
34
|
-
autoComplete: "password",
|
45
|
+
autoComplete: "new-password",
|
35
46
|
label: "New Password",
|
36
|
-
value:
|
37
|
-
onChange:
|
47
|
+
value: o.password,
|
48
|
+
onChange: f,
|
38
49
|
width: 330,
|
39
50
|
required: !0,
|
40
51
|
shape: "borderLess",
|
@@ -42,16 +53,16 @@ const h = ({
|
|
42
53
|
siblingElement: /* @__PURE__ */ r(p, { isError: !!s.password, isValid: t, isLoading: !1 })
|
43
54
|
}
|
44
55
|
),
|
45
|
-
/* @__PURE__ */ r(
|
56
|
+
/* @__PURE__ */ r(b, { height: 36 }),
|
46
57
|
/* @__PURE__ */ r(
|
47
|
-
|
58
|
+
n,
|
48
59
|
{
|
49
60
|
type: "password",
|
50
61
|
renderAs: s.confirmPassword ? "error-dark" : "primary-dark",
|
51
|
-
autoComplete: "password",
|
62
|
+
autoComplete: "new-password",
|
52
63
|
label: "Re-enter Password",
|
53
|
-
value:
|
54
|
-
onChange:
|
64
|
+
value: o.confirmPassword,
|
65
|
+
onChange: g,
|
55
66
|
width: 330,
|
56
67
|
required: !0,
|
57
68
|
shape: "borderLess",
|
@@ -60,7 +71,7 @@ const h = ({
|
|
60
71
|
p,
|
61
72
|
{
|
62
73
|
isError: !!s.confirmPassword,
|
63
|
-
isValid:
|
74
|
+
isValid: c,
|
64
75
|
isLoading: !1
|
65
76
|
}
|
66
77
|
)
|
@@ -68,22 +79,22 @@ const h = ({
|
|
68
79
|
)
|
69
80
|
] }),
|
70
81
|
/* @__PURE__ */ r(
|
71
|
-
|
82
|
+
P,
|
72
83
|
{
|
73
84
|
size: "small",
|
74
85
|
renderAs: "secondary-dark",
|
75
86
|
type: "submit",
|
76
87
|
label: "Continue",
|
77
88
|
width: 336,
|
78
|
-
busy:
|
79
|
-
disabled:
|
89
|
+
busy: u,
|
90
|
+
disabled: w
|
80
91
|
}
|
81
92
|
)
|
82
93
|
] })
|
83
94
|
}
|
84
95
|
);
|
85
|
-
},
|
96
|
+
}, I = h(y);
|
86
97
|
export {
|
87
|
-
|
98
|
+
I as default
|
88
99
|
};
|
89
100
|
//# sourceMappingURL=reset-password-form.js.map
|
@@ -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 } 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 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=\"password\"\n label=\"New Password\"\n value={formData.password}\n onChange={
|
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 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,IAC5C;AAAA,IACA,CAACT,CAAQ;AAAA,EAAA;AAIT,SAAA,gBAAAW;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAChB,aAAY;AAAA,MACZ,SAAS;AAAA,MAET,UAAC,gBAAAC,EAAAC,GAAA,EAAmB,UAAAf,GAClB,UAAA;AAAA,QAAA,gBAAAc,EAACD,GACC,EAAA,UAAA;AAAA,UAAA,gBAAAD;AAAA,YAACI;AAAA,YAAA;AAAA,cACC,MAAM;AAAA,cACN,UAAUb,EAAO,WAAW,eAAe;AAAA,cAC3C,cAAa;AAAA,cACb,OAAM;AAAA,cACN,OAAOD,EAAS;AAAA,cAChB,UAAUM;AAAA,cACV,OAAO;AAAA,cACP,UAAQ;AAAA,cACR,OAAM;AAAA,cACN,cAAcL,EAAO;AAAA,cACrB,gBACG,gBAAAS,EAAAK,GAAA,EAAgB,SAAS,CAAC,CAACd,EAAO,UAAU,SAAAG,GAAkB,WAAW,GAAO,CAAA;AAAA,YAAA;AAAA,UAErF;AAAA,UACA,gBAAAM,EAACM,GAAU,EAAA,QAAQ,GAAI,CAAA;AAAA,UACvB,gBAAAN;AAAA,YAACI;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,UAAUb,EAAO,kBAAkB,eAAe;AAAA,cAClD,cAAa;AAAA,cACb,OAAM;AAAA,cACN,OAAOD,EAAS;AAAA,cAChB,UAAUS;AAAA,cACV,OAAO;AAAA,cACP,UAAQ;AAAA,cACR,OAAM;AAAA,cACN,cAAcR,EAAO;AAAA,cACrB,gBACE,gBAAAS;AAAA,gBAACK;AAAA,gBAAA;AAAA,kBACC,SAAS,CAAC,CAACd,EAAO;AAAA,kBAClB,SAASI;AAAA,kBACT,WAAW;AAAA,gBAAA;AAAA,cACb;AAAA,YAAA;AAAA,UAEJ;AAAA,QAAA,GACF;AAAA,QACA,gBAAAK;AAAA,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,60 +1,69 @@
|
|
1
|
-
import { jsx as r, jsxs as
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
1
|
+
import { jsx as r, jsxs as l } from "react/jsx-runtime";
|
2
|
+
import { memo as c, useCallback as f } from "react";
|
3
|
+
import g from "../../../ui/buttons/button/button.js";
|
4
|
+
import h from "../../../ui/inputs/text-input/text-input.js";
|
5
|
+
import b from "../../../ui/layout/flex-view.js";
|
6
|
+
import I from "../../comps/input-status-icon/input-status-icon.js";
|
7
|
+
import { FormWrapper as $ } from "../forgot-password-styled.js";
|
8
|
+
const k = ({
|
9
|
+
onSubmit: s,
|
10
|
+
onChange: o,
|
11
|
+
value: i,
|
11
12
|
error: e,
|
12
|
-
isSubmitDisabled:
|
13
|
-
isProcessing:
|
13
|
+
isSubmitDisabled: a,
|
14
|
+
isProcessing: n,
|
14
15
|
isValid: m = !1,
|
15
|
-
label:
|
16
|
+
label: u,
|
16
17
|
field: t
|
17
|
-
}) =>
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
18
|
+
}) => {
|
19
|
+
const d = f(
|
20
|
+
(p) => {
|
21
|
+
t && o(t, p.target.value);
|
22
|
+
},
|
23
|
+
[o, t]
|
24
|
+
);
|
25
|
+
return /* @__PURE__ */ r(
|
26
|
+
b,
|
27
|
+
{
|
28
|
+
$gutterX: 2,
|
29
|
+
$gapX: 1.5,
|
30
|
+
$alignItems: "center",
|
31
|
+
$justifyContent: "center",
|
32
|
+
$background: "BLACK_2",
|
33
|
+
$height: 308,
|
34
|
+
children: /* @__PURE__ */ l($, { onSubmit: s, children: [
|
35
|
+
/* @__PURE__ */ r(
|
36
|
+
h,
|
37
|
+
{
|
38
|
+
renderAs: e ? "error-dark" : "primary-dark",
|
39
|
+
autoFocus: !0,
|
40
|
+
label: u,
|
41
|
+
value: i,
|
42
|
+
onChange: d,
|
43
|
+
width: 330,
|
44
|
+
required: !0,
|
45
|
+
shape: "borderLess",
|
46
|
+
errorMessage: e,
|
47
|
+
siblingElement: /* @__PURE__ */ r(I, { isError: !!e, isValid: m, isLoading: !1 })
|
48
|
+
}
|
49
|
+
),
|
50
|
+
/* @__PURE__ */ r(
|
51
|
+
g,
|
52
|
+
{
|
53
|
+
size: "small",
|
54
|
+
renderAs: "secondary-dark",
|
55
|
+
type: "submit",
|
56
|
+
label: "Get Verification Code",
|
57
|
+
width: 336,
|
58
|
+
busy: n,
|
59
|
+
disabled: a
|
60
|
+
}
|
61
|
+
)
|
62
|
+
] })
|
63
|
+
}
|
64
|
+
);
|
65
|
+
}, L = c(k);
|
57
66
|
export {
|
58
|
-
|
67
|
+
L as default
|
59
68
|
};
|
60
69
|
//# sourceMappingURL=user-identifier-form.js.map
|
@@ -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';\nimport type
|
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 field,\n}: ISingleFieldFormProps) => {\n const handleInputChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n field && onChange(field, e.target.value);\n },\n [onChange, field],\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","field","handleInputChange","useCallback","e","jsx","FlexView","jsxs","Styled.FormWrapper","TextInput","InputStatusIcon","Button","userIdentifierForm","memo"],"mappings":";;;;;;;AAUA,MAAMA,IAAqB,CAAC;AAAA,EAC1B,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,OAAAC;AAAA,EACA,OAAAC;AACF,MAA6B;AAC3B,QAAMC,IAAoBC;AAAA,IACxB,CAACC,MAAqC;AACpC,MAAAH,KAASP,EAASO,GAAOG,EAAE,OAAO,KAAK;AAAA,IACzC;AAAA,IACA,CAACV,GAAUO,CAAK;AAAA,EAAA;AAIhB,SAAA,gBAAAI;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAChB,aAAY;AAAA,MACZ,SAAS;AAAA,MAET,UAAC,gBAAAC,EAAAC,GAAA,EAAmB,UAAAf,GAClB,UAAA;AAAA,QAAA,gBAAAY;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,UAAUb,IAAQ,eAAe;AAAA,YACjC,WAAS;AAAA,YACT,OAAAI;AAAA,YACA,OAAAL;AAAA,YACA,UAAUO;AAAA,YACV,OAAO;AAAA,YACP,UAAQ;AAAA,YACR,OAAM;AAAA,YACN,cAAcN;AAAA,YACd,kCAAiBc,GAAgB,EAAA,SAAS,CAAC,CAACd,GAAO,SAAAG,GAAkB,WAAW,IAAO;AAAA,UAAA;AAAA,QACzF;AAAA,QACA,gBAAAM;AAAA,UAACM;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,UAAS;AAAA,YACT,MAAK;AAAA,YACL,OAAM;AAAA,YACN,OAAO;AAAA,YACP,MAAMb;AAAA,YACN,UAAUD;AAAA,UAAA;AAAA,QACZ;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN,GAEee,IAAAC,EAAKrB,CAAkB;"}
|
@@ -1,26 +1,27 @@
|
|
1
|
-
import { jsx as e, jsxs as
|
2
|
-
import y from "
|
1
|
+
import { jsx as e, jsxs as d, Fragment as $ } from "react/jsx-runtime";
|
2
|
+
import { memo as y } from "react";
|
3
|
+
import x from "../../../ui/buttons/button/button.js";
|
3
4
|
import c from "../../../ui/inputs/text-input/text-input.js";
|
4
5
|
import n from "../../../ui/layout/flex-view.js";
|
5
6
|
import s from "../../../ui/separator/separator.js";
|
6
7
|
import u from "../../comps/input-status-icon/input-status-icon.js";
|
7
|
-
import
|
8
|
-
import { FormWrapper as
|
9
|
-
const
|
8
|
+
import F from "../../comps/resend-otp/resend-otp.js";
|
9
|
+
import { FormWrapper as C } from "./identifier-otp-form-styled.js";
|
10
|
+
const E = ({
|
10
11
|
identifier: f,
|
11
12
|
otp: l,
|
12
13
|
errors: r,
|
13
14
|
isOtpVerified: i,
|
14
15
|
isLoading: a,
|
15
|
-
isSubmitDisabled:
|
16
|
+
isSubmitDisabled: p,
|
16
17
|
showOtpInput: t,
|
17
18
|
onChange: m,
|
18
|
-
onSubmit:
|
19
|
-
onSendOtp:
|
19
|
+
onSubmit: g,
|
20
|
+
onSendOtp: h
|
20
21
|
}) => {
|
21
|
-
const b = t ? "success-dark" : "primary-dark",
|
22
|
-
return /* @__PURE__ */ e(n, { $gutterX: 2, $gapX: 1.5, $background: "BLACK_2", $height: 308, children: /* @__PURE__ */
|
23
|
-
/* @__PURE__ */
|
22
|
+
const b = t ? "success-dark" : "primary-dark", k = i ? "success-dark" : "primary-dark";
|
23
|
+
return /* @__PURE__ */ e(n, { $gutterX: 2, $gapX: 1.5, $background: "BLACK_2", $height: 308, children: /* @__PURE__ */ d(C, { onSubmit: g, children: [
|
24
|
+
/* @__PURE__ */ d(n, { $alignItems: "center", $justifyContent: "center", children: [
|
24
25
|
/* @__PURE__ */ e(
|
25
26
|
c,
|
26
27
|
{
|
@@ -28,7 +29,7 @@ const C = ({
|
|
28
29
|
autoFocus: !0,
|
29
30
|
label: "Email or Phone",
|
30
31
|
value: f,
|
31
|
-
onChange: (
|
32
|
+
onChange: (o) => m("identifier", o.target.value),
|
32
33
|
width: 330,
|
33
34
|
required: !0,
|
34
35
|
shape: "borderLess",
|
@@ -37,17 +38,17 @@ const C = ({
|
|
37
38
|
siblingElement: /* @__PURE__ */ e(u, { isValid: t, isError: !!r.identifier })
|
38
39
|
}
|
39
40
|
),
|
40
|
-
t && /* @__PURE__ */
|
41
|
+
t && /* @__PURE__ */ d($, { children: [
|
41
42
|
/* @__PURE__ */ e(s, { height: 36 }),
|
42
43
|
/* @__PURE__ */ e(
|
43
44
|
c,
|
44
45
|
{
|
45
46
|
type: "password",
|
46
|
-
renderAs: r.otp ? "error-dark" :
|
47
|
+
renderAs: r.otp ? "error-dark" : k,
|
47
48
|
autoComplete: "password",
|
48
49
|
label: "Verification code",
|
49
50
|
value: l,
|
50
|
-
onChange: (
|
51
|
+
onChange: (o) => m("otp", o.target.value),
|
51
52
|
width: 330,
|
52
53
|
required: !0,
|
53
54
|
shape: "borderLess",
|
@@ -64,12 +65,12 @@ const C = ({
|
|
64
65
|
}
|
65
66
|
),
|
66
67
|
/* @__PURE__ */ e(s, { heightX: 1.25 }),
|
67
|
-
/* @__PURE__ */ e(n, { $alignItems: "flex-end", $width: "100%", children: /* @__PURE__ */ e(
|
68
|
+
/* @__PURE__ */ e(n, { $alignItems: "flex-end", $width: "100%", children: /* @__PURE__ */ e(F, { onResendOTP: h, disabled: i }) }),
|
68
69
|
/* @__PURE__ */ e(s, { heightX: 2 })
|
69
70
|
] })
|
70
71
|
] }),
|
71
72
|
/* @__PURE__ */ e(
|
72
|
-
|
73
|
+
x,
|
73
74
|
{
|
74
75
|
size: "small",
|
75
76
|
renderAs: "secondary-dark",
|
@@ -77,12 +78,12 @@ const C = ({
|
|
77
78
|
label: t ? "Log In" : "Get Verification Code",
|
78
79
|
width: 336,
|
79
80
|
busy: !t && a,
|
80
|
-
disabled:
|
81
|
+
disabled: p
|
81
82
|
}
|
82
83
|
)
|
83
84
|
] }) });
|
84
|
-
},
|
85
|
+
}, w = y(E);
|
85
86
|
export {
|
86
|
-
|
87
|
+
w as default
|
87
88
|
};
|
88
89
|
//# 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 } 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 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={(e: ChangeEvent<HTMLInputElement>) => onChange('identifier', e.target.value)}\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={(e: ChangeEvent<HTMLInputElement>) => onChange('otp', e.target.value)}\n width={330}\n required\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 IdentifierOtpForm;\n"],"names":["IdentifierOtpForm","identifier","otp","errors","isOtpVerified","isLoading","isSubmitDisabled","showOtpInput","onChange","onSubmit","onSendOtp","identifierStatusVariant","otpStatusVariant","jsx","FlexView","jsxs","Styled.FormWrapper","TextInput","e","InputStatusIcon","Fragment","Separator","ResendOTP","Button","
|
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 } 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 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={(e: ChangeEvent<HTMLInputElement>) => onChange('identifier', e.target.value)}\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={(e: ChangeEvent<HTMLInputElement>) => onChange('otp', e.target.value)}\n width={330}\n required\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","jsx","FlexView","jsxs","Styled.FormWrapper","TextInput","e","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;AAE1D,SACG,gBAAAS,EAAAC,GAAA,EAAS,UAAU,GAAG,OAAO,KAAK,aAAY,WAAU,SAAS,KAChE,UAAA,gBAAAC,EAACC,GAAA,EAAmB,UAAAP,GAClB,UAAA;AAAA,IAAA,gBAAAM,EAACD,GAAS,EAAA,aAAY,UAAS,iBAAgB,UAC7C,UAAA;AAAA,MAAA,gBAAAD;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,UAAUd,EAAO,aAAa,eAAeQ;AAAA,UAC7C,WAAS;AAAA,UACT,OAAM;AAAA,UACN,OAAOV;AAAA,UACP,UAAU,CAACiB,MAAqCV,EAAS,cAAcU,EAAE,OAAO,KAAK;AAAA,UACrF,OAAO;AAAA,UACP,UAAQ;AAAA,UACR,OAAM;AAAA,UACN,cAAcf,EAAO;AAAA,UACrB,UAAUI;AAAA,UACV,kCACGY,GAAgB,EAAA,SAASZ,GAAc,SAAS,CAAC,CAACJ,EAAO,YAAY;AAAA,QAAA;AAAA,MAE1E;AAAA,MACCI,KAEG,gBAAAQ,EAAAK,GAAA,EAAA,UAAA;AAAA,QAAC,gBAAAP,EAAAQ,GAAA,EAAU,QAAQ,GAAI,CAAA;AAAA,QACvB,gBAAAR;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,UAAUd,EAAO,MAAM,eAAeS;AAAA,YACtC,cAAa;AAAA,YACb,OAAM;AAAA,YACN,OAAOV;AAAA,YACP,UAAU,CAACgB,MAAqCV,EAAS,OAAOU,EAAE,OAAO,KAAK;AAAA,YAC9E,OAAO;AAAA,YACP,UAAQ;AAAA,YACR,OAAM;AAAA,YACN,cAAcf,EAAO;AAAA,YACrB,UAAUC,KAAkBF,EAAI,WAAW,KAAKG;AAAA,YAChD,gBACE,gBAAAQ;AAAA,cAACM;AAAA,cAAA;AAAA,gBACC,WAAAd;AAAA,gBACA,SAASD;AAAA,gBACT,SAAS,CAAC,CAACD,EAAO;AAAA,cAAA;AAAA,YACpB;AAAA,UAAA;AAAA,QAEJ;AAAA,QACA,gBAAAU,EAACQ,GAAU,EAAA,SAAS,KAAM,CAAA;AAAA,QACzB,gBAAAR,EAAAC,GAAA,EAAS,aAAY,YAAW,QAAO,QACtC,UAAC,gBAAAD,EAAAS,GAAA,EAAU,aAAaZ,GAAW,UAAUN,EAAe,CAAA,GAC9D;AAAA,QACA,gBAAAS,EAACQ,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,MAAA,GACzB;AAAA,IAAA,GAEJ;AAAA,IACA,gBAAAR;AAAA,MAACU;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,UAAS;AAAA,QACT,MAAK;AAAA,QACL,OAAOhB,IAAe,WAAW;AAAA,QACjC,OAAO;AAAA,QACP,MAAM,CAACA,KAAgBF;AAAA,QACvB,UAAUC;AAAA,MAAA;AAAA,IACZ;AAAA,EAAA,EACF,CAAA,EACF,CAAA;AAEJ,GAEekB,IAAAC,EAAKzB,CAAiB;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"login-constants.js","sources":["../../../../src/features/auth/login/login-constants.ts"],"sourcesContent":["import type {
|
1
|
+
{"version":3,"file":"login-constants.js","sources":["../../../../src/features/auth/login/login-constants.ts"],"sourcesContent":["import type { TAuthTabKeys } from './login-types';\n\ninterface IAuthTab {\n id: TAuthTabKeys;\n label: string;\n}\n\nexport const AUTH_TABS: IAuthTab[] = [\n {\n id: 'username',\n label: 'Username',\n },\n {\n id: 'identifier',\n label: 'Email/Phone',\n },\n];\n"],"names":["AUTH_TABS"],"mappings":"AAOO,MAAMA,IAAwB;AAAA,EACnC;AAAA,IACE,IAAI;AAAA,IACJ,OAAO;AAAA,EACT;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,OAAO;AAAA,EACT;AACF;"}
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import { jsxs as n, jsx as o } from "react/jsx-runtime";
|
2
|
+
import { memo as a } from "react";
|
2
3
|
import e from "../../../ui/buttons/button/button.js";
|
3
|
-
import
|
4
|
-
import
|
5
|
-
const
|
4
|
+
import i from "../../../ui/layout/flex-view.js";
|
5
|
+
import c from "../../../ui/separator/separator.js";
|
6
|
+
const s = ({ onRetryLogin: t, onGoToSignup: r }) => /* @__PURE__ */ n(i, { $alignItems: "center", $justifyContent: "center", children: [
|
6
7
|
/* @__PURE__ */ o(
|
7
8
|
e,
|
8
9
|
{
|
@@ -13,7 +14,7 @@ const c = ({ onRetryLogin: t, onGoToSignup: r }) => /* @__PURE__ */ n(a, { $alig
|
|
13
14
|
onClick: r
|
14
15
|
}
|
15
16
|
),
|
16
|
-
/* @__PURE__ */ o(
|
17
|
+
/* @__PURE__ */ o(c, { heightX: 1 }),
|
17
18
|
/* @__PURE__ */ o(
|
18
19
|
e,
|
19
20
|
{
|
@@ -24,8 +25,8 @@ const c = ({ onRetryLogin: t, onGoToSignup: r }) => /* @__PURE__ */ n(a, { $alig
|
|
24
25
|
onClick: t
|
25
26
|
}
|
26
27
|
)
|
27
|
-
] }),
|
28
|
+
] }), h = a(s);
|
28
29
|
export {
|
29
|
-
|
30
|
+
h as default
|
30
31
|
};
|
31
32
|
//# sourceMappingURL=social-account-not-found.js.map
|