@cuemath/leap 2.9.5-j13 → 2.9.5-j14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,30 +1,27 @@
1
- import { jsx as t, jsxs as g } from "react/jsx-runtime";
2
- import { useState as a, useEffect as h } from "react";
3
- import b from "../../../ui/buttons/button/button.js";
4
- import C from "../../../ui/inputs/text-input/text-input.js";
5
- import i from "../../../ui/layout/flex-view.js";
6
- import x from "../../comps/input-status-icon/input-status-icon.js";
7
- const I = ({
8
- onSubmit: u,
1
+ import { jsx as t, jsxs as p } from "react/jsx-runtime";
2
+ import { useState as a, useEffect as $ } from "react";
3
+ import g from "../../../ui/buttons/button/button.js";
4
+ import h from "../../../ui/inputs/text-input/text-input.js";
5
+ import u from "../../../ui/layout/flex-view.js";
6
+ import b from "../../comps/input-status-icon/input-status-icon.js";
7
+ const C = ({
8
+ onSubmit: c,
9
9
  onChange: m,
10
- formData: c,
11
- errors: r,
12
- isSubmitDisabled: l,
10
+ value: s,
11
+ error: n,
13
12
  isProcessing: d,
14
- isValid: s = !1
13
+ isValid: o = !1
15
14
  }) => {
16
- const [o, f] = a(!1), [e, p] = a(30);
17
- h(() => {
15
+ const [i, l] = a(!1), [e, f] = a(30);
16
+ return $(() => {
18
17
  if (e <= 0) {
19
- f(!0);
18
+ l(!0);
20
19
  return;
21
20
  }
22
- const n = setTimeout(() => p(e - 1), 1e3);
23
- return () => clearTimeout(n);
24
- }, [e]);
25
- const $ = s ? "success" : "primary";
26
- return /* @__PURE__ */ t(
27
- i,
21
+ const r = setTimeout(() => f(e - 1), 1e3);
22
+ return () => clearTimeout(r);
23
+ }, [e]), /* @__PURE__ */ t(
24
+ u,
28
25
  {
29
26
  $gutterX: 2,
30
27
  $gapX: 1.5,
@@ -32,40 +29,40 @@ const I = ({
32
29
  $justifyContent: "center",
33
30
  $background: "BLACK_2",
34
31
  $height: 308,
35
- children: /* @__PURE__ */ g(i, { $alignItems: "center", $justifyContent: "space-between", $flex: 1, children: [
32
+ children: /* @__PURE__ */ p(u, { $alignItems: "center", $justifyContent: "space-between", $flex: 1, children: [
36
33
  /* @__PURE__ */ t(
37
- C,
34
+ h,
38
35
  {
39
- renderAs: r.otp ? "error" : $,
36
+ renderAs: n ? "error" : o ? "success" : "primary",
40
37
  autoFocus: !0,
41
38
  label: "Verification code",
42
- value: c.username,
43
- onChange: (n) => m("username", n.target.value),
39
+ value: s,
40
+ onChange: (r) => m("username", r.target.value),
44
41
  width: 330,
45
42
  required: !0,
46
43
  shape: "borderLess",
47
44
  colorTheme: "dark",
48
- errorMessage: r.username,
49
- siblingElement: /* @__PURE__ */ t(x, { isError: !!r.otp, isValid: s, isLoading: d })
45
+ errorMessage: s,
46
+ siblingElement: /* @__PURE__ */ t(b, { isError: !!n, isValid: o, isLoading: d })
50
47
  }
51
48
  ),
52
49
  /* @__PURE__ */ t(
53
- b,
50
+ g,
54
51
  {
55
52
  size: "small",
56
53
  renderAs: "secondary",
57
54
  type: "submit",
58
- label: o ? "Resend" : `Resend in 0:${e < 10 ? "0" : ""}${e}`,
55
+ label: i ? "Resend" : `Resend in 0:${e < 10 ? "0" : ""}${e}`,
59
56
  width: 336,
60
- onClick: u,
61
- disabled: l || !o
57
+ onClick: c,
58
+ disabled: !i
62
59
  }
63
60
  )
64
61
  ] })
65
62
  }
66
63
  );
67
- }, k = I;
64
+ }, R = C;
68
65
  export {
69
- k as default
66
+ R as default
70
67
  };
71
68
  //# 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 { IFormProps } from '../forgot-password-types';\n\nimport { useEffect, useState, 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';\n\nconst OTPForm = ({\n onSubmit,\n onChange,\n formData,\n errors,\n isSubmitDisabled,\n isProcessing,\n isValid = false,\n}: IFormProps) => {\n const [canResend, setCanResend] = useState(false);\n const [count, setCount] = useState(30);\n\n useEffect(() => {\n if (count <= 0) {\n setCanResend(true);\n\n return;\n }\n\n const timeoutId = setTimeout(() => setCount(count - 1), 1000);\n\n return () => clearTimeout(timeoutId);\n }, [count]);\n\n const statusVariant = isValid ? 'success' : 'primary';\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={errors.otp ? 'error' : statusVariant}\n autoFocus\n label=\"Verification code\"\n value={formData.username}\n onChange={(e: ChangeEvent<HTMLInputElement>) => onChange('username', e.target.value)}\n width={330}\n required\n shape=\"borderLess\"\n colorTheme=\"dark\"\n errorMessage={errors.username}\n siblingElement={\n <InputStatusIcon isError={!!errors.otp} isValid={isValid} isLoading={isProcessing} />\n }\n />\n <Button\n size=\"small\"\n renderAs=\"secondary\"\n type=\"submit\"\n label={canResend ? 'Resend' : `Resend in 0:${count < 10 ? '0' : ''}${count}`}\n width={336}\n onClick={onSubmit}\n disabled={isSubmitDisabled || !canResend}\n />\n </FlexView>\n </FlexView>\n );\n};\n\nexport default OTPForm;\n"],"names":["OTPForm","onSubmit","onChange","formData","errors","isSubmitDisabled","isProcessing","isValid","canResend","setCanResend","useState","count","setCount","useEffect","timeoutId","statusVariant","jsx","FlexView","TextInput","e","InputStatusIcon","Button","OTPForm$1"],"mappings":";;;;;;AASA,MAAMA,IAAU,CAAC;AAAA,EACf,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,SAAAC,IAAU;AACZ,MAAkB;AAChB,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAS,EAAK,GAC1C,CAACC,GAAOC,CAAQ,IAAIF,EAAS,EAAE;AAErC,EAAAG,EAAU,MAAM;AACd,QAAIF,KAAS,GAAG;AACd,MAAAF,EAAa,EAAI;AAEjB;AAAA,IACF;AAEA,UAAMK,IAAY,WAAW,MAAMF,EAASD,IAAQ,CAAC,GAAG,GAAI;AAErD,WAAA,MAAM,aAAaG,CAAS;AAAA,EAAA,GAClC,CAACH,CAAK,CAAC;AAEJ,QAAAI,IAAgBR,IAAU,YAAY;AAG1C,SAAA,gBAAAS;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,UAAUd,EAAO,MAAM,UAAUW;AAAA,YACjC,WAAS;AAAA,YACT,OAAM;AAAA,YACN,OAAOZ,EAAS;AAAA,YAChB,UAAU,CAACgB,MAAqCjB,EAAS,YAAYiB,EAAE,OAAO,KAAK;AAAA,YACnF,OAAO;AAAA,YACP,UAAQ;AAAA,YACR,OAAM;AAAA,YACN,YAAW;AAAA,YACX,cAAcf,EAAO;AAAA,YACrB,gBACG,gBAAAY,EAAAI,GAAA,EAAgB,SAAS,CAAC,CAAChB,EAAO,KAAK,SAAAG,GAAkB,WAAWD,EAAc,CAAA;AAAA,UAAA;AAAA,QAEvF;AAAA,QACA,gBAAAU;AAAA,UAACK;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,UAAS;AAAA,YACT,MAAK;AAAA,YACL,OAAOb,IAAY,WAAW,eAAeG,IAAQ,KAAK,MAAM,EAAE,GAAGA,CAAK;AAAA,YAC1E,OAAO;AAAA,YACP,SAASV;AAAA,YACT,UAAUI,KAAoB,CAACG;AAAA,UAAA;AAAA,QACjC;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN,GAEAc,IAAetB;"}
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 { useEffect, useState, 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';\n\nconst OTPForm = ({\n onSubmit,\n onChange,\n value,\n error,\n isProcessing,\n isValid = false,\n}: ISingleFieldFormProps) => {\n const [canResend, setCanResend] = useState(false);\n const [count, setCount] = useState(30);\n\n useEffect(() => {\n if (count <= 0) {\n setCanResend(true);\n\n return;\n }\n\n const timeoutId = setTimeout(() => setCount(count - 1), 1000);\n\n return () => clearTimeout(timeoutId);\n }, [count]);\n\n const statusVariant = isValid ? 'success' : 'primary';\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' : statusVariant}\n autoFocus\n label=\"Verification code\"\n value={value}\n onChange={(e: ChangeEvent<HTMLInputElement>) => onChange('username', e.target.value)}\n width={330}\n required\n shape=\"borderLess\"\n colorTheme=\"dark\"\n errorMessage={value}\n siblingElement={\n <InputStatusIcon isError={!!error} isValid={isValid} isLoading={isProcessing} />\n }\n />\n <Button\n size=\"small\"\n renderAs=\"secondary\"\n type=\"submit\"\n label={canResend ? 'Resend' : `Resend in 0:${count < 10 ? '0' : ''}${count}`}\n width={336}\n onClick={onSubmit}\n disabled={!canResend}\n />\n </FlexView>\n </FlexView>\n );\n};\n\nexport default OTPForm;\n"],"names":["OTPForm","onSubmit","onChange","value","error","isProcessing","isValid","canResend","setCanResend","useState","count","setCount","useEffect","timeoutId","jsx","FlexView","TextInput","e","InputStatusIcon","Button","OTPForm$1"],"mappings":";;;;;;AASA,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,CAACC,GAAWC,CAAY,IAAIC,EAAS,EAAK,GAC1C,CAACC,GAAOC,CAAQ,IAAIF,EAAS,EAAE;AAErC,SAAAG,EAAU,MAAM;AACd,QAAIF,KAAS,GAAG;AACd,MAAAF,EAAa,EAAI;AAEjB;AAAA,IACF;AAEA,UAAMK,IAAY,WAAW,MAAMF,EAASD,IAAQ,CAAC,GAAG,GAAI;AAErD,WAAA,MAAM,aAAaG,CAAS;AAAA,EAAA,GAClC,CAACH,CAAK,CAAC,GAKR,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,4BAACA,GAAS,EAAA,aAAY,UAAS,iBAAgB,iBAAgB,OAAO,GACpE,UAAA;AAAA,QAAA,gBAAAD;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,UAAUZ,IAAQ,UAbJE,IAAU,YAAY;AAAA,YAcpC,WAAS;AAAA,YACT,OAAM;AAAA,YACN,OAAAH;AAAA,YACA,UAAU,CAACc,MAAqCf,EAAS,YAAYe,EAAE,OAAO,KAAK;AAAA,YACnF,OAAO;AAAA,YACP,UAAQ;AAAA,YACR,OAAM;AAAA,YACN,YAAW;AAAA,YACX,cAAcd;AAAA,YACd,kCACGe,GAAgB,EAAA,SAAS,CAAC,CAACd,GAAO,SAAAE,GAAkB,WAAWD,GAAc;AAAA,UAAA;AAAA,QAElF;AAAA,QACA,gBAAAS;AAAA,UAACK;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,UAAS;AAAA,YACT,MAAK;AAAA,YACL,OAAOZ,IAAY,WAAW,eAAeG,IAAQ,KAAK,MAAM,EAAE,GAAGA,CAAK;AAAA,YAC1E,OAAO;AAAA,YACP,SAAST;AAAA,YACT,UAAU,CAACM;AAAA,UAAA;AAAA,QACb;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN,GAEAa,IAAepB;"}
@@ -1,88 +1,91 @@
1
- import { jsx as r, jsxs as t } from "react/jsx-runtime";
2
- import u from "../../../ui/buttons/button/button.js";
3
- import i from "../../../ui/inputs/text-input/text-input.js";
4
- import d from "../../../ui/layout/flex-view.js";
5
- import c from "../../../ui/separator/separator.js";
6
- import n from "../../comps/input-status-icon/input-status-icon.js";
7
- import { FormWrapper as f } from "../forgot-password-styled.js";
8
- const g = ({
9
- onSubmit: p,
1
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
2
+ import c from "../../../ui/buttons/button/button.js";
3
+ import d from "../../../ui/inputs/text-input/text-input.js";
4
+ import n from "../../../ui/layout/flex-view.js";
5
+ import f from "../../../ui/separator/separator.js";
6
+ import p from "../../comps/input-status-icon/input-status-icon.js";
7
+ import { FormWrapper as g } from "../forgot-password-styled.js";
8
+ const h = ({
9
+ onSubmit: m,
10
10
  onChange: a,
11
11
  formData: s,
12
12
  errors: e,
13
13
  isSubmitDisabled: l,
14
- isProcessing: m,
15
- isValid: w = !1
16
- }) => /* @__PURE__ */ r(
17
- d,
18
- {
19
- $gutterX: 2,
20
- $gapX: 1.5,
21
- $alignItems: "center",
22
- $justifyContent: "center",
23
- $background: "BLACK_2",
24
- $height: 308,
25
- children: /* @__PURE__ */ t(f, { onSubmit: p, children: [
26
- /* @__PURE__ */ t(d, { children: [
14
+ isProcessing: w,
15
+ isValid: t = !1
16
+ }) => {
17
+ const u = t && s.password === s.confirmPassword;
18
+ return /* @__PURE__ */ r(
19
+ n,
20
+ {
21
+ $gutterX: 2,
22
+ $gapX: 1.5,
23
+ $alignItems: "center",
24
+ $justifyContent: "center",
25
+ $background: "BLACK_2",
26
+ $height: 308,
27
+ children: /* @__PURE__ */ i(g, { onSubmit: m, children: [
28
+ /* @__PURE__ */ i(n, { children: [
29
+ /* @__PURE__ */ r(
30
+ d,
31
+ {
32
+ type: "password",
33
+ renderAs: e.password ? "error" : "primary",
34
+ autoComplete: "password",
35
+ label: "New Password",
36
+ value: s.password,
37
+ onChange: (o) => a("password", o.target.value),
38
+ width: 330,
39
+ required: !0,
40
+ shape: "borderLess",
41
+ colorTheme: "dark",
42
+ errorMessage: e.password,
43
+ siblingElement: /* @__PURE__ */ r(p, { isError: !!e.password, isValid: t, isLoading: !1 })
44
+ }
45
+ ),
46
+ /* @__PURE__ */ r(f, { height: 36 }),
47
+ /* @__PURE__ */ r(
48
+ d,
49
+ {
50
+ type: "password",
51
+ renderAs: e.confirmPassword ? "error" : "primary",
52
+ autoComplete: "password",
53
+ label: "Re-enter Password",
54
+ value: s.confirmPassword,
55
+ onChange: (o) => a("confirmPassword", o.target.value),
56
+ width: 330,
57
+ required: !0,
58
+ shape: "borderLess",
59
+ colorTheme: "dark",
60
+ errorMessage: e.confirmPassword,
61
+ siblingElement: /* @__PURE__ */ r(
62
+ p,
63
+ {
64
+ isError: !!e.confirmPassword,
65
+ isValid: u,
66
+ isLoading: !1
67
+ }
68
+ )
69
+ }
70
+ )
71
+ ] }),
27
72
  /* @__PURE__ */ r(
28
- i,
73
+ c,
29
74
  {
30
- type: "password",
31
- renderAs: e.password ? "error" : "primary",
32
- autoComplete: "password",
33
- label: "New Password",
34
- value: s.password,
35
- onChange: (o) => a("password", o.target.value),
36
- width: 330,
37
- required: !0,
38
- shape: "borderLess",
39
- colorTheme: "dark",
40
- errorMessage: e.password,
41
- siblingElement: /* @__PURE__ */ r(n, { isError: !!e.password, isValid: w, isLoading: !1 })
42
- }
43
- ),
44
- /* @__PURE__ */ r(c, { height: 36 }),
45
- /* @__PURE__ */ r(
46
- i,
47
- {
48
- type: "password",
49
- renderAs: e.confirmPassword ? "error" : "primary",
50
- autoComplete: "password",
51
- label: "Re-enter Password",
52
- value: s.confirmPassword,
53
- onChange: (o) => a("confirmPassword", o.target.value),
54
- width: 330,
55
- required: !0,
56
- shape: "borderLess",
57
- colorTheme: "dark",
58
- errorMessage: e.confirmPassword,
59
- siblingElement: /* @__PURE__ */ r(
60
- n,
61
- {
62
- isError: !!e.confirmPassword,
63
- isValid: !!s.confirmPassword && s.password === s.confirmPassword,
64
- isLoading: !1
65
- }
66
- )
75
+ size: "small",
76
+ renderAs: "secondary",
77
+ type: "submit",
78
+ label: "Continue",
79
+ width: 336,
80
+ busy: w,
81
+ disabled: l
67
82
  }
68
83
  )
69
- ] }),
70
- /* @__PURE__ */ r(
71
- u,
72
- {
73
- size: "small",
74
- renderAs: "secondary",
75
- type: "submit",
76
- label: "Continue",
77
- width: 336,
78
- busy: m,
79
- disabled: l
80
- }
81
- )
82
- ] })
83
- }
84
- ), L = g;
84
+ ] })
85
+ }
86
+ );
87
+ }, v = h;
85
88
  export {
86
- L as default
89
+ v as default
87
90
  };
88
91
  //# 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 { IFormProps } from '../forgot-password-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}: IFormProps) => {\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' : 'primary'}\n autoComplete=\"password\"\n label=\"New Password\"\n value={formData.password}\n onChange={(e: ChangeEvent<HTMLInputElement>) => onChange('password', e.target.value)}\n width={330}\n required\n shape=\"borderLess\"\n colorTheme=\"dark\"\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' : 'primary'}\n autoComplete=\"password\"\n label=\"Re-enter Password\"\n value={formData.confirmPassword}\n onChange={(e: ChangeEvent<HTMLInputElement>) =>\n onChange('confirmPassword', e.target.value)\n }\n width={330}\n required\n shape=\"borderLess\"\n colorTheme=\"dark\"\n errorMessage={errors.confirmPassword}\n siblingElement={\n <InputStatusIcon\n isError={!!errors.confirmPassword}\n isValid={\n !!formData.confirmPassword && formData.password === formData.confirmPassword\n }\n isLoading={false}\n />\n }\n />\n </FlexView>\n <Button\n size=\"small\"\n renderAs=\"secondary\"\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 ResetPasswordForm;\n"],"names":["ResetPasswordForm","onSubmit","onChange","formData","errors","isSubmitDisabled","isProcessing","isValid","jsx","FlexView","jsxs","Styled.FormWrapper","TextInput","e","InputStatusIcon","Separator","Button","ResetPasswordForm$1"],"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,MAEI,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,UAAU;AAAA,IACV,OAAO;AAAA,IACP,aAAY;AAAA,IACZ,iBAAgB;AAAA,IAChB,aAAY;AAAA,IACZ,SAAS;AAAA,IAET,UAAC,gBAAAC,EAAAC,GAAA,EAAmB,UAAAV,GAClB,UAAA;AAAA,MAAA,gBAAAS,EAACD,GACC,EAAA,UAAA;AAAA,QAAA,gBAAAD;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,MAAM;AAAA,YACN,UAAUR,EAAO,WAAW,UAAU;AAAA,YACtC,cAAa;AAAA,YACb,OAAM;AAAA,YACN,OAAOD,EAAS;AAAA,YAChB,UAAU,CAACU,MAAqCX,EAAS,YAAYW,EAAE,OAAO,KAAK;AAAA,YACnF,OAAO;AAAA,YACP,UAAQ;AAAA,YACR,OAAM;AAAA,YACN,YAAW;AAAA,YACX,cAAcT,EAAO;AAAA,YACrB,gBACG,gBAAAI,EAAAM,GAAA,EAAgB,SAAS,CAAC,CAACV,EAAO,UAAU,SAAAG,GAAkB,WAAW,GAAO,CAAA;AAAA,UAAA;AAAA,QAErF;AAAA,QACA,gBAAAC,EAACO,GAAU,EAAA,QAAQ,GAAI,CAAA;AAAA,QACvB,gBAAAP;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,UAAUR,EAAO,kBAAkB,UAAU;AAAA,YAC7C,cAAa;AAAA,YACb,OAAM;AAAA,YACN,OAAOD,EAAS;AAAA,YAChB,UAAU,CAACU,MACTX,EAAS,mBAAmBW,EAAE,OAAO,KAAK;AAAA,YAE5C,OAAO;AAAA,YACP,UAAQ;AAAA,YACR,OAAM;AAAA,YACN,YAAW;AAAA,YACX,cAAcT,EAAO;AAAA,YACrB,gBACE,gBAAAI;AAAA,cAACM;AAAA,cAAA;AAAA,gBACC,SAAS,CAAC,CAACV,EAAO;AAAA,gBAClB,SACE,CAAC,CAACD,EAAS,mBAAmBA,EAAS,aAAaA,EAAS;AAAA,gBAE/D,WAAW;AAAA,cAAA;AAAA,YACb;AAAA,UAAA;AAAA,QAEJ;AAAA,MAAA,GACF;AAAA,MACA,gBAAAK;AAAA,QAACQ;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,UAAS;AAAA,UACT,MAAK;AAAA,UACL,OAAM;AAAA,UACN,OAAO;AAAA,UACP,MAAMV;AAAA,UACN,UAAUD;AAAA,QAAA;AAAA,MACZ;AAAA,IAAA,GACF;AAAA,EAAA;AAAA,GAKNY,IAAejB;"}
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' : 'primary'}\n autoComplete=\"password\"\n label=\"New Password\"\n value={formData.password}\n onChange={(e: ChangeEvent<HTMLInputElement>) => onChange('password', e.target.value)}\n width={330}\n required\n shape=\"borderLess\"\n colorTheme=\"dark\"\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' : 'primary'}\n autoComplete=\"password\"\n label=\"Re-enter Password\"\n value={formData.confirmPassword}\n onChange={(e: ChangeEvent<HTMLInputElement>) =>\n onChange('confirmPassword', e.target.value)\n }\n width={330}\n required\n shape=\"borderLess\"\n colorTheme=\"dark\"\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\"\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 ResetPasswordForm;\n"],"names":["ResetPasswordForm","onSubmit","onChange","formData","errors","isSubmitDisabled","isProcessing","isValid","isConfirmPasswordValid","jsx","FlexView","jsxs","Styled.FormWrapper","TextInput","e","InputStatusIcon","Separator","Button","ResetPasswordForm$1"],"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;AAGvE,SAAA,gBAAAM;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,UAAAX,GAClB,UAAA;AAAA,QAAA,gBAAAU,EAACD,GACC,EAAA,UAAA;AAAA,UAAA,gBAAAD;AAAA,YAACI;AAAA,YAAA;AAAA,cACC,MAAM;AAAA,cACN,UAAUT,EAAO,WAAW,UAAU;AAAA,cACtC,cAAa;AAAA,cACb,OAAM;AAAA,cACN,OAAOD,EAAS;AAAA,cAChB,UAAU,CAACW,MAAqCZ,EAAS,YAAYY,EAAE,OAAO,KAAK;AAAA,cACnF,OAAO;AAAA,cACP,UAAQ;AAAA,cACR,OAAM;AAAA,cACN,YAAW;AAAA,cACX,cAAcV,EAAO;AAAA,cACrB,gBACG,gBAAAK,EAAAM,GAAA,EAAgB,SAAS,CAAC,CAACX,EAAO,UAAU,SAAAG,GAAkB,WAAW,GAAO,CAAA;AAAA,YAAA;AAAA,UAErF;AAAA,UACA,gBAAAE,EAACO,GAAU,EAAA,QAAQ,GAAI,CAAA;AAAA,UACvB,gBAAAP;AAAA,YAACI;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,UAAUT,EAAO,kBAAkB,UAAU;AAAA,cAC7C,cAAa;AAAA,cACb,OAAM;AAAA,cACN,OAAOD,EAAS;AAAA,cAChB,UAAU,CAACW,MACTZ,EAAS,mBAAmBY,EAAE,OAAO,KAAK;AAAA,cAE5C,OAAO;AAAA,cACP,UAAQ;AAAA,cACR,OAAM;AAAA,cACN,YAAW;AAAA,cACX,cAAcV,EAAO;AAAA,cACrB,gBACE,gBAAAK;AAAA,gBAACM;AAAA,gBAAA;AAAA,kBACC,SAAS,CAAC,CAACX,EAAO;AAAA,kBAClB,SAASI;AAAA,kBACT,WAAW;AAAA,gBAAA;AAAA,cACb;AAAA,YAAA;AAAA,UAEJ;AAAA,QAAA,GACF;AAAA,QACA,gBAAAC;AAAA,UAACQ;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,UAAS;AAAA,YACT,MAAK;AAAA,YACL,OAAM;AAAA,YACN,OAAO;AAAA,YACP,MAAMX;AAAA,YACN,UAAUD;AAAA,UAAA;AAAA,QACZ;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN,GAEAa,IAAelB;"}
@@ -0,0 +1,61 @@
1
+ import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
+ import p from "../../../ui/buttons/button/button.js";
3
+ import c from "../../../ui/inputs/text-input/text-input.js";
4
+ import f from "../../../ui/layout/flex-view.js";
5
+ import g from "../../comps/input-status-icon/input-status-icon.js";
6
+ import { FormWrapper as h } from "../forgot-password-styled.js";
7
+ const b = ({
8
+ onSubmit: o,
9
+ onChange: i,
10
+ value: s,
11
+ error: r,
12
+ isSubmitDisabled: n,
13
+ isProcessing: a,
14
+ isValid: m = !1,
15
+ label: d,
16
+ field: t
17
+ }) => /* @__PURE__ */ e(
18
+ f,
19
+ {
20
+ $gutterX: 2,
21
+ $gapX: 1.5,
22
+ $alignItems: "center",
23
+ $justifyContent: "center",
24
+ $background: "BLACK_2",
25
+ $height: 308,
26
+ children: /* @__PURE__ */ l(h, { onSubmit: o, children: [
27
+ /* @__PURE__ */ e(
28
+ c,
29
+ {
30
+ renderAs: r ? "error" : "primary",
31
+ autoFocus: !0,
32
+ label: d,
33
+ value: s,
34
+ onChange: (u) => t && i(t, u.target.value),
35
+ width: 330,
36
+ required: !0,
37
+ shape: "borderLess",
38
+ colorTheme: "dark",
39
+ errorMessage: r,
40
+ siblingElement: /* @__PURE__ */ e(g, { isError: !!r, isValid: m, isLoading: !1 })
41
+ }
42
+ ),
43
+ /* @__PURE__ */ e(
44
+ p,
45
+ {
46
+ size: "small",
47
+ renderAs: "secondary",
48
+ type: "submit",
49
+ label: "Get Verification Code",
50
+ width: 336,
51
+ busy: a,
52
+ disabled: n
53
+ }
54
+ )
55
+ ] })
56
+ }
57
+ ), j = b;
58
+ export {
59
+ j as default
60
+ };
61
+ //# sourceMappingURL=user-identifier-form.js.map
@@ -0,0 +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 { 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 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' : 'primary'}\n autoFocus\n label={label}\n value={value}\n onChange={(e: ChangeEvent<HTMLInputElement>) => field && onChange(field, e.target.value)}\n width={330}\n required\n shape=\"borderLess\"\n colorTheme=\"dark\"\n errorMessage={error}\n siblingElement={<InputStatusIcon isError={!!error} isValid={isValid} isLoading={false} />}\n />\n <Button\n size=\"small\"\n renderAs=\"secondary\"\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 UserIdentifierForm;\n"],"names":["UserIdentifierForm","onSubmit","onChange","value","error","isSubmitDisabled","isProcessing","isValid","label","field","jsx","FlexView","jsxs","Styled.FormWrapper","TextInput","e","InputStatusIcon","Button","UserIdentifierForm$1"],"mappings":";;;;;;AASA,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,MAEI,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,UAAU;AAAA,IACV,OAAO;AAAA,IACP,aAAY;AAAA,IACZ,iBAAgB;AAAA,IAChB,aAAY;AAAA,IACZ,SAAS;AAAA,IAET,UAAC,gBAAAC,EAAAC,GAAA,EAAmB,UAAAZ,GAClB,UAAA;AAAA,MAAA,gBAAAS;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,UAAUV,IAAQ,UAAU;AAAA,UAC5B,WAAS;AAAA,UACT,OAAAI;AAAA,UACA,OAAAL;AAAA,UACA,UAAU,CAACY,MAAqCN,KAASP,EAASO,GAAOM,EAAE,OAAO,KAAK;AAAA,UACvF,OAAO;AAAA,UACP,UAAQ;AAAA,UACR,OAAM;AAAA,UACN,YAAW;AAAA,UACX,cAAcX;AAAA,UACd,kCAAiBY,GAAgB,EAAA,SAAS,CAAC,CAACZ,GAAO,SAAAG,GAAkB,WAAW,IAAO;AAAA,QAAA;AAAA,MACzF;AAAA,MACA,gBAAAG;AAAA,QAACO;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,UAAS;AAAA,UACT,MAAK;AAAA,UACL,OAAM;AAAA,UACN,OAAO;AAAA,UACP,MAAMX;AAAA,UACN,UAAUD;AAAA,QAAA;AAAA,MACZ;AAAA,IAAA,GACF;AAAA,EAAA;AAAA,GAKNa,IAAelB;"}
@@ -1,64 +1,67 @@
1
- import { jsx as e, jsxs as h } from "react/jsx-runtime";
2
- import { useCallback as s } from "react";
3
- import { useTheme as c } from "styled-components";
4
- import { InputWrapper as d } from "../../../../circle-games/sign-up/comp/input-wrapper/input-wrapper.js";
5
- import C from "../../../../ui/context-menu/context-menu.js";
6
- import r from "../../../../ui/layout/flex-view.js";
7
- import x from "../../../../ui/separator/separator.js";
8
- import { COUNTRY_CODE_MAP as w } from "../../signup-constants.js";
9
- import { CustomInput as I } from "../custom-input-styled.js";
10
- import g from "./country-selector/country-code-button.js";
11
- import y from "./country-selector/country-list-menu.js";
12
- const D = ({
13
- error: m,
14
- value: p,
15
- onChange: l,
16
- selectedCountry: n,
17
- onCountryChange: u,
1
+ import { jsx as e, jsxs as C } from "react/jsx-runtime";
2
+ import { useState as x, useCallback as l } from "react";
3
+ import { useTheme as y } from "styled-components";
4
+ import { InputWrapper as b } from "../../../../circle-games/sign-up/comp/input-wrapper/input-wrapper.js";
5
+ import g from "../../../../ui/context-menu/context-menu.js";
6
+ import n from "../../../../ui/layout/flex-view.js";
7
+ import w from "../../../../ui/separator/separator.js";
8
+ import { COUNTRY_CODE_MAP as I } from "../../signup-constants.js";
9
+ import { CustomInput as M } from "../custom-input-styled.js";
10
+ import D from "./country-selector/country-code-button.js";
11
+ import V from "./country-selector/country-list-menu.js";
12
+ const T = ({
13
+ error: i,
14
+ value: u,
15
+ onChange: a,
16
+ selectedCountry: r,
17
+ onCountryChange: p,
18
18
  onEnter: o
19
19
  }) => {
20
- var i;
21
- const a = c(), f = s(
20
+ var m;
21
+ const s = y(), [f, h] = x(!1), c = l(
22
22
  (t) => {
23
23
  t.key === "Enter" && (o == null || o());
24
24
  },
25
25
  [o]
26
- );
27
- return /* @__PURE__ */ e(d, { helperText: m, children: /* @__PURE__ */ h(r, { $flexDirection: "row", children: [
28
- /* @__PURE__ */ e(r, { children: /* @__PURE__ */ e(
29
- C,
26
+ ), d = l((t) => {
27
+ h(t);
28
+ }, []);
29
+ return /* @__PURE__ */ e(b, { helperText: i, children: /* @__PURE__ */ C(n, { $flexDirection: "row", children: [
30
+ /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(
31
+ g,
30
32
  {
31
33
  startLeft: !0,
32
- targetElement: /* @__PURE__ */ e(g, { value: n.code }),
34
+ targetElement: /* @__PURE__ */ e(D, { value: r.code, menuVisible: f }),
33
35
  menuElement: /* @__PURE__ */ e(
34
- y,
36
+ V,
35
37
  {
36
- options: w,
37
- onChange: u,
38
- selectedCountry: n
38
+ options: I,
39
+ onChange: p,
40
+ selectedCountry: r
39
41
  }
40
42
  ),
41
43
  menuOffset: 5,
42
- menuZIndex: 1
44
+ menuZIndex: 1,
45
+ onMenuVisibilityChange: d
43
46
  }
44
47
  ) }),
45
- /* @__PURE__ */ e(x, { width: 8 }),
46
- /* @__PURE__ */ e(r, { $width: 224, children: /* @__PURE__ */ e(
47
- I,
48
+ /* @__PURE__ */ e(w, { width: 8 }),
49
+ /* @__PURE__ */ e(n, { $width: 224, children: /* @__PURE__ */ e(
50
+ M,
48
51
  {
49
- value: p,
50
- onChange: (t) => l(t.target.value),
52
+ value: u,
53
+ onChange: (t) => a(t.target.value),
51
54
  placeholder: "00000 00000",
52
55
  type: "number",
53
56
  align: "left",
54
57
  autoCapitalize: "none",
55
- color: (i = a.colors) == null ? void 0 : i[m ? "RED" : "WHITE"],
56
- onKeyDown: f
58
+ color: (m = s.colors) == null ? void 0 : m[i ? "RED" : "WHITE"],
59
+ onKeyDown: c
57
60
  }
58
61
  ) })
59
62
  ] }) });
60
- }, R = D;
63
+ }, _ = T;
61
64
  export {
62
- R as default
65
+ _ as default
63
66
  };
64
67
  //# sourceMappingURL=phone-input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"phone-input.js","sources":["../../../../../../src/features/auth/signup/custom-input/phone-input/phone-input.tsx"],"sourcesContent":["import type { IPhoneInputProps } from './phone-input-types';\n\nimport { useCallback, type FC, type KeyboardEvent } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { InputWrapper } from '../../../../circle-games/sign-up/comp/input-wrapper/input-wrapper';\nimport ContextMenu from '../../../../ui/context-menu/context-menu';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Separator from '../../../../ui/separator/separator';\nimport { COUNTRY_CODE_MAP } from '../../signup-constants';\nimport * as Styled from '../custom-input-styled';\nimport CountryCodeButton from './country-selector/country-code-button';\nimport CountryListMenu from './country-selector/country-list-menu';\n\nconst PhoneInput: FC<IPhoneInputProps> = ({\n error,\n value,\n onChange,\n selectedCountry,\n onCountryChange,\n onEnter,\n}) => {\n const theme = useTheme();\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter') {\n onEnter?.();\n }\n },\n [onEnter],\n );\n\n return (\n <InputWrapper helperText={error}>\n <FlexView $flexDirection=\"row\">\n <FlexView>\n <ContextMenu\n startLeft\n targetElement={<CountryCodeButton value={selectedCountry.code} />}\n menuElement={\n <CountryListMenu\n options={COUNTRY_CODE_MAP}\n onChange={onCountryChange}\n selectedCountry={selectedCountry}\n />\n }\n menuOffset={5}\n menuZIndex={1}\n />\n </FlexView>\n <Separator width={8} />\n <FlexView $width={224}>\n <Styled.CustomInput\n value={value}\n onChange={event => onChange(event.target.value)}\n placeholder=\"00000 00000\"\n type=\"number\"\n align=\"left\"\n autoCapitalize=\"none\"\n color={theme.colors?.[error ? 'RED' : 'WHITE']}\n onKeyDown={handleKeyDown}\n />\n </FlexView>\n </FlexView>\n </InputWrapper>\n );\n};\n\nexport default PhoneInput;\n"],"names":["PhoneInput","error","value","onChange","selectedCountry","onCountryChange","onEnter","theme","useTheme","handleKeyDown","useCallback","event","InputWrapper","jsxs","FlexView","jsx","ContextMenu","CountryCodeButton","CountryListMenu","COUNTRY_CODE_MAP","Separator","Styled.CustomInput","_a","PhoneInput$1"],"mappings":";;;;;;;;;;;AAcA,MAAMA,IAAmC,CAAC;AAAA,EACxC,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,SAAAC;AACF,MAAM;;AACJ,QAAMC,IAAQC,KAERC,IAAgBC;AAAA,IACpB,CAACC,MAA2C;AACtC,MAAAA,EAAM,QAAQ,YACNL,KAAA,QAAAA;AAAA,IAEd;AAAA,IACA,CAACA,CAAO;AAAA,EAAA;AAGV,2BACGM,GAAa,EAAA,YAAYX,GACxB,UAAC,gBAAAY,EAAAC,GAAA,EAAS,gBAAe,OACvB,UAAA;AAAA,IAAA,gBAAAC,EAACD,GACC,EAAA,UAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,WAAS;AAAA,QACT,eAAe,gBAAAD,EAACE,GAAkB,EAAA,OAAOb,EAAgB,MAAM;AAAA,QAC/D,aACE,gBAAAW;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,SAASC;AAAA,YACT,UAAUd;AAAA,YACV,iBAAAD;AAAA,UAAA;AAAA,QACF;AAAA,QAEF,YAAY;AAAA,QACZ,YAAY;AAAA,MAAA;AAAA,IAAA,GAEhB;AAAA,IACA,gBAAAW,EAACK,GAAU,EAAA,OAAO,EAAG,CAAA;AAAA,IACrB,gBAAAL,EAACD,GAAS,EAAA,QAAQ,KAChB,UAAA,gBAAAC;AAAA,MAACM;AAAAA,MAAA;AAAA,QACC,OAAAnB;AAAA,QACA,UAAU,CAAAS,MAASR,EAASQ,EAAM,OAAO,KAAK;AAAA,QAC9C,aAAY;AAAA,QACZ,MAAK;AAAA,QACL,OAAM;AAAA,QACN,gBAAe;AAAA,QACf,QAAOW,IAAAf,EAAM,WAAN,gBAAAe,EAAerB,IAAQ,QAAQ;AAAA,QACtC,WAAWQ;AAAA,MAAA;AAAA,IAAA,GAEf;AAAA,EAAA,EACF,CAAA,EACF,CAAA;AAEJ,GAEAc,IAAevB;"}
1
+ {"version":3,"file":"phone-input.js","sources":["../../../../../../src/features/auth/signup/custom-input/phone-input/phone-input.tsx"],"sourcesContent":["import type { IPhoneInputProps } from './phone-input-types';\n\nimport { useCallback, useState, type FC, type KeyboardEvent } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { InputWrapper } from '../../../../circle-games/sign-up/comp/input-wrapper/input-wrapper';\nimport ContextMenu from '../../../../ui/context-menu/context-menu';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Separator from '../../../../ui/separator/separator';\nimport { COUNTRY_CODE_MAP } from '../../signup-constants';\nimport * as Styled from '../custom-input-styled';\nimport CountryCodeButton from './country-selector/country-code-button';\nimport CountryListMenu from './country-selector/country-list-menu';\n\nconst PhoneInput: FC<IPhoneInputProps> = ({\n error,\n value,\n onChange,\n selectedCountry,\n onCountryChange,\n onEnter,\n}) => {\n const theme = useTheme();\n const [menuVisible, setMenuVisible] = useState(false);\n\n const handleKeyDown = useCallback(\n (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter') {\n onEnter?.();\n }\n },\n [onEnter],\n );\n\n const handleMenuVisibility = useCallback((visible: boolean) => {\n setMenuVisible(visible);\n }, []);\n\n return (\n <InputWrapper helperText={error}>\n <FlexView $flexDirection=\"row\">\n <FlexView>\n <ContextMenu\n startLeft\n targetElement={\n <CountryCodeButton value={selectedCountry.code} menuVisible={menuVisible} />\n }\n menuElement={\n <CountryListMenu\n options={COUNTRY_CODE_MAP}\n onChange={onCountryChange}\n selectedCountry={selectedCountry}\n />\n }\n menuOffset={5}\n menuZIndex={1}\n onMenuVisibilityChange={handleMenuVisibility}\n />\n </FlexView>\n <Separator width={8} />\n <FlexView $width={224}>\n <Styled.CustomInput\n value={value}\n onChange={event => onChange(event.target.value)}\n placeholder=\"00000 00000\"\n type=\"number\"\n align=\"left\"\n autoCapitalize=\"none\"\n color={theme.colors?.[error ? 'RED' : 'WHITE']}\n onKeyDown={handleKeyDown}\n />\n </FlexView>\n </FlexView>\n </InputWrapper>\n );\n};\n\nexport default PhoneInput;\n"],"names":["PhoneInput","error","value","onChange","selectedCountry","onCountryChange","onEnter","theme","useTheme","menuVisible","setMenuVisible","useState","handleKeyDown","useCallback","event","handleMenuVisibility","visible","InputWrapper","jsxs","FlexView","jsx","ContextMenu","CountryCodeButton","CountryListMenu","COUNTRY_CODE_MAP","Separator","Styled.CustomInput","_a","PhoneInput$1"],"mappings":";;;;;;;;;;;AAcA,MAAMA,IAAmC,CAAC;AAAA,EACxC,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,SAAAC;AACF,MAAM;;AACJ,QAAMC,IAAQC,KACR,CAACC,GAAaC,CAAc,IAAIC,EAAS,EAAK,GAE9CC,IAAgBC;AAAA,IACpB,CAACC,MAA2C;AACtC,MAAAA,EAAM,QAAQ,YACNR,KAAA,QAAAA;AAAA,IAEd;AAAA,IACA,CAACA,CAAO;AAAA,EAAA,GAGJS,IAAuBF,EAAY,CAACG,MAAqB;AAC7D,IAAAN,EAAeM,CAAO;AAAA,EACxB,GAAG,CAAE,CAAA;AAEL,2BACGC,GAAa,EAAA,YAAYhB,GACxB,UAAC,gBAAAiB,EAAAC,GAAA,EAAS,gBAAe,OACvB,UAAA;AAAA,IAAA,gBAAAC,EAACD,GACC,EAAA,UAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,WAAS;AAAA,QACT,eACG,gBAAAD,EAAAE,GAAA,EAAkB,OAAOlB,EAAgB,MAAM,aAAAK,GAA0B;AAAA,QAE5E,aACE,gBAAAW;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,SAASC;AAAA,YACT,UAAUnB;AAAA,YACV,iBAAAD;AAAA,UAAA;AAAA,QACF;AAAA,QAEF,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,wBAAwBW;AAAA,MAAA;AAAA,IAAA,GAE5B;AAAA,IACA,gBAAAK,EAACK,GAAU,EAAA,OAAO,EAAG,CAAA;AAAA,IACrB,gBAAAL,EAACD,GAAS,EAAA,QAAQ,KAChB,UAAA,gBAAAC;AAAA,MAACM;AAAAA,MAAA;AAAA,QACC,OAAAxB;AAAA,QACA,UAAU,CAAAY,MAASX,EAASW,EAAM,OAAO,KAAK;AAAA,QAC9C,aAAY;AAAA,QACZ,MAAK;AAAA,QACL,OAAM;AAAA,QACN,gBAAe;AAAA,QACf,QAAOa,IAAApB,EAAM,WAAN,gBAAAoB,EAAe1B,IAAQ,QAAQ;AAAA,QACtC,WAAWW;AAAA,MAAA;AAAA,IAAA,GAEf;AAAA,EAAA,EACF,CAAA,EACF,CAAA;AAEJ,GAEAgB,IAAe5B;"}
@@ -1,29 +1,37 @@
1
- import { jsxs as u, jsx as r } from "react/jsx-runtime";
2
- import { memo as a, useRef as f, isValidElement as d, cloneElement as x } from "react";
3
- import $ from "../hooks/use-context-menu-click-handler.js";
4
- import { TargetElementWrapper as C, OptionsMenuWrapper as M, MenuElementWrapper as h } from "./context-menu-styled.js";
5
- const k = a(
6
- ({ targetElement: e, menuElement: i, menuOffset: l, startLeft: s, menuZIndex: m, placeTop: n }) => {
7
- const t = f(null), { menuVisible: o, onMenuClick: c } = $(t), p = d(e) ? x(e, {
8
- menuVisible: o
9
- }) : e;
10
- return /* @__PURE__ */ u(C, { ref: t, onClick: c, children: [
11
- p,
12
- /* @__PURE__ */ r(
13
- M,
1
+ import { jsxs as l, jsx as m } from "react/jsx-runtime";
2
+ import { memo as x, useRef as $, useLayoutEffect as a } from "react";
3
+ import d from "../hooks/use-context-menu-click-handler.js";
4
+ import { TargetElementWrapper as k, OptionsMenuWrapper as E, MenuElementWrapper as W } from "./context-menu-styled.js";
5
+ const j = x(
6
+ ({
7
+ targetElement: n,
8
+ menuElement: p,
9
+ menuOffset: c,
10
+ startLeft: f,
11
+ menuZIndex: s,
12
+ placeTop: t,
13
+ onMenuVisibilityChange: e
14
+ }) => {
15
+ const o = $(null), { menuVisible: r, onMenuClick: u } = d(o);
16
+ return a(() => {
17
+ e == null || e(r);
18
+ }, [r, e]), /* @__PURE__ */ l(k, { ref: o, onClick: u, children: [
19
+ n,
20
+ /* @__PURE__ */ m(
21
+ E,
14
22
  {
15
- $menuOffset: l,
16
- $visible: o,
17
- $startLeft: s,
18
- $menuZIndex: m,
19
- $placeTop: n,
20
- children: /* @__PURE__ */ r(h, { $placeTop: n, children: i })
23
+ $menuOffset: c,
24
+ $visible: r,
25
+ $startLeft: f,
26
+ $menuZIndex: s,
27
+ $placeTop: t,
28
+ children: /* @__PURE__ */ m(W, { $placeTop: t, children: p })
21
29
  }
22
30
  )
23
31
  ] });
24
32
  }
25
- ), j = k;
33
+ ), v = j;
26
34
  export {
27
- j as default
35
+ v as default
28
36
  };
29
37
  //# sourceMappingURL=context-menu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context-menu.js","sources":["../../../../src/features/ui/context-menu/context-menu.tsx"],"sourcesContent":["import type { IContextMenuProps } from './context-menu-types';\nimport type { FC } from 'react';\n\nimport { cloneElement, isValidElement, memo, useRef } from 'react';\n\nimport useContextMenuClickHandler from '../hooks/use-context-menu-click-handler';\nimport * as Styled from './context-menu-styled';\n\nconst ContextMenu: FC<IContextMenuProps> = memo(\n ({ targetElement, menuElement, menuOffset, startLeft, menuZIndex, placeTop }) => {\n const containerRef = useRef<HTMLDivElement>(null);\n\n const { menuVisible, onMenuClick } = useContextMenuClickHandler(containerRef);\n\n const enhancedTargetElement = isValidElement(targetElement)\n ? cloneElement(targetElement as React.ReactElement<{ menuVisible?: boolean }>, {\n menuVisible,\n })\n : targetElement;\n\n return (\n <Styled.TargetElementWrapper ref={containerRef} onClick={onMenuClick}>\n {enhancedTargetElement}\n\n <Styled.OptionsMenuWrapper\n $menuOffset={menuOffset}\n $visible={menuVisible}\n $startLeft={startLeft}\n $menuZIndex={menuZIndex}\n $placeTop={placeTop}\n >\n <Styled.MenuElementWrapper $placeTop={placeTop}>{menuElement}</Styled.MenuElementWrapper>\n </Styled.OptionsMenuWrapper>\n </Styled.TargetElementWrapper>\n );\n },\n);\n\nexport default ContextMenu;\n"],"names":["ContextMenu","memo","targetElement","menuElement","menuOffset","startLeft","menuZIndex","placeTop","containerRef","useRef","menuVisible","onMenuClick","useContextMenuClickHandler","enhancedTargetElement","isValidElement","cloneElement","Styled.TargetElementWrapper","jsx","Styled.OptionsMenuWrapper","Styled.MenuElementWrapper","ContextMenu$1"],"mappings":";;;;AAQA,MAAMA,IAAqCC;AAAA,EACzC,CAAC,EAAE,eAAAC,GAAe,aAAAC,GAAa,YAAAC,GAAY,WAAAC,GAAW,YAAAC,GAAY,UAAAC,QAAe;AACzE,UAAAC,IAAeC,EAAuB,IAAI,GAE1C,EAAE,aAAAC,GAAa,aAAAC,EAAY,IAAIC,EAA2BJ,CAAY,GAEtEK,IAAwBC,EAAeZ,CAAa,IACtDa,EAAab,GAAgE;AAAA,MAC3E,aAAAQ;AAAA,IACD,CAAA,IACDR;AAEJ,6BACGc,GAAA,EAA4B,KAAKR,GAAc,SAASG,GACtD,UAAA;AAAA,MAAAE;AAAA,MAED,gBAAAI;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,aAAad;AAAA,UACb,UAAUM;AAAA,UACV,YAAYL;AAAA,UACZ,aAAaC;AAAA,UACb,WAAWC;AAAA,UAEX,4BAACY,GAAA,EAA0B,WAAWZ,GAAW,UAAYJ,GAAA;AAAA,QAAA;AAAA,MAC/D;AAAA,IACF,EAAA,CAAA;AAAA,EAEJ;AACF,GAEAiB,IAAepB;"}
1
+ {"version":3,"file":"context-menu.js","sources":["../../../../src/features/ui/context-menu/context-menu.tsx"],"sourcesContent":["import type { IContextMenuProps } from './context-menu-types';\nimport type { FC } from 'react';\n\nimport { memo, useLayoutEffect, useRef } from 'react';\n\nimport useContextMenuClickHandler from '../hooks/use-context-menu-click-handler';\nimport * as Styled from './context-menu-styled';\n\nconst ContextMenu: FC<IContextMenuProps> = memo(\n ({\n targetElement,\n menuElement,\n menuOffset,\n startLeft,\n menuZIndex,\n placeTop,\n onMenuVisibilityChange,\n }) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const { menuVisible, onMenuClick } = useContextMenuClickHandler(containerRef);\n\n useLayoutEffect(() => {\n onMenuVisibilityChange?.(menuVisible);\n }, [menuVisible, onMenuVisibilityChange]);\n\n return (\n <Styled.TargetElementWrapper ref={containerRef} onClick={onMenuClick}>\n {targetElement}\n\n <Styled.OptionsMenuWrapper\n $menuOffset={menuOffset}\n $visible={menuVisible}\n $startLeft={startLeft}\n $menuZIndex={menuZIndex}\n $placeTop={placeTop}\n >\n <Styled.MenuElementWrapper $placeTop={placeTop}>{menuElement}</Styled.MenuElementWrapper>\n </Styled.OptionsMenuWrapper>\n </Styled.TargetElementWrapper>\n );\n },\n);\n\nexport default ContextMenu;\n"],"names":["ContextMenu","memo","targetElement","menuElement","menuOffset","startLeft","menuZIndex","placeTop","onMenuVisibilityChange","containerRef","useRef","menuVisible","onMenuClick","useContextMenuClickHandler","useLayoutEffect","Styled.TargetElementWrapper","jsx","Styled.OptionsMenuWrapper","Styled.MenuElementWrapper","ContextMenu$1"],"mappings":";;;;AAQA,MAAMA,IAAqCC;AAAA,EACzC,CAAC;AAAA,IACC,eAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC;AAAA,IACA,wBAAAC;AAAA,EAAA,MACI;AACE,UAAAC,IAAeC,EAAuB,IAAI,GAC1C,EAAE,aAAAC,GAAa,aAAAC,EAAY,IAAIC,EAA2BJ,CAAY;AAE5E,WAAAK,EAAgB,MAAM;AACpB,MAAAN,KAAA,QAAAA,EAAyBG;AAAA,IAAW,GACnC,CAACA,GAAaH,CAAsB,CAAC,qBAGrCO,GAAA,EAA4B,KAAKN,GAAc,SAASG,GACtD,UAAA;AAAA,MAAAV;AAAA,MAED,gBAAAc;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,aAAab;AAAA,UACb,UAAUO;AAAA,UACV,YAAYN;AAAA,UACZ,aAAaC;AAAA,UACb,WAAWC;AAAA,UAEX,4BAACW,GAAA,EAA0B,WAAWX,GAAW,UAAYJ,GAAA;AAAA,QAAA;AAAA,MAC/D;AAAA,IACF,EAAA,CAAA;AAAA,EAEJ;AACF,GAEAgB,IAAenB;"}
@@ -1,14 +1,13 @@
1
- const o = /* @__PURE__ */ new Map(), h = async (t) => {
2
- if (o.has(t)) return o.get(t);
1
+ const c = async (o) => {
3
2
  let e = null;
4
3
  try {
5
- e = await fetch(t).then((n) => n.json()).catch(() => null), e && o.set(t, e);
6
- } catch (n) {
7
- console.log("Error while fetching the lottie: ", n);
4
+ e = await fetch(o).then((t) => t.json()).catch(() => null);
5
+ } catch (t) {
6
+ console.log("Error while fetching the lottie: ", t);
8
7
  }
9
8
  return e;
10
9
  };
11
10
  export {
12
- h as fetchLottie
11
+ c as fetchLottie
13
12
  };
14
13
  //# sourceMappingURL=helper.js.map