@cuemath/leap 2.9.5-j12 → 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.
- package/dist/features/auth/comps/input-status-icon/input-status-icon.js +13 -13
- package/dist/features/auth/comps/input-status-icon/input-status-icon.js.map +1 -1
- package/dist/features/auth/forgot-password/forgot-password-styled.js +12 -0
- package/dist/features/auth/forgot-password/forgot-password-styled.js.map +1 -0
- package/dist/features/auth/forgot-password/otp-form/otp-form.js +68 -0
- package/dist/features/auth/forgot-password/otp-form/otp-form.js.map +1 -0
- package/dist/features/auth/forgot-password/reset-password-form/reset-password-form.js +91 -0
- package/dist/features/auth/forgot-password/reset-password-form/reset-password-form.js.map +1 -0
- package/dist/features/auth/forgot-password/user-identifier-form/user-identifier-form.js +61 -0
- package/dist/features/auth/forgot-password/user-identifier-form/user-identifier-form.js.map +1 -0
- package/dist/features/auth/login/login-constants.js +12 -0
- package/dist/features/auth/login/login-constants.js.map +1 -0
- package/dist/features/auth/signup/custom-input/phone-input/phone-input.js +41 -38
- package/dist/features/auth/signup/custom-input/phone-input/phone-input.js.map +1 -1
- package/dist/features/ui/context-menu/context-menu.js +29 -21
- package/dist/features/ui/context-menu/context-menu.js.map +1 -1
- package/dist/features/ui/lottie-animation/helper.js +5 -6
- package/dist/features/ui/lottie-animation/helper.js.map +1 -1
- package/dist/index.d.ts +38 -6
- package/dist/index.js +360 -352
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
@@ -1,19 +1,19 @@
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
2
|
-
import { useTheme as
|
3
|
-
import { ReactComponent as
|
4
|
-
import
|
5
|
-
import
|
6
|
-
const
|
7
|
-
isLoading: n,
|
8
|
-
isValid:
|
9
|
-
isError:
|
2
|
+
import { useTheme as h } from "styled-components";
|
3
|
+
import { ReactComponent as u } from "../../../../assets/illustrations/loader-1.svg.js";
|
4
|
+
import a from "../../../../assets/line-icons/icons/check2.js";
|
5
|
+
import s from "../../../../assets/line-icons/icons/cross.js";
|
6
|
+
const i = ({
|
7
|
+
isLoading: n = !1,
|
8
|
+
isValid: e = !1,
|
9
|
+
isError: c = !1,
|
10
10
|
size: o = 24,
|
11
|
-
successColor:
|
12
|
-
errorColor:
|
11
|
+
successColor: f = "GREEN_4",
|
12
|
+
errorColor: m = "ORANGE_4"
|
13
13
|
}) => {
|
14
|
-
const { colors: r } =
|
15
|
-
return n ? /* @__PURE__ */ t(
|
16
|
-
}, w =
|
14
|
+
const { colors: r } = h();
|
15
|
+
return n ? /* @__PURE__ */ t(u, { width: o, height: o }) : c ? /* @__PURE__ */ t(s, { color: r[m], width: o, height: o }) : e ? /* @__PURE__ */ t(a, { color: r[f], width: o, height: o }) : null;
|
16
|
+
}, w = i;
|
17
17
|
export {
|
18
18
|
w as default
|
19
19
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"input-status-icon.js","sources":["../../../../../src/features/auth/comps/input-status-icon/input-status-icon.tsx"],"sourcesContent":["import type { IInputStatusIconProps } from './input-status-icon-types';\n\nimport { useTheme } from 'styled-components';\n\nimport { ReactComponent as LoaderSVG } from '../../../../assets/illustrations/loader-1.svg';\nimport Check2Icon from '../../../../assets/line-icons/icons/check2';\nimport CrossIcon from '../../../../assets/line-icons/icons/cross';\n\nconst InputStatusIcon: React.FC<IInputStatusIconProps> = ({\n isLoading,\n isValid,\n isError,\n size = 24,\n successColor = 'GREEN_4',\n errorColor = 'ORANGE_4',\n}) => {\n const { colors } = useTheme();\n\n if (isLoading) {\n return <LoaderSVG width={size} height={size} />;\n }\n\n if (isError) {\n return <CrossIcon color={colors[errorColor]} width={size} height={size} />;\n }\n\n if (isValid) {\n return <Check2Icon color={colors[successColor]} width={size} height={size} />;\n }\n\n return null;\n};\n\nexport default InputStatusIcon;\n"],"names":["InputStatusIcon","isLoading","isValid","isError","size","successColor","errorColor","colors","useTheme","jsx","LoaderSVG","CrossIcon","Check2Icon","InputStatusIcon$1"],"mappings":";;;;;AAQA,MAAMA,IAAmD,CAAC;AAAA,EACxD,WAAAC;AAAA,
|
1
|
+
{"version":3,"file":"input-status-icon.js","sources":["../../../../../src/features/auth/comps/input-status-icon/input-status-icon.tsx"],"sourcesContent":["import type { IInputStatusIconProps } from './input-status-icon-types';\n\nimport { useTheme } from 'styled-components';\n\nimport { ReactComponent as LoaderSVG } from '../../../../assets/illustrations/loader-1.svg';\nimport Check2Icon from '../../../../assets/line-icons/icons/check2';\nimport CrossIcon from '../../../../assets/line-icons/icons/cross';\n\nconst InputStatusIcon: React.FC<IInputStatusIconProps> = ({\n isLoading = false,\n isValid = false,\n isError = false,\n size = 24,\n successColor = 'GREEN_4',\n errorColor = 'ORANGE_4',\n}) => {\n const { colors } = useTheme();\n\n if (isLoading) {\n return <LoaderSVG width={size} height={size} />;\n }\n\n if (isError) {\n return <CrossIcon color={colors[errorColor]} width={size} height={size} />;\n }\n\n if (isValid) {\n return <Check2Icon color={colors[successColor]} width={size} height={size} />;\n }\n\n return null;\n};\n\nexport default InputStatusIcon;\n"],"names":["InputStatusIcon","isLoading","isValid","isError","size","successColor","errorColor","colors","useTheme","jsx","LoaderSVG","CrossIcon","Check2Icon","InputStatusIcon$1"],"mappings":";;;;;AAQA,MAAMA,IAAmD,CAAC;AAAA,EACxD,WAAAC,IAAY;AAAA,EACZ,SAAAC,IAAU;AAAA,EACV,SAAAC,IAAU;AAAA,EACV,MAAAC,IAAO;AAAA,EACP,cAAAC,IAAe;AAAA,EACf,YAAAC,IAAa;AACf,MAAM;AACE,QAAA,EAAE,QAAAC,MAAWC;AAEnB,SAAIP,IACM,gBAAAQ,EAAAC,GAAA,EAAU,OAAON,GAAM,QAAQA,EAAM,CAAA,IAG3CD,IACK,gBAAAM,EAACE,KAAU,OAAOJ,EAAOD,CAAU,GAAG,OAAOF,GAAM,QAAQA,EAAM,CAAA,IAGtEF,IACK,gBAAAO,EAACG,KAAW,OAAOL,EAAOF,CAAY,GAAG,OAAOD,GAAM,QAAQA,EAAM,CAAA,IAGtE;AACT,GAEAS,IAAeb;"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { styled as e } from "styled-components";
|
2
|
+
const t = e.form`
|
3
|
+
display: flex;
|
4
|
+
flex: 1;
|
5
|
+
margin-top: 8px;
|
6
|
+
flex-direction: column;
|
7
|
+
justify-content: space-between;
|
8
|
+
`;
|
9
|
+
export {
|
10
|
+
t as FormWrapper
|
11
|
+
};
|
12
|
+
//# sourceMappingURL=forgot-password-styled.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"forgot-password-styled.js","sources":["../../../../src/features/auth/forgot-password/forgot-password-styled.tsx"],"sourcesContent":["import { styled } from 'styled-components';\n\nexport const FormWrapper = styled.form`\n display: flex;\n flex: 1;\n margin-top: 8px;\n flex-direction: column;\n justify-content: space-between;\n`;\n"],"names":["FormWrapper","styled"],"mappings":";AAEO,MAAMA,IAAcC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
@@ -0,0 +1,68 @@
|
|
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
|
+
onChange: m,
|
10
|
+
value: s,
|
11
|
+
error: n,
|
12
|
+
isProcessing: d,
|
13
|
+
isValid: o = !1
|
14
|
+
}) => {
|
15
|
+
const [i, l] = a(!1), [e, f] = a(30);
|
16
|
+
return $(() => {
|
17
|
+
if (e <= 0) {
|
18
|
+
l(!0);
|
19
|
+
return;
|
20
|
+
}
|
21
|
+
const r = setTimeout(() => f(e - 1), 1e3);
|
22
|
+
return () => clearTimeout(r);
|
23
|
+
}, [e]), /* @__PURE__ */ t(
|
24
|
+
u,
|
25
|
+
{
|
26
|
+
$gutterX: 2,
|
27
|
+
$gapX: 1.5,
|
28
|
+
$alignItems: "center",
|
29
|
+
$justifyContent: "center",
|
30
|
+
$background: "BLACK_2",
|
31
|
+
$height: 308,
|
32
|
+
children: /* @__PURE__ */ p(u, { $alignItems: "center", $justifyContent: "space-between", $flex: 1, children: [
|
33
|
+
/* @__PURE__ */ t(
|
34
|
+
h,
|
35
|
+
{
|
36
|
+
renderAs: n ? "error" : o ? "success" : "primary",
|
37
|
+
autoFocus: !0,
|
38
|
+
label: "Verification code",
|
39
|
+
value: s,
|
40
|
+
onChange: (r) => m("username", r.target.value),
|
41
|
+
width: 330,
|
42
|
+
required: !0,
|
43
|
+
shape: "borderLess",
|
44
|
+
colorTheme: "dark",
|
45
|
+
errorMessage: s,
|
46
|
+
siblingElement: /* @__PURE__ */ t(b, { isError: !!n, isValid: o, isLoading: d })
|
47
|
+
}
|
48
|
+
),
|
49
|
+
/* @__PURE__ */ t(
|
50
|
+
g,
|
51
|
+
{
|
52
|
+
size: "small",
|
53
|
+
renderAs: "secondary",
|
54
|
+
type: "submit",
|
55
|
+
label: i ? "Resend" : `Resend in 0:${e < 10 ? "0" : ""}${e}`,
|
56
|
+
width: 336,
|
57
|
+
onClick: c,
|
58
|
+
disabled: !i
|
59
|
+
}
|
60
|
+
)
|
61
|
+
] })
|
62
|
+
}
|
63
|
+
);
|
64
|
+
}, R = C;
|
65
|
+
export {
|
66
|
+
R as default
|
67
|
+
};
|
68
|
+
//# sourceMappingURL=otp-form.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"otp-form.js","sources":["../../../../../src/features/auth/forgot-password/otp-form/otp-form.tsx"],"sourcesContent":["import type { ISingleFieldFormProps } from '../forgot-password-types';\n\nimport { 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;"}
|
@@ -0,0 +1,91 @@
|
|
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
|
+
onChange: a,
|
11
|
+
formData: s,
|
12
|
+
errors: e,
|
13
|
+
isSubmitDisabled: l,
|
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
|
+
] }),
|
72
|
+
/* @__PURE__ */ r(
|
73
|
+
c,
|
74
|
+
{
|
75
|
+
size: "small",
|
76
|
+
renderAs: "secondary",
|
77
|
+
type: "submit",
|
78
|
+
label: "Continue",
|
79
|
+
width: 336,
|
80
|
+
busy: w,
|
81
|
+
disabled: l
|
82
|
+
}
|
83
|
+
)
|
84
|
+
] })
|
85
|
+
}
|
86
|
+
);
|
87
|
+
}, v = h;
|
88
|
+
export {
|
89
|
+
v as default
|
90
|
+
};
|
91
|
+
//# sourceMappingURL=reset-password-form.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"reset-password-form.js","sources":["../../../../../src/features/auth/forgot-password/reset-password-form/reset-password-form.tsx"],"sourcesContent":["import type { IResetPasswordFormProps } from './reset-password-form-types';\n\nimport { type ChangeEvent } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport TextInput from '../../../ui/inputs/text-input/text-input';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport InputStatusIcon from '../../comps/input-status-icon/input-status-icon';\nimport * as Styled from '../forgot-password-styled';\n\nconst ResetPasswordForm = ({\n onSubmit,\n onChange,\n formData,\n errors,\n isSubmitDisabled,\n isProcessing,\n isValid = false,\n}: IResetPasswordFormProps) => {\n const isConfirmPasswordValid = isValid && formData.password === formData.confirmPassword;\n\n return (\n <FlexView\n $gutterX={2}\n $gapX={1.5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"BLACK_2\"\n $height={308}\n >\n <Styled.FormWrapper onSubmit={onSubmit}>\n <FlexView>\n <TextInput\n type={'password'}\n renderAs={errors.password ? 'error' : '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;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"login-constants.js","sources":["../../../../src/features/auth/login/login-constants.ts"],"sourcesContent":["import type { ITabConfig } from '../comps/tabs/tabs-types';\nimport type { TAuthTabKeys } from './login-types';\n\nexport const AUTH_TABS: ITabConfig<TAuthTabKeys> = {\n username: {\n label: 'Username',\n },\n identifier: {\n label: 'Email/Phone',\n },\n};\n"],"names":["AUTH_TABS"],"mappings":"AAGO,MAAMA,IAAsC;AAAA,EACjD,UAAU;AAAA,IACR,OAAO;AAAA,EACT;AAAA,EACA,YAAY;AAAA,IACV,OAAO;AAAA,EACT;AACF;"}
|
@@ -1,64 +1,67 @@
|
|
1
|
-
import { jsx as e, jsxs as
|
2
|
-
import { useCallback as
|
3
|
-
import { useTheme as
|
4
|
-
import { InputWrapper as
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import { COUNTRY_CODE_MAP as
|
9
|
-
import { CustomInput as
|
10
|
-
import
|
11
|
-
import
|
12
|
-
const
|
13
|
-
error:
|
14
|
-
value:
|
15
|
-
onChange:
|
16
|
-
selectedCountry:
|
17
|
-
onCountryChange:
|
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
|
21
|
-
const
|
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
|
-
|
28
|
-
|
29
|
-
|
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(
|
34
|
+
targetElement: /* @__PURE__ */ e(D, { value: r.code, menuVisible: f }),
|
33
35
|
menuElement: /* @__PURE__ */ e(
|
34
|
-
|
36
|
+
V,
|
35
37
|
{
|
36
|
-
options:
|
37
|
-
onChange:
|
38
|
-
selectedCountry:
|
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(
|
46
|
-
/* @__PURE__ */ e(
|
47
|
-
|
48
|
+
/* @__PURE__ */ e(w, { width: 8 }),
|
49
|
+
/* @__PURE__ */ e(n, { $width: 224, children: /* @__PURE__ */ e(
|
50
|
+
M,
|
48
51
|
{
|
49
|
-
value:
|
50
|
-
onChange: (t) =>
|
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: (
|
56
|
-
onKeyDown:
|
58
|
+
color: (m = s.colors) == null ? void 0 : m[i ? "RED" : "WHITE"],
|
59
|
+
onKeyDown: c
|
57
60
|
}
|
58
61
|
) })
|
59
62
|
] }) });
|
60
|
-
},
|
63
|
+
}, _ = T;
|
61
64
|
export {
|
62
|
-
|
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}
|
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
|
2
|
-
import { memo as
|
3
|
-
import
|
4
|
-
import { TargetElementWrapper as
|
5
|
-
const
|
6
|
-
({
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
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:
|
16
|
-
$visible:
|
17
|
-
$startLeft:
|
18
|
-
$menuZIndex:
|
19
|
-
$placeTop:
|
20
|
-
children: /* @__PURE__ */
|
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
|
-
),
|
33
|
+
), v = j;
|
26
34
|
export {
|
27
|
-
|
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 {
|
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
|
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(
|
6
|
-
} catch (
|
7
|
-
console.log("Error while fetching the lottie: ",
|
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
|
-
|
11
|
+
c as fetchLottie
|
13
12
|
};
|
14
13
|
//# sourceMappingURL=helper.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helper.js","sources":["../../../../src/features/ui/lottie-animation/helper.ts"],"sourcesContent":["import type { AnimationItem } from 'lottie-web';\n\
|
1
|
+
{"version":3,"file":"helper.js","sources":["../../../../src/features/ui/lottie-animation/helper.ts"],"sourcesContent":["import type { AnimationItem } from 'lottie-web';\n\nexport const fetchLottie = async (lottieSrc: string): Promise<AnimationItem | null> => {\n let lottieJson: AnimationItem | null = null;\n\n try {\n lottieJson = await fetch(lottieSrc)\n .then(res => res.json())\n .catch(() => null);\n } catch (error) {\n /* eslint-disable no-console */\n console.log('Error while fetching the lottie: ', error);\n }\n\n return lottieJson;\n};\n"],"names":["fetchLottie","lottieSrc","lottieJson","res","error"],"mappings":"AAEa,MAAAA,IAAc,OAAOC,MAAqD;AACrF,MAAIC,IAAmC;AAEnC,MAAA;AACF,IAAAA,IAAa,MAAM,MAAMD,CAAS,EAC/B,KAAK,CAAAE,MAAOA,EAAI,KAAA,CAAM,EACtB,MAAM,MAAM,IAAI;AAAA,WACZC,GAAO;AAEN,YAAA,IAAI,qCAAqCA,CAAK;AAAA,EACxD;AAEO,SAAAF;AACT;"}
|