@cuemath/leap 3.1.7 → 3.1.8-aa0

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.
Files changed (57) hide show
  1. package/dist/assets/illustrations/illustrations.js +1 -1
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/constants/country.js +994 -2
  4. package/dist/constants/country.js.map +1 -1
  5. package/dist/features/auth/account-selector/account-selector-styled.js +9 -0
  6. package/dist/features/auth/account-selector/account-selector-styled.js.map +1 -0
  7. package/dist/features/auth/account-selector/account-selector.js +60 -36
  8. package/dist/features/auth/account-selector/account-selector.js.map +1 -1
  9. package/dist/features/auth/comps/auth-page-layout/{auth-page-layout-styles.js → auth-page-layout-styled.js} +1 -1
  10. package/dist/features/auth/comps/auth-page-layout/{auth-page-layout-styles.js.map → auth-page-layout-styled.js.map} +1 -1
  11. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +20 -9
  12. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -1
  13. package/dist/features/auth/comps/auth-static-panel/auth-static-panel.js +1 -1
  14. package/dist/features/auth/comps/auth-static-panel/auth-static-panel.js.map +1 -1
  15. package/dist/features/auth/forgot-password/forgot-password-styled.js +30 -4
  16. package/dist/features/auth/forgot-password/forgot-password-styled.js.map +1 -1
  17. package/dist/features/auth/forgot-password/otp-form/otp-form.js +27 -29
  18. package/dist/features/auth/forgot-password/otp-form/otp-form.js.map +1 -1
  19. package/dist/features/auth/forgot-password/reset-password-form/reset-password-form.js +22 -27
  20. package/dist/features/auth/forgot-password/reset-password-form/reset-password-form.js.map +1 -1
  21. package/dist/features/auth/forgot-password/user-identifier-form/user-identifier-form.js +25 -28
  22. package/dist/features/auth/forgot-password/user-identifier-form/user-identifier-form.js.map +1 -1
  23. package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js +17 -4
  24. package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js.map +1 -1
  25. package/dist/features/auth/login/identifier-otp-form/identifier-otp-form.js +88 -79
  26. package/dist/features/auth/login/identifier-otp-form/identifier-otp-form.js.map +1 -1
  27. package/dist/features/auth/login/login-styled.js +26 -0
  28. package/dist/features/auth/login/login-styled.js.map +1 -0
  29. package/dist/features/auth/login/social-account-not-found/social-account-not-found.js +27 -21
  30. package/dist/features/auth/login/social-account-not-found/social-account-not-found.js.map +1 -1
  31. package/dist/features/auth/login/social-login-methods/social-login-methods-styled.js +9 -0
  32. package/dist/features/auth/login/social-login-methods/social-login-methods-styled.js.map +1 -0
  33. package/dist/features/auth/login/social-login-methods/social-login-methods.js +43 -34
  34. package/dist/features/auth/login/social-login-methods/social-login-methods.js.map +1 -1
  35. package/dist/features/auth/login/username-password-form/username-password-form.js +68 -71
  36. package/dist/features/auth/login/username-password-form/username-password-form.js.map +1 -1
  37. package/dist/features/auth/signup/custom-input-field/country-selector/country-list-menu.js +1 -1
  38. package/dist/features/auth/signup/custom-input-field/country-selector/country-list-menu.js.map +1 -1
  39. package/dist/features/auth/signup/signup-constants.js +6 -998
  40. package/dist/features/auth/signup/signup-constants.js.map +1 -1
  41. package/dist/features/auth/user-list/user-item/user-item.js +33 -32
  42. package/dist/features/auth/user-list/user-item/user-item.js.map +1 -1
  43. package/dist/features/auth/user-list/user-list.js +60 -51
  44. package/dist/features/auth/user-list/user-list.js.map +1 -1
  45. package/dist/features/hooks/use-viewport/use-viewport.js +21 -0
  46. package/dist/features/hooks/use-viewport/use-viewport.js.map +1 -0
  47. package/dist/features/ui/buttons/button/button-styled.js +29 -29
  48. package/dist/features/ui/buttons/button/button-styled.js.map +1 -1
  49. package/dist/features/utils/media.js +16 -0
  50. package/dist/features/utils/media.js.map +1 -0
  51. package/dist/features/worksheet/worksheet/worksheet-question/subjective-feedback.js +60 -60
  52. package/dist/features/worksheet/worksheet/worksheet-question/subjective-feedback.js.map +1 -1
  53. package/dist/index.d.ts +22 -15
  54. package/dist/index.js +56 -52
  55. package/dist/index.js.map +1 -1
  56. package/dist/static/cuemath-app-qr-code.7205ee79.svg +1 -0
  57. package/package.json +1 -1
@@ -1,78 +1,73 @@
1
1
  import { jsx as r, jsxs as d } from "react/jsx-runtime";
2
- import { memo as h, useCallback as i } from "react";
2
+ import { memo as g, useCallback as i } from "react";
3
3
  import P from "../../../ui/buttons/button/button.js";
4
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";
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 = ({
5
+ import b from "../../../ui/layout/flex-view.js";
6
+ import h from "../../../ui/separator/separator.js";
7
+ import m from "../../comps/input-status-icon/input-status-icon.js";
8
+ import { Container as y, FormWrapper as C } from "../forgot-password-styled.js";
9
+ const k = ({
10
10
  onSubmit: l,
11
11
  onChange: e,
12
12
  formData: o,
13
13
  errors: s,
14
- isSubmitDisabled: w,
14
+ isSubmitDisabled: p,
15
15
  isProcessing: u,
16
16
  isValid: t = !1
17
17
  }) => {
18
- const c = t && o.password === o.confirmPassword, f = i(
18
+ const w = t && o.password === o.confirmPassword, c = i(
19
19
  (a) => {
20
20
  e("password", a.target.value);
21
21
  },
22
22
  [e]
23
- ), g = i(
23
+ ), f = i(
24
24
  (a) => {
25
25
  e("confirmPassword", a.target.value);
26
26
  },
27
27
  [e]
28
28
  );
29
29
  return /* @__PURE__ */ r(
30
- m,
30
+ y,
31
31
  {
32
- $gutterX: 2,
32
+ $gutterX: 1.5,
33
33
  $gapX: 1.5,
34
34
  $alignItems: "center",
35
35
  $justifyContent: "center",
36
36
  $background: "BLACK_2",
37
- $height: 308,
38
37
  children: /* @__PURE__ */ d(C, { onSubmit: l, children: [
39
- /* @__PURE__ */ d(m, { children: [
38
+ /* @__PURE__ */ d(b, { children: [
40
39
  /* @__PURE__ */ r(
41
40
  n,
42
41
  {
43
42
  type: "password",
44
43
  renderAs: s.password ? "error-dark" : "primary-dark",
45
- autoComplete: "new-password",
46
44
  label: "New Password",
47
45
  value: o.password,
48
- onChange: f,
49
- width: 330,
46
+ onChange: c,
50
47
  autoFocus: !0,
51
48
  required: !0,
52
49
  shape: "borderLess",
53
50
  errorMessage: s.password,
54
- siblingElement: /* @__PURE__ */ r(p, { isError: !!s.password, isValid: t, isLoading: !1 })
51
+ siblingElement: /* @__PURE__ */ r(m, { isError: !!s.password, isValid: t, isLoading: !1 })
55
52
  }
56
53
  ),
57
- /* @__PURE__ */ r(b, { height: 36 }),
54
+ /* @__PURE__ */ r(h, { height: 36 }),
58
55
  /* @__PURE__ */ r(
59
56
  n,
60
57
  {
61
58
  type: "password",
62
59
  renderAs: s.confirmPassword ? "error-dark" : "primary-dark",
63
- autoComplete: "new-password",
64
60
  label: "Re-enter Password",
65
61
  value: o.confirmPassword,
66
- onChange: g,
67
- width: 330,
62
+ onChange: f,
68
63
  required: !0,
69
64
  shape: "borderLess",
70
65
  errorMessage: s.confirmPassword,
71
66
  siblingElement: /* @__PURE__ */ r(
72
- p,
67
+ m,
73
68
  {
74
69
  isError: !!s.confirmPassword,
75
- isValid: c,
70
+ isValid: w,
76
71
  isLoading: !1
77
72
  }
78
73
  )
@@ -86,16 +81,16 @@ const y = ({
86
81
  renderAs: "secondary-dark",
87
82
  type: "submit",
88
83
  label: "Continue",
89
- width: 336,
84
+ width: "100%",
90
85
  busy: u,
91
- disabled: w
86
+ disabled: p
92
87
  }
93
88
  )
94
89
  ] })
95
90
  }
96
91
  );
97
- }, I = h(y);
92
+ }, j = g(k);
98
93
  export {
99
- I as default
94
+ j as default
100
95
  };
101
96
  //# 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, 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,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,WAAS;AAAA,cACT,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
+ {"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 <Styled.Container\n $gutterX={1.5}\n $gapX={1.5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"BLACK_2\"\n >\n <Styled.FormWrapper onSubmit={onSubmit}>\n <FlexView>\n <TextInput\n type={'password'}\n renderAs={errors.password ? 'error-dark' : 'primary-dark'}\n label=\"New Password\"\n value={formData.password}\n onChange={handlePasswordChange}\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 label=\"Re-enter Password\"\n value={formData.confirmPassword}\n onChange={handleConfirmPasswordChange}\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=\"100%\"\n busy={isProcessing}\n disabled={isSubmitDisabled}\n />\n </Styled.FormWrapper>\n </Styled.Container>\n );\n};\n\nexport default memo(ResetPasswordForm);\n"],"names":["ResetPasswordForm","onSubmit","onChange","formData","errors","isSubmitDisabled","isProcessing","isValid","isConfirmPasswordValid","handlePasswordChange","useCallback","e","handleConfirmPasswordChange","jsx","Styled.Container","jsxs","Styled.FormWrapper","FlexView","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;AAAAA,IAAA;AAAA,MACC,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAChB,aAAY;AAAA,MAEZ,UAAC,gBAAAC,EAAAC,GAAA,EAAmB,UAAAf,GAClB,UAAA;AAAA,QAAA,gBAAAc,EAACE,GACC,EAAA,UAAA;AAAA,UAAA,gBAAAJ;AAAA,YAACK;AAAA,YAAA;AAAA,cACC,MAAM;AAAA,cACN,UAAUd,EAAO,WAAW,eAAe;AAAA,cAC3C,OAAM;AAAA,cACN,OAAOD,EAAS;AAAA,cAChB,UAAUM;AAAA,cACV,WAAS;AAAA,cACT,UAAQ;AAAA,cACR,OAAM;AAAA,cACN,cAAcL,EAAO;AAAA,cACrB,gBACG,gBAAAS,EAAAM,GAAA,EAAgB,SAAS,CAAC,CAACf,EAAO,UAAU,SAAAG,GAAkB,WAAW,GAAO,CAAA;AAAA,YAAA;AAAA,UAErF;AAAA,UACA,gBAAAM,EAACO,GAAU,EAAA,QAAQ,GAAI,CAAA;AAAA,UACvB,gBAAAP;AAAA,YAACK;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,UAAUd,EAAO,kBAAkB,eAAe;AAAA,cAClD,OAAM;AAAA,cACN,OAAOD,EAAS;AAAA,cAChB,UAAUS;AAAA,cACV,UAAQ;AAAA,cACR,OAAM;AAAA,cACN,cAAcR,EAAO;AAAA,cACrB,gBACE,gBAAAS;AAAA,gBAACM;AAAA,gBAAA;AAAA,kBACC,SAAS,CAAC,CAACf,EAAO;AAAA,kBAClB,SAASI;AAAA,kBACT,WAAW;AAAA,gBAAA;AAAA,cACb;AAAA,YAAA;AAAA,UAEJ;AAAA,QAAA,GACF;AAAA,QACA,gBAAAK;AAAA,UAACQ;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,UAAS;AAAA,YACT,MAAK;AAAA,YACL,OAAM;AAAA,YACN,OAAM;AAAA,YACN,MAAMf;AAAA,YACN,UAAUD;AAAA,UAAA;AAAA,QACZ;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN,GAEeiB,IAAAC,EAAKvB,CAAiB;"}
@@ -1,68 +1,65 @@
1
1
  import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
- import { memo as p, useCallback as f } from "react";
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";
6
- import b from "../../comps/input-status-icon/input-status-icon.js";
7
- import { FormWrapper as I } from "../forgot-password-styled.js";
8
- const $ = ({
9
- onSubmit: i,
2
+ import { memo as p, useCallback as c } from "react";
3
+ import f from "../../../ui/inputs/text-input/text-input.js";
4
+ import g from "../../comps/input-status-icon/input-status-icon.js";
5
+ import { Container as b, FormWrapper as C, ButtonWrapper as I } from "../forgot-password-styled.js";
6
+ const h = ({
7
+ onSubmit: o,
10
8
  onChange: t,
11
- value: o,
9
+ value: s,
12
10
  error: r,
13
- isSubmitDisabled: s,
11
+ isSubmitDisabled: a,
14
12
  isProcessing: n,
15
- isValid: a = !1,
13
+ isValid: i = !1,
16
14
  label: m
17
15
  }) => {
18
- const d = f(
19
- (u) => {
20
- t("identifier", u.target.value);
16
+ const u = c(
17
+ (d) => {
18
+ t("identifier", d.target.value);
21
19
  },
22
20
  [t]
23
21
  );
24
22
  return /* @__PURE__ */ e(
25
- h,
23
+ b,
26
24
  {
27
- $gutterX: 2,
25
+ $gutterX: 1.5,
28
26
  $gapX: 1.5,
29
27
  $alignItems: "center",
30
28
  $justifyContent: "center",
31
29
  $background: "BLACK_2",
32
- $height: 308,
33
- children: /* @__PURE__ */ l(I, { onSubmit: i, children: [
30
+ children: /* @__PURE__ */ l(C, { onSubmit: o, children: [
34
31
  /* @__PURE__ */ e(
35
- g,
32
+ f,
36
33
  {
37
34
  renderAs: r ? "error-dark" : "primary-dark",
38
35
  autoFocus: !0,
39
36
  label: m,
40
- value: o,
41
- onChange: d,
42
- width: 330,
37
+ value: s,
38
+ onChange: u,
43
39
  required: !0,
44
40
  shape: "borderLess",
41
+ autoComplete: "username",
45
42
  errorMessage: r,
46
- siblingElement: /* @__PURE__ */ e(b, { isError: !!r, isValid: a, isLoading: !1 })
43
+ siblingElement: /* @__PURE__ */ e(g, { isError: !!r, isValid: i, isLoading: !1 })
47
44
  }
48
45
  ),
49
46
  /* @__PURE__ */ e(
50
- c,
47
+ I,
51
48
  {
52
49
  size: "small",
53
50
  renderAs: "secondary-dark",
54
51
  type: "submit",
52
+ width: "100%",
55
53
  label: "Get Verification Code",
56
- width: 336,
57
54
  busy: n,
58
- disabled: s
55
+ disabled: a
59
56
  }
60
57
  )
61
58
  ] })
62
59
  }
63
60
  );
64
- }, A = p($);
61
+ }, j = p(h);
65
62
  export {
66
- A as default
63
+ j as default
67
64
  };
68
65
  //# 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';\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","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;AACF,MAA6B;AAC3B,QAAMC,IAAoBC;AAAA,IACxB,CAACC,MAAqC;AAC3B,MAAAT,EAAA,cAAcS,EAAE,OAAO,KAAK;AAAA,IACvC;AAAA,IACA,CAACT,CAAQ;AAAA,EAAA;AAIT,SAAA,gBAAAU;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,UAAAd,GAClB,UAAA;AAAA,QAAA,gBAAAW;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,UAAUZ,IAAQ,eAAe;AAAA,YACjC,WAAS;AAAA,YACT,OAAAI;AAAA,YACA,OAAAL;AAAA,YACA,UAAUM;AAAA,YACV,OAAO;AAAA,YACP,UAAQ;AAAA,YACR,OAAM;AAAA,YACN,cAAcL;AAAA,YACd,kCAAiBa,GAAgB,EAAA,SAAS,CAAC,CAACb,GAAO,SAAAG,GAAkB,WAAW,IAAO;AAAA,UAAA;AAAA,QACzF;AAAA,QACA,gBAAAK;AAAA,UAACM;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,UAAS;AAAA,YACT,MAAK;AAAA,YACL,OAAM;AAAA,YACN,OAAO;AAAA,YACP,MAAMZ;AAAA,YACN,UAAUD;AAAA,UAAA;AAAA,QACZ;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN,GAEec,IAAAC,EAAKpB,CAAkB;"}
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 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 <Styled.Container\n $gutterX={1.5}\n $gapX={1.5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"BLACK_2\"\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 required\n shape=\"borderLess\"\n autoComplete=\"username\"\n errorMessage={error}\n siblingElement={<InputStatusIcon isError={!!error} isValid={isValid} isLoading={false} />}\n />\n <Styled.ButtonWrapper\n size=\"small\"\n renderAs=\"secondary-dark\"\n type=\"submit\"\n width=\"100%\"\n label=\"Get Verification Code\"\n busy={isProcessing}\n disabled={isSubmitDisabled}\n />\n </Styled.FormWrapper>\n </Styled.Container>\n );\n};\n\nexport default memo(UserIdentifierForm);\n"],"names":["UserIdentifierForm","onSubmit","onChange","value","error","isSubmitDisabled","isProcessing","isValid","label","handleInputChange","useCallback","e","jsx","Styled.Container","jsxs","Styled.FormWrapper","TextInput","InputStatusIcon","Styled.ButtonWrapper","userIdentifierForm","memo"],"mappings":";;;;;AAQA,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;AACF,MAA6B;AAC3B,QAAMC,IAAoBC;AAAA,IACxB,CAACC,MAAqC;AAC3B,MAAAT,EAAA,cAAcS,EAAE,OAAO,KAAK;AAAA,IACvC;AAAA,IACA,CAACT,CAAQ;AAAA,EAAA;AAIT,SAAA,gBAAAU;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAChB,aAAY;AAAA,MAEZ,UAAC,gBAAAC,EAAAC,GAAA,EAAmB,UAAAd,GAClB,UAAA;AAAA,QAAA,gBAAAW;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,UAAUZ,IAAQ,eAAe;AAAA,YACjC,WAAS;AAAA,YACT,OAAAI;AAAA,YACA,OAAAL;AAAA,YACA,UAAUM;AAAA,YACV,UAAQ;AAAA,YACR,OAAM;AAAA,YACN,cAAa;AAAA,YACb,cAAcL;AAAA,YACd,kCAAiBa,GAAgB,EAAA,SAAS,CAAC,CAACb,GAAO,SAAAG,GAAkB,WAAW,IAAO;AAAA,UAAA;AAAA,QACzF;AAAA,QACA,gBAAAK;AAAA,UAACM;AAAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,UAAS;AAAA,YACT,MAAK;AAAA,YACL,OAAM;AAAA,YACN,OAAM;AAAA,YACN,MAAMZ;AAAA,YACN,UAAUD;AAAA,UAAA;AAAA,QACZ;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN,GAEec,IAAAC,EAAKpB,CAAkB;"}
@@ -1,12 +1,25 @@
1
- import e from "styled-components";
2
- const t = e.form`
1
+ import t from "styled-components";
2
+ import o from "../../../ui/layout/flex-view.js";
3
+ import { media as e } from "../../../utils/media.js";
4
+ const r = t.form`
3
5
  display: flex;
4
6
  flex-direction: column;
5
7
  justify-content: space-between;
6
- margin-top: 8px;
8
+ margin-top: 0;
7
9
  flex: 1;
10
+ width: 100%;
11
+ max-width: 336px;
12
+ ${e.minDesktop} {
13
+ margin-top: 8px;
14
+ }
15
+ `, n = t(o)`
16
+ height: 300px;
17
+ ${e.minDesktop} {
18
+ height: 308px;
19
+ }
8
20
  `;
9
21
  export {
10
- t as FormWrapper
22
+ n as Container,
23
+ r as FormWrapper
11
24
  };
12
25
  //# 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`;\n\nexport { FormWrapper };\n"],"names":["FormWrapper","styled"],"mappings":";AAEA,MAAMA,IAAcC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
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\nimport FlexView from '../../../ui/layout/flex-view';\nimport { media } from '../../../utils/media';\n\nconst FormWrapper = styled.form`\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n margin-top: 0;\n flex: 1;\n width: 100%;\n max-width: 336px;\n ${media.minDesktop} {\n margin-top: 8px;\n }\n`;\n\nconst Container = styled(FlexView)`\n height: 300px;\n ${media.minDesktop} {\n height: 308px;\n }\n`;\n\nexport { FormWrapper, Container };\n"],"names":["FormWrapper","styled","media","Container","FlexView"],"mappings":";;;AAKA,MAAMA,IAAcC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQvBC,EAAM,UAAU;AAAA;AAAA;AAAA,GAKdC,IAAYF,EAAOG,CAAQ;AAAA;AAAA,IAE7BF,EAAM,UAAU;AAAA;AAAA;AAAA;"}
@@ -1,100 +1,109 @@
1
- import { jsx as e, jsxs as n, Fragment as x } from "react/jsx-runtime";
2
- import { memo as C, useCallback as c } from "react";
3
- import E from "../../../ui/buttons/button/button.js";
1
+ import { jsx as e, jsxs as d, Fragment as C } from "react/jsx-runtime";
2
+ import { memo as F, useCallback as m } from "react";
3
+ import x from "../../../ui/buttons/button/button.js";
4
4
  import u from "../../../ui/inputs/text-input/text-input.js";
5
- import s from "../../../ui/layout/flex-view.js";
6
- import l from "../../../ui/separator/separator.js";
5
+ import c from "../../../ui/layout/flex-view.js";
6
+ import s from "../../../ui/separator/separator.js";
7
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 = ({
8
+ import I from "../../comps/resend-otp/resend-otp.js";
9
+ import { Container as E, FormWrapper as j } from "./identifier-otp-form-styled.js";
10
+ const v = ({
11
11
  identifier: f,
12
- otp: m,
12
+ otp: l,
13
13
  errors: r,
14
- isOtpVerified: i,
15
- isLoading: o,
14
+ isOtpVerified: t,
15
+ isLoading: n,
16
16
  isSubmitDisabled: h,
17
- showOtpInput: t,
17
+ showOtpInput: i,
18
18
  onChange: a,
19
19
  onSubmit: g,
20
20
  onSendOtp: b
21
21
  }) => {
22
- const k = t ? "success-dark" : "primary-dark", $ = i ? "success-dark" : "primary-dark", y = c(
23
- (d) => {
24
- a("identifier", d.target.value);
22
+ const $ = t ? "success-dark" : "primary-dark", k = m(
23
+ (o) => {
24
+ a("identifier", o.target.value);
25
25
  },
26
26
  [a]
27
- ), F = c(
28
- (d) => {
29
- a("otp", d.target.value);
27
+ ), y = m(
28
+ (o) => {
29
+ a("otp", o.target.value);
30
30
  },
31
31
  [a]
32
32
  );
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 }),
53
- /* @__PURE__ */ e(
54
- u,
55
- {
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,
33
+ return /* @__PURE__ */ e(
34
+ E,
35
+ {
36
+ $gutterX: 1.5,
37
+ $gapX: 1.5,
38
+ $background: "BLACK_2",
39
+ $alignItems: "center",
40
+ $justifyContent: "center",
41
+ children: /* @__PURE__ */ d(j, { onSubmit: g, children: [
42
+ /* @__PURE__ */ d(c, { $alignItems: "center", $justifyContent: "center", children: [
43
+ /* @__PURE__ */ e(
44
+ u,
45
+ {
46
+ renderAs: r.identifier ? "error-dark" : "primary-dark",
47
+ autoFocus: !0,
48
+ label: "Email or Phone",
49
+ value: f,
50
+ onChange: k,
51
+ required: !0,
52
+ width: "100%",
53
+ shape: "borderLess",
54
+ errorMessage: r.identifier,
55
+ disabled: i,
56
+ siblingElement: /* @__PURE__ */ e(p, { isError: !!r.identifier })
57
+ }
58
+ ),
59
+ i && /* @__PURE__ */ d(C, { children: [
60
+ /* @__PURE__ */ e(s, { height: 36 }),
61
+ /* @__PURE__ */ e(
62
+ u,
70
63
  {
71
- isLoading: o,
72
- isValid: i,
73
- isError: !!r.otp
64
+ type: "password",
65
+ renderAs: r.otp ? "error-dark" : $,
66
+ label: "Verification code",
67
+ value: l,
68
+ onChange: y,
69
+ width: "100%",
70
+ required: !0,
71
+ autoFocus: !0,
72
+ shape: "borderLess",
73
+ errorMessage: r.otp,
74
+ disabled: t || l.length === 4 && n,
75
+ siblingElement: /* @__PURE__ */ e(
76
+ p,
77
+ {
78
+ isLoading: n,
79
+ isValid: t,
80
+ isError: !!r.otp
81
+ }
82
+ )
74
83
  }
75
- )
84
+ ),
85
+ /* @__PURE__ */ e(s, { heightX: 1.25 }),
86
+ /* @__PURE__ */ e(c, { $alignItems: "flex-end", $width: "100%", children: /* @__PURE__ */ e(I, { onResendOTP: b, disabled: t }) }),
87
+ /* @__PURE__ */ e(s, { heightX: 2 })
88
+ ] })
89
+ ] }),
90
+ /* @__PURE__ */ e(
91
+ x,
92
+ {
93
+ size: "small",
94
+ renderAs: "secondary-dark",
95
+ type: "submit",
96
+ label: i ? "Log In" : "Get Verification Code",
97
+ width: "100%",
98
+ busy: !i && n,
99
+ disabled: h
76
100
  }
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 })
101
+ )
81
102
  ] })
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);
103
+ }
104
+ );
105
+ }, R = F(v);
97
106
  export {
98
- P as default
107
+ R as default
99
108
  };
100
109
  //# 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 $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;AAAA,UACN,OAAOV;AAAA,UACP,UAAUY;AAAA,UACV,OAAO;AAAA,UACP,UAAQ;AAAA,UACR,OAAM;AAAA,UACN,cAAcV,EAAO;AAAA,UACrB,UAAUI;AAAA,UACV,kCACGe,GAAgB,EAAA,SAASf,GAAc,SAAS,CAAC,CAACJ,EAAO,YAAY;AAAA,QAAA;AAAA,MAE1E;AAAA,MACCI,KAEG,gBAAAY,EAAAI,GAAA,EAAA,UAAA;AAAA,QAAC,gBAAAN,EAAAO,GAAA,EAAU,QAAQ,GAAI,CAAA;AAAA,QACvB,gBAAAP;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,UAAUlB,EAAO,MAAM,eAAeS;AAAA,YACtC,cAAa;AAAA,YACb,OAAM;AAAA,YACN,OAAOV;AAAA,YACP,UAAUc;AAAA,YACV,OAAO;AAAA,YACP,UAAQ;AAAA,YACR,WAAS;AAAA,YACT,OAAM;AAAA,YACN,cAAcb,EAAO;AAAA,YACrB,UAAUC,KAAkBF,EAAI,WAAW,KAAKG;AAAA,YAChD,gBACE,gBAAAY;AAAA,cAACK;AAAA,cAAA;AAAA,gBACC,WAAAjB;AAAA,gBACA,SAASD;AAAA,gBACT,SAAS,CAAC,CAACD,EAAO;AAAA,cAAA;AAAA,YACpB;AAAA,UAAA;AAAA,QAEJ;AAAA,QACA,gBAAAc,EAACO,GAAU,EAAA,SAAS,KAAM,CAAA;AAAA,QACzB,gBAAAP,EAAAC,GAAA,EAAS,aAAY,YAAW,QAAO,QACtC,UAAC,gBAAAD,EAAAQ,GAAA,EAAU,aAAaf,GAAW,UAAUN,EAAe,CAAA,GAC9D;AAAA,QACA,gBAAAa,EAACO,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,MAAA,GACzB;AAAA,IAAA,GAEJ;AAAA,IACA,gBAAAP;AAAA,MAACS;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,UAAS;AAAA,QACT,MAAK;AAAA,QACL,OAAOnB,IAAe,WAAW;AAAA,QACjC,OAAO;AAAA,QACP,MAAM,CAACA,KAAgBF;AAAA,QACvB,UAAUC;AAAA,MAAA;AAAA,IACZ;AAAA,EAAA,EACF,CAAA,EACF,CAAA;AAEJ,GAEeqB,IAAAC,EAAK5B,CAAiB;"}
1
+ {"version":3,"file":"identifier-otp-form.js","sources":["../../../../../src/features/auth/login/identifier-otp-form/identifier-otp-form.tsx"],"sourcesContent":["import 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 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 <Styled.Container\n $gutterX={1.5}\n $gapX={1.5}\n $background=\"BLACK_2\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <Styled.FormWrapper onSubmit={onSubmit}>\n <FlexView $alignItems=\"center\" $justifyContent=\"center\">\n <TextInput\n renderAs={errors.identifier ? 'error-dark' : 'primary-dark'}\n autoFocus\n label=\"Email or Phone\"\n value={identifier}\n onChange={handleIdentifierChange}\n required\n width=\"100%\"\n shape=\"borderLess\"\n errorMessage={errors.identifier}\n disabled={showOtpInput}\n siblingElement={<InputStatusIcon isError={!!errors.identifier} />}\n />\n {showOtpInput && (\n <>\n <Separator height={36} />\n <TextInput\n type=\"password\"\n renderAs={errors.otp ? 'error-dark' : otpStatusVariant}\n label=\"Verification code\"\n value={otp}\n onChange={handleOtpChange}\n width=\"100%\"\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=\"100%\"\n busy={!showOtpInput && isLoading}\n disabled={isSubmitDisabled}\n />\n </Styled.FormWrapper>\n </Styled.Container>\n );\n};\n\nexport default memo(IdentifierOtpForm);\n"],"names":["IdentifierOtpForm","identifier","otp","errors","isOtpVerified","isLoading","isSubmitDisabled","showOtpInput","onChange","onSubmit","onSendOtp","otpStatusVariant","handleIdentifierChange","useCallback","e","handleOtpChange","jsx","Styled.Container","jsxs","Styled.FormWrapper","FlexView","TextInput","InputStatusIcon","Fragment","Separator","ResendOTP","Button","identifierOtpForm","memo"],"mappings":";;;;;;;;;AAYA,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,IAAmBP,IAAgB,iBAAiB,gBAEpDQ,IAAyBC;AAAA,IAC7B,CAACC,MAAqC;AAC3B,MAAAN,EAAA,cAAcM,EAAE,OAAO,KAAK;AAAA,IACvC;AAAA,IACA,CAACN,CAAQ;AAAA,EAAA,GAGLO,IAAkBF;AAAA,IACtB,CAACC,MAAqC;AAC3B,MAAAN,EAAA,OAAOM,EAAE,OAAO,KAAK;AAAA,IAChC;AAAA,IACA,CAACN,CAAQ;AAAA,EAAA;AAIT,SAAA,gBAAAQ;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAY;AAAA,MACZ,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAEhB,UAAC,gBAAAC,EAAAC,GAAA,EAAmB,UAAAV,GAClB,UAAA;AAAA,QAAA,gBAAAS,EAACE,GAAS,EAAA,aAAY,UAAS,iBAAgB,UAC7C,UAAA;AAAA,UAAA,gBAAAJ;AAAA,YAACK;AAAA,YAAA;AAAA,cACC,UAAUlB,EAAO,aAAa,eAAe;AAAA,cAC7C,WAAS;AAAA,cACT,OAAM;AAAA,cACN,OAAOF;AAAA,cACP,UAAUW;AAAA,cACV,UAAQ;AAAA,cACR,OAAM;AAAA,cACN,OAAM;AAAA,cACN,cAAcT,EAAO;AAAA,cACrB,UAAUI;AAAA,cACV,gBAAiB,gBAAAS,EAAAM,GAAA,EAAgB,SAAS,CAAC,CAACnB,EAAO,YAAY;AAAA,YAAA;AAAA,UACjE;AAAA,UACCI,KAEG,gBAAAW,EAAAK,GAAA,EAAA,UAAA;AAAA,YAAC,gBAAAP,EAAAQ,GAAA,EAAU,QAAQ,GAAI,CAAA;AAAA,YACvB,gBAAAR;AAAA,cAACK;AAAA,cAAA;AAAA,gBACC,MAAK;AAAA,gBACL,UAAUlB,EAAO,MAAM,eAAeQ;AAAA,gBACtC,OAAM;AAAA,gBACN,OAAOT;AAAA,gBACP,UAAUa;AAAA,gBACV,OAAM;AAAA,gBACN,UAAQ;AAAA,gBACR,WAAS;AAAA,gBACT,OAAM;AAAA,gBACN,cAAcZ,EAAO;AAAA,gBACrB,UAAUC,KAAkBF,EAAI,WAAW,KAAKG;AAAA,gBAChD,gBACE,gBAAAW;AAAA,kBAACM;AAAA,kBAAA;AAAA,oBACC,WAAAjB;AAAA,oBACA,SAASD;AAAA,oBACT,SAAS,CAAC,CAACD,EAAO;AAAA,kBAAA;AAAA,gBACpB;AAAA,cAAA;AAAA,YAEJ;AAAA,YACA,gBAAAa,EAACQ,GAAU,EAAA,SAAS,KAAM,CAAA;AAAA,YACzB,gBAAAR,EAAAI,GAAA,EAAS,aAAY,YAAW,QAAO,QACtC,UAAC,gBAAAJ,EAAAS,GAAA,EAAU,aAAaf,GAAW,UAAUN,EAAe,CAAA,GAC9D;AAAA,YACA,gBAAAY,EAACQ,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,UAAA,GACzB;AAAA,QAAA,GAEJ;AAAA,QACA,gBAAAR;AAAA,UAACU;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,UAAS;AAAA,YACT,MAAK;AAAA,YACL,OAAOnB,IAAe,WAAW;AAAA,YACjC,OAAM;AAAA,YACN,MAAM,CAACA,KAAgBF;AAAA,YACvB,UAAUC;AAAA,UAAA;AAAA,QACZ;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN,GAEeqB,IAAAC,EAAK5B,CAAiB;"}
@@ -0,0 +1,26 @@
1
+ import t from "styled-components";
2
+ import i from "../../ui/buttons/button/button.js";
3
+ import m from "../../ui/layout/flex-view.js";
4
+ import { media as o } from "../../utils/media.js";
5
+ const x = t.form`
6
+ max-width: 336px;
7
+ width: 100%;
8
+ margin-top: 0;
9
+ ${o.minDesktop} {
10
+ margin-top: 8px;
11
+ }
12
+ `;
13
+ t(i)`
14
+ max-width: 160px;
15
+ `;
16
+ const a = t(m)`
17
+ min-height: 300px;
18
+ ${o.minDesktop} {
19
+ height: 308px;
20
+ }
21
+ `;
22
+ export {
23
+ a as Container,
24
+ x as FormContainer
25
+ };
26
+ //# sourceMappingURL=login-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login-styled.js","sources":["../../../../src/features/auth/login/login-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport Button from '../../ui/buttons/button/button';\nimport FlexView from '../../ui/layout/flex-view';\nimport { media } from '../../utils/media';\n\nexport const FormContainer = styled.form`\n max-width: 336px;\n width: 100%;\n margin-top: 0;\n ${media.minDesktop} {\n margin-top: 8px;\n }\n`;\n\nconst ButtonWrapper = styled(Button)`\n max-width: 160px;\n`;\n\nconst Container = styled(FlexView)`\n min-height: 300px;\n ${media.minDesktop} {\n height: 308px;\n }\n`;\n\nexport { ButtonWrapper, Container };\n"],"names":["FormContainer","styled","media","Button","Container","FlexView"],"mappings":";;;;AAMO,MAAMA,IAAgBC,EAAO;AAAA;AAAA;AAAA;AAAA,IAIhCC,EAAM,UAAU;AAAA;AAAA;AAAA;AAKED,EAAOE,CAAM;AAAA;AAAA;AAI7B,MAAAC,IAAYH,EAAOI,CAAQ;AAAA;AAAA,IAE7BH,EAAM,UAAU;AAAA;AAAA;AAAA;"}
@@ -1,22 +1,28 @@
1
- import { jsxs as n, jsx as o } from "react/jsx-runtime";
2
- import { memo as a } from "react";
3
- import e from "../../../ui/buttons/button/button.js";
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: [
7
- /* @__PURE__ */ o(
8
- e,
9
- {
10
- size: "small",
11
- renderAs: "secondary-dark",
12
- label: "Create a new account",
13
- width: 232,
14
- onClick: r
15
- }
16
- ),
17
- /* @__PURE__ */ o(c, { heightX: 1 }),
18
- /* @__PURE__ */ o(
19
- e,
1
+ import { jsxs as o, Fragment as i, jsx as e } from "react/jsx-runtime";
2
+ import { memo as c } from "react";
3
+ import r from "../../../ui/buttons/button/button.js";
4
+ import l from "../../../ui/layout/flex-view.js";
5
+ import m from "../../../ui/separator/separator.js";
6
+ const s = ({
7
+ onRetryLogin: t,
8
+ onGoToSignup: n,
9
+ showSignupButton: a = !0
10
+ }) => /* @__PURE__ */ o(l, { $alignItems: "center", $justifyContent: "center", children: [
11
+ a && /* @__PURE__ */ o(i, { children: [
12
+ /* @__PURE__ */ e(
13
+ r,
14
+ {
15
+ size: "small",
16
+ renderAs: "secondary-dark",
17
+ label: "Create a new account",
18
+ width: 232,
19
+ onClick: n
20
+ }
21
+ ),
22
+ /* @__PURE__ */ e(m, { heightX: 1 })
23
+ ] }),
24
+ /* @__PURE__ */ e(
25
+ r,
20
26
  {
21
27
  size: "small",
22
28
  renderAs: "secondary-dark",
@@ -25,8 +31,8 @@ const s = ({ onRetryLogin: t, onGoToSignup: r }) => /* @__PURE__ */ n(i, { $alig
25
31
  onClick: t
26
32
  }
27
33
  )
28
- ] }), h = a(s);
34
+ ] }), g = c(s);
29
35
  export {
30
- h as default
36
+ g as default
31
37
  };
32
38
  //# sourceMappingURL=social-account-not-found.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"social-account-not-found.js","sources":["../../../../../src/features/auth/login/social-account-not-found/social-account-not-found.tsx"],"sourcesContent":["import type { ISocialAccountNotFoundProps } from './social-account-not-found-types';\n\nimport { memo } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\n\nconst SocialAccountNotFound = ({ onRetryLogin, onGoToSignup }: ISocialAccountNotFoundProps) => {\n return (\n <FlexView $alignItems=\"center\" $justifyContent=\"center\">\n <Button\n size=\"small\"\n renderAs=\"secondary-dark\"\n label=\"Create a new account\"\n width={232}\n onClick={onGoToSignup}\n />\n <Separator heightX={1} />\n <Button\n size=\"small\"\n renderAs=\"secondary-dark\"\n label=\"Try another Login method\"\n width={232}\n onClick={onRetryLogin}\n />\n </FlexView>\n );\n};\n\nexport default memo(SocialAccountNotFound);\n"],"names":["SocialAccountNotFound","onRetryLogin","onGoToSignup","jsxs","FlexView","jsx","Button","Separator","socialAccountNotFound","memo"],"mappings":";;;;;AAQA,MAAMA,IAAwB,CAAC,EAAE,cAAAC,GAAc,cAAAC,QAE1C,gBAAAC,EAAAC,GAAA,EAAS,aAAY,UAAS,iBAAgB,UAC7C,UAAA;AAAA,EAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,UAAS;AAAA,MACT,OAAM;AAAA,MACN,OAAO;AAAA,MACP,SAASJ;AAAA,IAAA;AAAA,EACX;AAAA,EACA,gBAAAG,EAACE,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,EACvB,gBAAAF;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,UAAS;AAAA,MACT,OAAM;AAAA,MACN,OAAO;AAAA,MACP,SAASL;AAAA,IAAA;AAAA,EACX;AACF,EAAA,CAAA,GAIWO,IAAAC,EAAKT,CAAqB;"}
1
+ {"version":3,"file":"social-account-not-found.js","sources":["../../../../../src/features/auth/login/social-account-not-found/social-account-not-found.tsx"],"sourcesContent":["import type { ISocialAccountNotFoundProps } from './social-account-not-found-types';\n\nimport { memo } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\n\nconst SocialAccountNotFound = ({\n onRetryLogin,\n onGoToSignup,\n showSignupButton = true,\n}: ISocialAccountNotFoundProps) => {\n return (\n <FlexView $alignItems=\"center\" $justifyContent=\"center\">\n {showSignupButton && (\n <>\n <Button\n size=\"small\"\n renderAs=\"secondary-dark\"\n label=\"Create a new account\"\n width={232}\n onClick={onGoToSignup}\n />\n <Separator heightX={1} />\n </>\n )}\n\n <Button\n size=\"small\"\n renderAs=\"secondary-dark\"\n label=\"Try another Login method\"\n width={232}\n onClick={onRetryLogin}\n />\n </FlexView>\n );\n};\n\nexport default memo(SocialAccountNotFound);\n"],"names":["SocialAccountNotFound","onRetryLogin","onGoToSignup","showSignupButton","jsxs","FlexView","Fragment","jsx","Button","Separator","socialAccountNotFound","memo"],"mappings":";;;;;AAQA,MAAMA,IAAwB,CAAC;AAAA,EAC7B,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,kBAAAC,IAAmB;AACrB,MAEK,gBAAAC,EAAAC,GAAA,EAAS,aAAY,UAAS,iBAAgB,UAC5C,UAAA;AAAA,EAAAF,KAEG,gBAAAC,EAAAE,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,UAAS;AAAA,QACT,OAAM;AAAA,QACN,OAAO;AAAA,QACP,SAASN;AAAA,MAAA;AAAA,IACX;AAAA,IACA,gBAAAK,EAACE,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,EAAA,GACzB;AAAA,EAGF,gBAAAF;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,UAAS;AAAA,MACT,OAAM;AAAA,MACN,OAAO;AAAA,MACP,SAASP;AAAA,IAAA;AAAA,EACX;AACF,EAAA,CAAA,GAIWS,IAAAC,EAAKX,CAAqB;"}