@cuemath/leap 2.9.12-j4 → 2.9.12-j6
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/login/identifier-otp-form/identifier-otp-form.js +7 -7
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form.js.map +1 -1
- package/dist/features/auth/login/username-password-form/username-password-form.js +21 -19
- package/dist/features/auth/login/username-password-form/username-password-form.js.map +1 -1
- package/dist/features/auth/signup/custom-input-field/{phone-input/country-selector → country-selector}/country-code-button.js +4 -4
- package/dist/features/auth/signup/custom-input-field/country-selector/country-code-button.js.map +1 -0
- package/dist/features/auth/signup/custom-input-field/country-selector/country-list-menu.js +29 -0
- package/dist/features/auth/signup/custom-input-field/country-selector/country-list-menu.js.map +1 -0
- package/dist/features/auth/signup/custom-input-field/{phone-input/phone-input-styled.js → country-selector/country-selector-styled.js} +2 -2
- package/dist/features/auth/signup/custom-input-field/country-selector/country-selector-styled.js.map +1 -0
- package/dist/features/auth/signup/custom-input-field/country-selector/country-selector.js +26 -0
- package/dist/features/auth/signup/custom-input-field/country-selector/country-selector.js.map +1 -0
- package/dist/features/auth/signup/custom-input-field/custom-input-field-styled.js +2 -10
- package/dist/features/auth/signup/custom-input-field/custom-input-field-styled.js.map +1 -1
- package/dist/features/auth/signup/custom-input-field/custom-input-field.js +60 -64
- package/dist/features/auth/signup/custom-input-field/custom-input-field.js.map +1 -1
- package/dist/features/auth/signup/custom-input-field/password-toggle/password-toggle.js +9 -0
- package/dist/features/auth/signup/custom-input-field/password-toggle/password-toggle.js.map +1 -0
- package/dist/index.d.ts +4 -9
- package/dist/index.js +253 -255
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/features/auth/signup/custom-input-field/phone-input/country-selector/country-code-button.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/phone-input/country-selector/country-list-menu.js +0 -28
- package/dist/features/auth/signup/custom-input-field/phone-input/country-selector/country-list-menu.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/phone-input/phone-input-styled.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/phone-input/phone-input.js +0 -67
- package/dist/features/auth/signup/custom-input-field/phone-input/phone-input.js.map +0 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
import { jsx as e, jsxs as
|
1
|
+
import { jsx as e, jsxs as o, Fragment as k } from "react/jsx-runtime";
|
2
2
|
import y from "../../../ui/buttons/button/button.js";
|
3
3
|
import c from "../../../ui/inputs/text-input/text-input.js";
|
4
4
|
import n from "../../../ui/layout/flex-view.js";
|
@@ -19,8 +19,8 @@ const C = ({
|
|
19
19
|
onSendOtp: p
|
20
20
|
}) => {
|
21
21
|
const b = t ? "success-dark" : "primary-dark", $ = i ? "success-dark" : "primary-dark";
|
22
|
-
return /* @__PURE__ */ e(n, { $gutterX: 2, $gapX: 1.5, $background: "BLACK_2", $height: 308, children: /* @__PURE__ */
|
23
|
-
/* @__PURE__ */
|
22
|
+
return /* @__PURE__ */ e(n, { $gutterX: 2, $gapX: 1.5, $background: "BLACK_2", $height: 308, children: /* @__PURE__ */ o(F, { onSubmit: h, children: [
|
23
|
+
/* @__PURE__ */ o(n, { $alignItems: "center", $justifyContent: "center", children: [
|
24
24
|
/* @__PURE__ */ e(
|
25
25
|
c,
|
26
26
|
{
|
@@ -28,7 +28,7 @@ const C = ({
|
|
28
28
|
autoFocus: !0,
|
29
29
|
label: "Email or Phone",
|
30
30
|
value: f,
|
31
|
-
onChange: (
|
31
|
+
onChange: (d) => m("identifier", d.target.value),
|
32
32
|
width: 330,
|
33
33
|
required: !0,
|
34
34
|
shape: "borderLess",
|
@@ -37,17 +37,17 @@ const C = ({
|
|
37
37
|
siblingElement: /* @__PURE__ */ e(u, { isValid: t, isError: !!r.identifier })
|
38
38
|
}
|
39
39
|
),
|
40
|
-
t && /* @__PURE__ */
|
40
|
+
t && /* @__PURE__ */ o(k, { children: [
|
41
41
|
/* @__PURE__ */ e(s, { height: 36 }),
|
42
42
|
/* @__PURE__ */ e(
|
43
43
|
c,
|
44
44
|
{
|
45
45
|
type: "password",
|
46
|
-
renderAs: r.otp ? "error" : $,
|
46
|
+
renderAs: r.otp ? "error-dark" : $,
|
47
47
|
autoComplete: "password",
|
48
48
|
label: "Verification code",
|
49
49
|
value: l,
|
50
|
-
onChange: (
|
50
|
+
onChange: (d) => m("otp", d.target.value),
|
51
51
|
width: 330,
|
52
52
|
required: !0,
|
53
53
|
shape: "borderLess",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"identifier-otp-form.js","sources":["../../../../../src/features/auth/login/identifier-otp-form/identifier-otp-form.tsx"],"sourcesContent":["// In @cuemath/leap/src/components/IdentifierOtpForm.tsx\n\nimport type { IIdentifierOtpFormProps } from './identifier-otp-form-types';\n\nimport React, { type ChangeEvent } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport TextInput from '../../../ui/inputs/text-input/text-input';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport InputStatusIcon from '../../comps/input-status-icon/input-status-icon';\nimport ResendOTP from '../../comps/resend-otp/resend-otp';\nimport * as Styled from './identifier-otp-form-styled';\n\nconst IdentifierOtpForm: React.FC<IIdentifierOtpFormProps> = ({\n identifier,\n otp,\n errors,\n isOtpVerified,\n isLoading,\n isSubmitDisabled,\n showOtpInput,\n onChange,\n onSubmit,\n onSendOtp,\n}) => {\n const identifierStatusVariant = showOtpInput ? 'success-dark' : 'primary-dark';\n const otpStatusVariant = isOtpVerified ? 'success-dark' : 'primary-dark';\n\n return (\n <FlexView $gutterX={2} $gapX={1.5} $background=\"BLACK_2\" $height={308}>\n <Styled.FormWrapper onSubmit={onSubmit}>\n <FlexView $alignItems=\"center\" $justifyContent=\"center\">\n <TextInput\n renderAs={errors.identifier ? 'error-dark' : identifierStatusVariant}\n autoFocus\n label=\"Email or Phone\"\n value={identifier}\n onChange={(e: ChangeEvent<HTMLInputElement>) => onChange('identifier', e.target.value)}\n width={330}\n required\n shape=\"borderLess\"\n errorMessage={errors.identifier}\n disabled={showOtpInput}\n siblingElement={\n <InputStatusIcon isValid={showOtpInput} isError={!!errors.identifier} />\n }\n />\n {showOtpInput && (\n <>\n <Separator height={36} />\n <TextInput\n type=\"password\"\n renderAs={errors.otp ? 'error' : otpStatusVariant}\n autoComplete=\"password\"\n label=\"Verification code\"\n value={otp}\n onChange={(e: ChangeEvent<HTMLInputElement>) => onChange('otp', e.target.value)}\n width={330}\n required\n shape=\"borderLess\"\n errorMessage={errors.otp}\n disabled={isOtpVerified || (otp.length === 4 && isLoading)}\n siblingElement={\n <InputStatusIcon\n isLoading={isLoading}\n isValid={isOtpVerified}\n isError={!!errors.otp}\n />\n }\n />\n <Separator heightX={1.25} />\n <FlexView $alignItems=\"flex-end\" $width=\"100%\">\n <ResendOTP onResendOTP={onSendOtp} disabled={isOtpVerified} />\n </FlexView>\n <Separator heightX={2} />\n </>\n )}\n </FlexView>\n <Button\n size=\"small\"\n renderAs=\"secondary-dark\"\n type=\"submit\"\n label={showOtpInput ? 'Log In' : 'Get Verification Code'}\n width={336}\n busy={!showOtpInput && isLoading}\n disabled={isSubmitDisabled}\n />\n </Styled.FormWrapper>\n </FlexView>\n );\n};\n\nexport default IdentifierOtpForm;\n"],"names":["IdentifierOtpForm","identifier","otp","errors","isOtpVerified","isLoading","isSubmitDisabled","showOtpInput","onChange","onSubmit","onSendOtp","identifierStatusVariant","otpStatusVariant","jsx","FlexView","jsxs","Styled.FormWrapper","TextInput","e","InputStatusIcon","Fragment","Separator","ResendOTP","Button","IdentifierOtpForm$1"],"mappings":";;;;;;;;AAcA,MAAMA,IAAuD,CAAC;AAAA,EAC5D,YAAAC;AAAA,EACA,KAAAC;AAAA,EACA,QAAAC;AAAA,EACA,eAAAC;AAAA,EACA,WAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AACF,MAAM;AACE,QAAAC,IAA0BJ,IAAe,iBAAiB,gBAC1DK,IAAmBR,IAAgB,iBAAiB;AAE1D,SACG,gBAAAS,EAAAC,GAAA,EAAS,UAAU,GAAG,OAAO,KAAK,aAAY,WAAU,SAAS,KAChE,UAAA,gBAAAC,EAACC,GAAA,EAAmB,UAAAP,GAClB,UAAA;AAAA,IAAA,gBAAAM,EAACD,GAAS,EAAA,aAAY,UAAS,iBAAgB,UAC7C,UAAA;AAAA,MAAA,gBAAAD;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,UAAUd,EAAO,aAAa,eAAeQ;AAAA,UAC7C,WAAS;AAAA,UACT,OAAM;AAAA,UACN,OAAOV;AAAA,UACP,UAAU,CAACiB,MAAqCV,EAAS,cAAcU,EAAE,OAAO,KAAK;AAAA,UACrF,OAAO;AAAA,UACP,UAAQ;AAAA,UACR,OAAM;AAAA,UACN,cAAcf,EAAO;AAAA,UACrB,UAAUI;AAAA,UACV,kCACGY,GAAgB,EAAA,SAASZ,GAAc,SAAS,CAAC,CAACJ,EAAO,YAAY;AAAA,QAAA;AAAA,MAE1E;AAAA,MACCI,KAEG,gBAAAQ,EAAAK,GAAA,EAAA,UAAA;AAAA,QAAC,gBAAAP,EAAAQ,GAAA,EAAU,QAAQ,GAAI,CAAA;AAAA,QACvB,gBAAAR;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,UAAUd,EAAO,MAAM,
|
1
|
+
{"version":3,"file":"identifier-otp-form.js","sources":["../../../../../src/features/auth/login/identifier-otp-form/identifier-otp-form.tsx"],"sourcesContent":["// In @cuemath/leap/src/components/IdentifierOtpForm.tsx\n\nimport type { IIdentifierOtpFormProps } from './identifier-otp-form-types';\n\nimport React, { type ChangeEvent } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport TextInput from '../../../ui/inputs/text-input/text-input';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport InputStatusIcon from '../../comps/input-status-icon/input-status-icon';\nimport ResendOTP from '../../comps/resend-otp/resend-otp';\nimport * as Styled from './identifier-otp-form-styled';\n\nconst IdentifierOtpForm: React.FC<IIdentifierOtpFormProps> = ({\n identifier,\n otp,\n errors,\n isOtpVerified,\n isLoading,\n isSubmitDisabled,\n showOtpInput,\n onChange,\n onSubmit,\n onSendOtp,\n}) => {\n const identifierStatusVariant = showOtpInput ? 'success-dark' : 'primary-dark';\n const otpStatusVariant = isOtpVerified ? 'success-dark' : 'primary-dark';\n\n return (\n <FlexView $gutterX={2} $gapX={1.5} $background=\"BLACK_2\" $height={308}>\n <Styled.FormWrapper onSubmit={onSubmit}>\n <FlexView $alignItems=\"center\" $justifyContent=\"center\">\n <TextInput\n renderAs={errors.identifier ? 'error-dark' : identifierStatusVariant}\n autoFocus\n label=\"Email or Phone\"\n value={identifier}\n onChange={(e: ChangeEvent<HTMLInputElement>) => onChange('identifier', e.target.value)}\n width={330}\n required\n shape=\"borderLess\"\n errorMessage={errors.identifier}\n disabled={showOtpInput}\n siblingElement={\n <InputStatusIcon isValid={showOtpInput} isError={!!errors.identifier} />\n }\n />\n {showOtpInput && (\n <>\n <Separator height={36} />\n <TextInput\n type=\"password\"\n renderAs={errors.otp ? 'error-dark' : otpStatusVariant}\n autoComplete=\"password\"\n label=\"Verification code\"\n value={otp}\n onChange={(e: ChangeEvent<HTMLInputElement>) => onChange('otp', e.target.value)}\n width={330}\n required\n shape=\"borderLess\"\n errorMessage={errors.otp}\n disabled={isOtpVerified || (otp.length === 4 && isLoading)}\n siblingElement={\n <InputStatusIcon\n isLoading={isLoading}\n isValid={isOtpVerified}\n isError={!!errors.otp}\n />\n }\n />\n <Separator heightX={1.25} />\n <FlexView $alignItems=\"flex-end\" $width=\"100%\">\n <ResendOTP onResendOTP={onSendOtp} disabled={isOtpVerified} />\n </FlexView>\n <Separator heightX={2} />\n </>\n )}\n </FlexView>\n <Button\n size=\"small\"\n renderAs=\"secondary-dark\"\n type=\"submit\"\n label={showOtpInput ? 'Log In' : 'Get Verification Code'}\n width={336}\n busy={!showOtpInput && isLoading}\n disabled={isSubmitDisabled}\n />\n </Styled.FormWrapper>\n </FlexView>\n );\n};\n\nexport default IdentifierOtpForm;\n"],"names":["IdentifierOtpForm","identifier","otp","errors","isOtpVerified","isLoading","isSubmitDisabled","showOtpInput","onChange","onSubmit","onSendOtp","identifierStatusVariant","otpStatusVariant","jsx","FlexView","jsxs","Styled.FormWrapper","TextInput","e","InputStatusIcon","Fragment","Separator","ResendOTP","Button","IdentifierOtpForm$1"],"mappings":";;;;;;;;AAcA,MAAMA,IAAuD,CAAC;AAAA,EAC5D,YAAAC;AAAA,EACA,KAAAC;AAAA,EACA,QAAAC;AAAA,EACA,eAAAC;AAAA,EACA,WAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AACF,MAAM;AACE,QAAAC,IAA0BJ,IAAe,iBAAiB,gBAC1DK,IAAmBR,IAAgB,iBAAiB;AAE1D,SACG,gBAAAS,EAAAC,GAAA,EAAS,UAAU,GAAG,OAAO,KAAK,aAAY,WAAU,SAAS,KAChE,UAAA,gBAAAC,EAACC,GAAA,EAAmB,UAAAP,GAClB,UAAA;AAAA,IAAA,gBAAAM,EAACD,GAAS,EAAA,aAAY,UAAS,iBAAgB,UAC7C,UAAA;AAAA,MAAA,gBAAAD;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,UAAUd,EAAO,aAAa,eAAeQ;AAAA,UAC7C,WAAS;AAAA,UACT,OAAM;AAAA,UACN,OAAOV;AAAA,UACP,UAAU,CAACiB,MAAqCV,EAAS,cAAcU,EAAE,OAAO,KAAK;AAAA,UACrF,OAAO;AAAA,UACP,UAAQ;AAAA,UACR,OAAM;AAAA,UACN,cAAcf,EAAO;AAAA,UACrB,UAAUI;AAAA,UACV,kCACGY,GAAgB,EAAA,SAASZ,GAAc,SAAS,CAAC,CAACJ,EAAO,YAAY;AAAA,QAAA;AAAA,MAE1E;AAAA,MACCI,KAEG,gBAAAQ,EAAAK,GAAA,EAAA,UAAA;AAAA,QAAC,gBAAAP,EAAAQ,GAAA,EAAU,QAAQ,GAAI,CAAA;AAAA,QACvB,gBAAAR;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,UAAUd,EAAO,MAAM,eAAeS;AAAA,YACtC,cAAa;AAAA,YACb,OAAM;AAAA,YACN,OAAOV;AAAA,YACP,UAAU,CAACgB,MAAqCV,EAAS,OAAOU,EAAE,OAAO,KAAK;AAAA,YAC9E,OAAO;AAAA,YACP,UAAQ;AAAA,YACR,OAAM;AAAA,YACN,cAAcf,EAAO;AAAA,YACrB,UAAUC,KAAkBF,EAAI,WAAW,KAAKG;AAAA,YAChD,gBACE,gBAAAQ;AAAA,cAACM;AAAA,cAAA;AAAA,gBACC,WAAAd;AAAA,gBACA,SAASD;AAAA,gBACT,SAAS,CAAC,CAACD,EAAO;AAAA,cAAA;AAAA,YACpB;AAAA,UAAA;AAAA,QAEJ;AAAA,QACA,gBAAAU,EAACQ,GAAU,EAAA,SAAS,KAAM,CAAA;AAAA,QACzB,gBAAAR,EAAAC,GAAA,EAAS,aAAY,YAAW,QAAO,QACtC,UAAC,gBAAAD,EAAAS,GAAA,EAAU,aAAaZ,GAAW,UAAUN,EAAe,CAAA,GAC9D;AAAA,QACA,gBAAAS,EAACQ,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,MAAA,GACzB;AAAA,IAAA,GAEJ;AAAA,IACA,gBAAAR;AAAA,MAACU;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,UAAS;AAAA,QACT,MAAK;AAAA,QACL,OAAOhB,IAAe,WAAW;AAAA,QACjC,OAAO;AAAA,QACP,MAAM,CAACA,KAAgBF;AAAA,QACvB,UAAUC;AAAA,MAAA;AAAA,IACZ;AAAA,EAAA,EACF,CAAA,EACF,CAAA;AAEJ,GAEAkB,IAAexB;"}
|
@@ -1,20 +1,21 @@
|
|
1
|
-
import { jsxs as
|
1
|
+
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
2
2
|
import c from "../../../ui/buttons/button/button.js";
|
3
3
|
import g from "../../../ui/buttons/text-button/text-button.js";
|
4
4
|
import l from "../../../ui/inputs/text-input/text-input.js";
|
5
5
|
import t from "../../../ui/layout/flex-view.js";
|
6
|
-
import
|
7
|
-
|
6
|
+
import s from "../../../ui/separator/separator.js";
|
7
|
+
import b from "../../comps/input-status-icon/input-status-icon.js";
|
8
|
+
const f = ({
|
8
9
|
username: n,
|
9
10
|
password: i,
|
10
11
|
errors: r,
|
11
|
-
|
12
|
-
onChange:
|
12
|
+
isLoading: m,
|
13
|
+
onChange: d,
|
13
14
|
onSubmit: u,
|
14
15
|
onForgotPassword: p
|
15
16
|
}) => {
|
16
|
-
const h =
|
17
|
-
return /* @__PURE__ */
|
17
|
+
const h = m || !n.trim() || !i.trim();
|
18
|
+
return /* @__PURE__ */ a(
|
18
19
|
t,
|
19
20
|
{
|
20
21
|
$gutterX: 2,
|
@@ -24,9 +25,9 @@ const b = ({
|
|
24
25
|
$background: "BLACK_2",
|
25
26
|
$height: 308,
|
26
27
|
children: [
|
27
|
-
/* @__PURE__ */ e(
|
28
|
-
/* @__PURE__ */
|
29
|
-
/* @__PURE__ */
|
28
|
+
/* @__PURE__ */ e(s, { heightX: 0.5 }),
|
29
|
+
/* @__PURE__ */ a("form", { onSubmit: u, children: [
|
30
|
+
/* @__PURE__ */ a(t, { $alignItems: "center", $justifyContent: "center", children: [
|
30
31
|
/* @__PURE__ */ e(
|
31
32
|
l,
|
32
33
|
{
|
@@ -35,14 +36,14 @@ const b = ({
|
|
35
36
|
autoComplete: "username",
|
36
37
|
label: "Username",
|
37
38
|
value: n,
|
38
|
-
onChange: (
|
39
|
+
onChange: (o) => d("username", o.target.value),
|
39
40
|
width: 330,
|
40
41
|
required: !0,
|
41
42
|
shape: "borderLess",
|
42
43
|
errorMessage: r.username
|
43
44
|
}
|
44
45
|
),
|
45
|
-
/* @__PURE__ */ e(
|
46
|
+
/* @__PURE__ */ e(s, { height: 36 }),
|
46
47
|
/* @__PURE__ */ e(
|
47
48
|
l,
|
48
49
|
{
|
@@ -51,17 +52,18 @@ const b = ({
|
|
51
52
|
autoComplete: "password",
|
52
53
|
label: "Password",
|
53
54
|
value: i,
|
54
|
-
onChange: (
|
55
|
+
onChange: (o) => d("password", o.target.value),
|
55
56
|
width: 330,
|
56
57
|
required: !0,
|
57
58
|
shape: "borderLess",
|
58
|
-
errorMessage: r.password
|
59
|
+
errorMessage: r.password,
|
60
|
+
siblingElement: /* @__PURE__ */ e(b, { isError: !!r.password })
|
59
61
|
}
|
60
62
|
)
|
61
63
|
] }),
|
62
|
-
/* @__PURE__ */ e(
|
64
|
+
/* @__PURE__ */ e(s, { heightX: 1.25 }),
|
63
65
|
/* @__PURE__ */ e(t, { $alignItems: "flex-end", children: /* @__PURE__ */ e(g, { label: "Forgot Password?", onClick: p, color: "WHITE_T_60" }) }),
|
64
|
-
/* @__PURE__ */ e(
|
66
|
+
/* @__PURE__ */ e(s, { heightX: 2 }),
|
65
67
|
/* @__PURE__ */ e(t, { $justifyContent: "center", children: /* @__PURE__ */ e(
|
66
68
|
c,
|
67
69
|
{
|
@@ -70,7 +72,7 @@ const b = ({
|
|
70
72
|
type: "submit",
|
71
73
|
label: "Log in",
|
72
74
|
width: 336,
|
73
|
-
busy:
|
75
|
+
busy: m,
|
74
76
|
disabled: h
|
75
77
|
}
|
76
78
|
) })
|
@@ -78,8 +80,8 @@ const b = ({
|
|
78
80
|
]
|
79
81
|
}
|
80
82
|
);
|
81
|
-
},
|
83
|
+
}, j = f;
|
82
84
|
export {
|
83
|
-
|
85
|
+
j as default
|
84
86
|
};
|
85
87
|
//# sourceMappingURL=username-password-form.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"username-password-form.js","sources":["../../../../../src/features/auth/login/username-password-form/username-password-form.tsx"],"sourcesContent":["import type { IUsernamePasswordFormProps } from './username-password-form-types';\n\nimport { type ChangeEvent, type FC } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport TextButton from '../../../ui/buttons/text-button/text-button';\nimport TextInput from '../../../ui/inputs/text-input/text-input';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\n\nconst UsernamePasswordForm: FC<IUsernamePasswordFormProps> = ({\n username,\n password,\n errors,\n
|
1
|
+
{"version":3,"file":"username-password-form.js","sources":["../../../../../src/features/auth/login/username-password-form/username-password-form.tsx"],"sourcesContent":["import type { IUsernamePasswordFormProps } from './username-password-form-types';\n\nimport { type ChangeEvent, type FC } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport TextButton from '../../../ui/buttons/text-button/text-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';\n\nconst UsernamePasswordForm: FC<IUsernamePasswordFormProps> = ({\n username,\n password,\n errors,\n isLoading,\n onChange,\n onSubmit,\n onForgotPassword,\n}) => {\n const isSubmitDisabled = isLoading || !username.trim() || !password.trim();\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 <Separator heightX={0.5} />\n <form onSubmit={onSubmit}>\n <FlexView $alignItems=\"center\" $justifyContent=\"center\">\n <TextInput\n renderAs={errors.username ? 'error-dark' : 'primary-dark'}\n autoFocus\n autoComplete=\"username\"\n label=\"Username\"\n value={username}\n onChange={(e: ChangeEvent<HTMLInputElement>) => onChange('username', e.target.value)}\n width={330}\n required\n shape=\"borderLess\"\n errorMessage={errors.username}\n />\n <Separator height={36} />\n <TextInput\n type=\"password\"\n renderAs={errors.password ? 'error-dark' : 'primary-dark'}\n autoComplete=\"password\"\n label=\"Password\"\n value={password}\n onChange={(e: ChangeEvent<HTMLInputElement>) => onChange('password', e.target.value)}\n width={330}\n required\n shape=\"borderLess\"\n errorMessage={errors.password}\n siblingElement={<InputStatusIcon isError={!!errors.password} />}\n />\n </FlexView>\n <Separator heightX={1.25} />\n <FlexView $alignItems=\"flex-end\">\n <TextButton label=\"Forgot Password?\" onClick={onForgotPassword} color=\"WHITE_T_60\" />\n </FlexView>\n <Separator heightX={2} />\n <FlexView $justifyContent=\"center\">\n <Button\n size=\"small\"\n renderAs=\"secondary-dark\"\n type=\"submit\"\n label=\"Log in\"\n width={336}\n busy={isLoading}\n disabled={isSubmitDisabled}\n />\n </FlexView>\n </form>\n </FlexView>\n );\n};\n\nexport default UsernamePasswordForm;\n"],"names":["UsernamePasswordForm","username","password","errors","isLoading","onChange","onSubmit","onForgotPassword","isSubmitDisabled","jsxs","FlexView","jsx","Separator","TextInput","e","InputStatusIcon","TextButton","Button","UsernamePasswordForm$1"],"mappings":";;;;;;;AAWA,MAAMA,IAAuD,CAAC;AAAA,EAC5D,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,kBAAAC;AACF,MAAM;AACE,QAAAC,IAAmBJ,KAAa,CAACH,EAAS,UAAU,CAACC,EAAS;AAGlE,SAAA,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAChB,aAAY;AAAA,MACZ,SAAS;AAAA,MAET,UAAA;AAAA,QAAC,gBAAAC,EAAAC,GAAA,EAAU,SAAS,IAAK,CAAA;AAAA,QACzB,gBAAAH,EAAC,UAAK,UAAAH,GACJ,UAAA;AAAA,UAAA,gBAAAG,EAACC,GAAS,EAAA,aAAY,UAAS,iBAAgB,UAC7C,UAAA;AAAA,YAAA,gBAAAC;AAAA,cAACE;AAAA,cAAA;AAAA,gBACC,UAAUV,EAAO,WAAW,eAAe;AAAA,gBAC3C,WAAS;AAAA,gBACT,cAAa;AAAA,gBACb,OAAM;AAAA,gBACN,OAAOF;AAAA,gBACP,UAAU,CAACa,MAAqCT,EAAS,YAAYS,EAAE,OAAO,KAAK;AAAA,gBACnF,OAAO;AAAA,gBACP,UAAQ;AAAA,gBACR,OAAM;AAAA,gBACN,cAAcX,EAAO;AAAA,cAAA;AAAA,YACvB;AAAA,YACA,gBAAAQ,EAACC,GAAU,EAAA,QAAQ,GAAI,CAAA;AAAA,YACvB,gBAAAD;AAAA,cAACE;AAAA,cAAA;AAAA,gBACC,MAAK;AAAA,gBACL,UAAUV,EAAO,WAAW,eAAe;AAAA,gBAC3C,cAAa;AAAA,gBACb,OAAM;AAAA,gBACN,OAAOD;AAAA,gBACP,UAAU,CAACY,MAAqCT,EAAS,YAAYS,EAAE,OAAO,KAAK;AAAA,gBACnF,OAAO;AAAA,gBACP,UAAQ;AAAA,gBACR,OAAM;AAAA,gBACN,cAAcX,EAAO;AAAA,gBACrB,gBAAiB,gBAAAQ,EAAAI,GAAA,EAAgB,SAAS,CAAC,CAACZ,EAAO,UAAU;AAAA,cAAA;AAAA,YAC/D;AAAA,UAAA,GACF;AAAA,UACA,gBAAAQ,EAACC,GAAU,EAAA,SAAS,KAAM,CAAA;AAAA,UACzB,gBAAAD,EAAAD,GAAA,EAAS,aAAY,YACpB,UAAC,gBAAAC,EAAAK,GAAA,EAAW,OAAM,oBAAmB,SAAST,GAAkB,OAAM,aAAa,CAAA,GACrF;AAAA,UACA,gBAAAI,EAACC,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,UACvB,gBAAAD,EAACD,GAAS,EAAA,iBAAgB,UACxB,UAAA,gBAAAC;AAAA,YAACM;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,UAAS;AAAA,cACT,MAAK;AAAA,cACL,OAAM;AAAA,cACN,OAAO;AAAA,cACP,MAAMb;AAAA,cACN,UAAUI;AAAA,YAAA;AAAA,UAAA,GAEd;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,GAEAU,IAAelB;"}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { jsxs as o, jsx as r } from "react/jsx-runtime";
|
2
|
-
import n from "
|
3
|
-
import i from "
|
4
|
-
import d from "
|
5
|
-
import { CountryCodeButton as $ } from "
|
2
|
+
import n from "../../../../../assets/line-icons/icons/chevron-down.js";
|
3
|
+
import i from "../../../../ui/layout/flex-view.js";
|
4
|
+
import d from "../../../../ui/text/text.js";
|
5
|
+
import { CountryCodeButton as $ } from "./country-selector-styled.js";
|
6
6
|
const C = ({
|
7
7
|
value: t,
|
8
8
|
menuVisible: e
|
package/dist/features/auth/signup/custom-input-field/country-selector/country-code-button.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"country-code-button.js","sources":["../../../../../../src/features/auth/signup/custom-input-field/country-selector/country-code-button.tsx"],"sourcesContent":["import type { FC } from 'react';\n\nimport ChevronDownIcon from '../../../../../assets/line-icons/icons/chevron-down';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport * as Styled from './country-selector-styled';\n\nconst CountryCodeButton: FC<{ value?: string; menuVisible?: boolean }> = ({\n value,\n menuVisible,\n}) => {\n return (\n <Styled.CountryCodeButton\n $background=\"BLACK_5\"\n $borderRadius={4}\n $gutterX={0.5}\n $gap={5}\n $alignItems=\"center\"\n $justifyContent=\"space-between\"\n $borderColor={menuVisible ? 'WHITE_T_38' : 'BLACK_5'}\n $flexDirection=\"row\"\n $flexGap={2}\n >\n <Text $renderAs=\"ab1\" $color=\"WHITE\">\n +{value}\n </Text>\n <FlexView $width={20}>\n <ChevronDownIcon width={20} height={20} color=\"WHITE\" />\n </FlexView>\n </Styled.CountryCodeButton>\n );\n};\n\nexport default CountryCodeButton;\n"],"names":["CountryCodeButton","value","menuVisible","jsxs","Styled.CountryCodeButton","Text","jsx","FlexView","ChevronDownIcon"],"mappings":";;;;;AAOA,MAAMA,IAAmE,CAAC;AAAA,EACxE,OAAAC;AAAA,EACA,aAAAC;AACF,MAEI,gBAAAC;AAAA,EAACC;AAAAA,EAAA;AAAA,IACC,aAAY;AAAA,IACZ,eAAe;AAAA,IACf,UAAU;AAAA,IACV,MAAM;AAAA,IACN,aAAY;AAAA,IACZ,iBAAgB;AAAA,IAChB,cAAcF,IAAc,eAAe;AAAA,IAC3C,gBAAe;AAAA,IACf,UAAU;AAAA,IAEV,UAAA;AAAA,MAAA,gBAAAC,EAACE,GAAK,EAAA,WAAU,OAAM,QAAO,SAAQ,UAAA;AAAA,QAAA;AAAA,QACjCJ;AAAA,MAAA,GACJ;AAAA,MACC,gBAAAK,EAAAC,GAAA,EAAS,QAAQ,IAChB,UAAC,gBAAAD,EAAAE,GAAA,EAAgB,OAAO,IAAI,QAAQ,IAAI,OAAM,QAAQ,CAAA,GACxD;AAAA,IAAA;AAAA,EAAA;AAAA;"}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
2
|
+
import $ from "../../../../ui/text/text.js";
|
3
|
+
import { COUNTRY_CODE_MAP as a } from "../../signup-constants.js";
|
4
|
+
import { MenuWrapper as m, MenuItem as p, FlagIcon as s } from "./country-selector-styled.js";
|
5
|
+
const x = ({ selectedCountry: o, onChange: t }) => /* @__PURE__ */ e(m, { $widthX: 10, $gapX: 0.5, $background: "BLACK_2", $borderColor: "BLACK_5", children: a.map((n) => {
|
6
|
+
const { id: r, value: i, icon: c, code: d } = n;
|
7
|
+
return /* @__PURE__ */ l(
|
8
|
+
p,
|
9
|
+
{
|
10
|
+
$gutterX: 0.5,
|
11
|
+
$gapX: 0.75,
|
12
|
+
onClick: () => t({ code: d, id: r }),
|
13
|
+
$width: "100%",
|
14
|
+
$flexDirection: "row",
|
15
|
+
$alignItems: "center",
|
16
|
+
$flexGap: 8,
|
17
|
+
$isSelected: o.id === r,
|
18
|
+
children: [
|
19
|
+
/* @__PURE__ */ e(s, { src: c }),
|
20
|
+
/* @__PURE__ */ e($, { $renderAs: "ab3", $color: "WHITE", children: i })
|
21
|
+
]
|
22
|
+
},
|
23
|
+
r
|
24
|
+
);
|
25
|
+
}) });
|
26
|
+
export {
|
27
|
+
x as default
|
28
|
+
};
|
29
|
+
//# sourceMappingURL=country-list-menu.js.map
|
package/dist/features/auth/signup/custom-input-field/country-selector/country-list-menu.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"country-list-menu.js","sources":["../../../../../../src/features/auth/signup/custom-input-field/country-selector/country-list-menu.tsx"],"sourcesContent":["import type { ICountryListMenuProps } from './country-selector-types';\nimport type { FC } from 'react';\n\nimport Text from '../../../../ui/text/text';\nimport { COUNTRY_CODE_MAP } from '../../signup-constants';\nimport * as Styled from './country-selector-styled';\n\nconst CountryListMenu: FC<ICountryListMenuProps> = ({ selectedCountry, onChange }) => {\n return (\n <Styled.MenuWrapper $widthX={10} $gapX={0.5} $background={'BLACK_2'} $borderColor={'BLACK_5'}>\n {COUNTRY_CODE_MAP.map(option => {\n const { id, value, icon, code } = option;\n\n return (\n <Styled.MenuItem\n key={id}\n $gutterX={0.5}\n $gapX={0.75}\n onClick={() => onChange({ code, id })}\n $width=\"100%\"\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $flexGap={8}\n $isSelected={selectedCountry.id === id}\n >\n <Styled.FlagIcon src={icon} />\n <Text $renderAs=\"ab3\" $color={'WHITE'}>\n {value}\n </Text>\n </Styled.MenuItem>\n );\n })}\n </Styled.MenuWrapper>\n );\n};\n\nexport default CountryListMenu;\n"],"names":["CountryListMenu","selectedCountry","onChange","jsx","Styled.MenuWrapper","COUNTRY_CODE_MAP","option","id","value","icon","code","jsxs","Styled.MenuItem","Styled.FlagIcon","Text"],"mappings":";;;;AAOA,MAAMA,IAA6C,CAAC,EAAE,iBAAAC,GAAiB,UAAAC,QAElE,gBAAAC,EAAAC,GAAA,EAAmB,SAAS,IAAI,OAAO,KAAK,aAAa,WAAW,cAAc,WAChF,UAAAC,EAAiB,IAAI,CAAUC,MAAA;AAC9B,QAAM,EAAE,IAAAC,GAAI,OAAAC,GAAO,MAAAC,GAAM,MAAAC,MAASJ;AAGhC,SAAA,gBAAAK;AAAA,IAACC;AAAAA,IAAA;AAAA,MAEC,UAAU;AAAA,MACV,OAAO;AAAA,MACP,SAAS,MAAMV,EAAS,EAAE,MAAAQ,GAAM,IAAAH,GAAI;AAAA,MACpC,QAAO;AAAA,MACP,gBAAe;AAAA,MACf,aAAY;AAAA,MACZ,UAAU;AAAA,MACV,aAAaN,EAAgB,OAAOM;AAAA,MAEpC,UAAA;AAAA,QAAA,gBAAAJ,EAACU,GAAA,EAAgB,KAAKJ,EAAM,CAAA;AAAA,0BAC3BK,GAAK,EAAA,WAAU,OAAM,QAAQ,SAC3B,UACHN,GAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IAbKD;AAAA,EAAA;AAgBV,CAAA,EACH,CAAA;"}
|
package/dist/features/auth/signup/custom-input-field/country-selector/country-selector-styled.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"country-selector-styled.js","sources":["../../../../../../src/features/auth/signup/custom-input-field/country-selector/country-selector-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\n\nexport const MenuWrapper = styled(FlexView)`\n border-radius: 2px;\n max-height: 220px;\n overflow-y: scroll;\n width: 271px;\n`;\n\nexport const MenuItem = styled(FlexView)<{ $isSelected: boolean }>(({ theme, $isSelected }) => {\n return `\n cursor: pointer;\n background: ${$isSelected ? theme.colors.BLACK_5 : 'transparent'};\n &:hover {\n background: ${theme.colors.BLACK_5};\n }\n `;\n});\n\nexport const FlagIcon = styled.img`\n width: 20px;\n height: 20px;\n`;\n\nexport const CountryCodeButton = styled(FlexView)`\n cursor: pointer;\n padding-right: 4px;\n max-width: 100px;\n min-width: 80px;\n`;\n"],"names":["MenuWrapper","styled","FlexView","MenuItem","theme","$isSelected","FlagIcon","CountryCodeButton"],"mappings":";;AAIa,MAAAA,IAAcC,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,GAO7BC,IAAWF,EAAOC,CAAQ,EAA4B,CAAC,EAAE,OAAAE,GAAO,aAAAC,QACpE;AAAA;AAAA,oBAEWA,IAAcD,EAAM,OAAO,UAAU,aAAa;AAAA;AAAA,0BAE5CA,EAAM,OAAO,OAAO;AAAA;AAAA,IAG7C,GAEYE,IAAWL,EAAO;AAAA;AAAA;AAAA,GAKlBM,IAAoBN,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
2
|
+
import { useState as s, useCallback as u } from "react";
|
3
|
+
import f from "../../../../ui/context-menu/context-menu.js";
|
4
|
+
import l from "../../../../ui/layout/flex-view.js";
|
5
|
+
import c from "./country-code-button.js";
|
6
|
+
import d from "./country-list-menu.js";
|
7
|
+
const V = ({ value: t, onChange: n }) => {
|
8
|
+
const [o, r] = s(!1), i = u((m) => {
|
9
|
+
r(m);
|
10
|
+
}, []);
|
11
|
+
return !t || !n ? null : /* @__PURE__ */ e(l, { children: /* @__PURE__ */ e(
|
12
|
+
f,
|
13
|
+
{
|
14
|
+
startLeft: !0,
|
15
|
+
targetElement: /* @__PURE__ */ e(c, { value: t == null ? void 0 : t.code, menuVisible: o }),
|
16
|
+
menuElement: /* @__PURE__ */ e(d, { onChange: n, selectedCountry: t }),
|
17
|
+
menuOffset: 5,
|
18
|
+
menuZIndex: 1,
|
19
|
+
onMenuVisibilityChange: i
|
20
|
+
}
|
21
|
+
) });
|
22
|
+
};
|
23
|
+
export {
|
24
|
+
V as default
|
25
|
+
};
|
26
|
+
//# sourceMappingURL=country-selector.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"country-selector.js","sources":["../../../../../../src/features/auth/signup/custom-input-field/country-selector/country-selector.tsx"],"sourcesContent":["import type { IPhoneCountrySelectorProps } from './country-selector-types';\n\nimport { useCallback, useState, type FC } from 'react';\n\nimport ContextMenu from '../../../../ui/context-menu/context-menu';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport CountryCodeButton from './country-code-button';\nimport CountryListMenu from './country-list-menu';\n\nconst PhoneCountrySelector: FC<IPhoneCountrySelectorProps> = ({ value, onChange }) => {\n const [menuVisible, setMenuVisible] = useState(false);\n\n const handleMenuVisibility = useCallback((visible: boolean) => {\n setMenuVisible(visible);\n }, []);\n\n if (!value || !onChange) return null;\n\n return (\n <FlexView>\n <ContextMenu\n startLeft\n targetElement={<CountryCodeButton value={value?.code} menuVisible={menuVisible} />}\n menuElement={<CountryListMenu onChange={onChange} selectedCountry={value} />}\n menuOffset={5}\n menuZIndex={1}\n onMenuVisibilityChange={handleMenuVisibility}\n />\n </FlexView>\n );\n};\n\nexport default PhoneCountrySelector;\n"],"names":["PhoneCountrySelector","value","onChange","menuVisible","setMenuVisible","useState","handleMenuVisibility","useCallback","visible","FlexView","jsx","ContextMenu","CountryCodeButton","CountryListMenu"],"mappings":";;;;;;AASA,MAAMA,IAAuD,CAAC,EAAE,OAAAC,GAAO,UAAAC,QAAe;AACpF,QAAM,CAACC,GAAaC,CAAc,IAAIC,EAAS,EAAK,GAE9CC,IAAuBC,EAAY,CAACC,MAAqB;AAC7D,IAAAJ,EAAeI,CAAO;AAAA,EACxB,GAAG,CAAE,CAAA;AAEL,SAAI,CAACP,KAAS,CAACC,IAAiB,yBAG7BO,GACC,EAAA,UAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAS;AAAA,MACT,eAAgB,gBAAAD,EAAAE,GAAA,EAAkB,OAAOX,KAAA,gBAAAA,EAAO,MAAM,aAAAE,GAA0B;AAAA,MAChF,aAAa,gBAAAO,EAACG,GAAgB,EAAA,UAAAX,GAAoB,iBAAiBD,GAAO;AAAA,MAC1E,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,wBAAwBK;AAAA,IAAA;AAAA,EAE5B,EAAA,CAAA;AAEJ;"}
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import o from "styled-components";
|
2
|
-
|
3
|
-
const r = o.input`
|
2
|
+
const e = o.input`
|
4
3
|
width: 100%;
|
5
4
|
max-width: 330px;
|
6
5
|
padding: 0;
|
@@ -25,14 +24,7 @@ const r = o.input`
|
|
25
24
|
-webkit-appearance: none;
|
26
25
|
}
|
27
26
|
`;
|
28
|
-
o(e)`
|
29
|
-
width: 100%;
|
30
|
-
`;
|
31
|
-
const p = o(e)`
|
32
|
-
position: relative;
|
33
|
-
`;
|
34
27
|
export {
|
35
|
-
|
36
|
-
p as PasswordInputWrapper
|
28
|
+
e as CustomInput
|
37
29
|
};
|
38
30
|
//# sourceMappingURL=custom-input-field-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"custom-input-field-styled.js","sources":["../../../../../src/features/auth/signup/custom-input-field/custom-input-field-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\
|
1
|
+
{"version":3,"file":"custom-input-field-styled.js","sources":["../../../../../src/features/auth/signup/custom-input-field/custom-input-field-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const CustomInput = styled.input<{ color: string; align?: string; textTransform?: string }>`\n width: 100%;\n max-width: 330px;\n padding: 0;\n line-height: 40px;\n text-transform: ${({ textTransform }) => textTransform || 'none'};\n border: none;\n outline: none;\n background-color: transparent;\n font-size: 32px;\n text-align: ${({ align }) => align ?? 'center'};\n caret-color: ${({ theme }) => theme.colors.WHITE};\n color: ${({ theme }) => theme.colors.WHITE};\n font-family: 'Athletics-Light';\n color: ${({ color }) => color};\n\n &::placeholder {\n font-family: 'Athletics-Light';\n font-size: 32px;\n }\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n }\n`;\n"],"names":["CustomInput","styled","textTransform","align","theme","color"],"mappings":";AAEO,MAAMA,IAAcC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,oBAKd,CAAC,EAAE,eAAAC,QAAoBA,KAAiB,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,gBAKlD,CAAC,EAAE,OAAAC,QAAYA,KAAS,QAAQ;AAAA,iBAC/B,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,KAAK;AAAA,WACvC,CAAC,EAAE,OAAAA,EAAA,MAAYA,EAAM,OAAO,KAAK;AAAA;AAAA,WAEjC,CAAC,EAAE,OAAAC,EAAM,MAAMA,CAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
@@ -1,85 +1,81 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { useState as
|
3
|
-
import { useTheme as
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import P from "../../../ui/layout/flex-view.js";
|
8
|
-
import { CustomInput as j, PasswordInputWrapper as G } from "./custom-input-field-styled.js";
|
1
|
+
import { jsx as s, jsxs as F } from "react/jsx-runtime";
|
2
|
+
import { useState as P, useCallback as V, useMemo as u } from "react";
|
3
|
+
import { useTheme as j } from "styled-components";
|
4
|
+
import k from "../../../ui/layout/flex-view.js";
|
5
|
+
import v from "./country-selector/country-selector.js";
|
6
|
+
import { CustomInput as G } from "./custom-input-field-styled.js";
|
9
7
|
import { InputWrapper as K } from "./input-wrapper/input-wrapper.js";
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
8
|
+
import R from "./password-toggle/password-toggle.js";
|
9
|
+
const S = ({
|
10
|
+
value: a,
|
11
|
+
onChange: m,
|
12
|
+
error: n,
|
13
|
+
helperText: p,
|
15
14
|
onEnter: r,
|
16
|
-
isLoading:
|
17
|
-
isValid:
|
18
|
-
type:
|
19
|
-
placeholder:
|
20
|
-
actionElement:
|
21
|
-
maxLength:
|
22
|
-
width:
|
23
|
-
textTransform:
|
24
|
-
textAlign:
|
15
|
+
isLoading: c,
|
16
|
+
isValid: l,
|
17
|
+
type: o = "text",
|
18
|
+
placeholder: f,
|
19
|
+
actionElement: d,
|
20
|
+
maxLength: h,
|
21
|
+
width: w,
|
22
|
+
textTransform: x,
|
23
|
+
textAlign: g = "center",
|
24
|
+
selectedCountry: C,
|
25
|
+
onCountryChange: I
|
25
26
|
}) => {
|
26
|
-
const
|
27
|
+
const t = j(), [i, T] = P(!1), $ = V(
|
27
28
|
(e) => {
|
28
29
|
e.key === "Enter" && (r == null || r());
|
29
30
|
},
|
30
31
|
[r]
|
31
|
-
),
|
32
|
-
|
33
|
-
j,
|
34
|
-
{
|
35
|
-
value: n,
|
36
|
-
onChange: (e) => c(e.target.value),
|
37
|
-
autoFocus: !0,
|
38
|
-
placeholder: u,
|
39
|
-
color: I,
|
40
|
-
autoCapitalize: "none",
|
41
|
-
textTransform: d,
|
42
|
-
type: h,
|
43
|
-
onKeyDown: w,
|
44
|
-
maxLength: m,
|
45
|
-
align: f
|
46
|
-
}
|
47
|
-
),
|
48
|
-
[
|
49
|
-
w,
|
50
|
-
I,
|
51
|
-
h,
|
52
|
-
m,
|
53
|
-
c,
|
54
|
-
u,
|
55
|
-
f,
|
56
|
-
d,
|
57
|
-
n
|
58
|
-
]
|
59
|
-
);
|
60
|
-
return /* @__PURE__ */ o(
|
32
|
+
), b = u(() => o === "password" ? i ? "text" : "password" : o === "phone" ? "number" : o, [o, i]), D = u(() => n ? t.colors.RED : l ? t.colors.GREEN_4 : t.colors.WHITE, [n, l, t.colors]);
|
33
|
+
return /* @__PURE__ */ s(
|
61
34
|
K,
|
62
35
|
{
|
63
|
-
helperText:
|
64
|
-
isLoading:
|
65
|
-
actionElement:
|
66
|
-
children:
|
67
|
-
|
36
|
+
helperText: n || p,
|
37
|
+
isLoading: c,
|
38
|
+
actionElement: d,
|
39
|
+
children: /* @__PURE__ */ F(
|
40
|
+
k,
|
68
41
|
{
|
69
|
-
$width:
|
42
|
+
$width: w ?? "100%",
|
43
|
+
$flex: 1,
|
70
44
|
$alignItems: "center",
|
71
45
|
$flexDirection: "row",
|
72
46
|
$flexGapX: 0.5,
|
73
47
|
children: [
|
74
|
-
C
|
75
|
-
/* @__PURE__ */
|
48
|
+
o === "phone" && /* @__PURE__ */ s(v, { onChange: I, value: C }),
|
49
|
+
/* @__PURE__ */ s(
|
50
|
+
G,
|
51
|
+
{
|
52
|
+
value: a,
|
53
|
+
onChange: (e) => m(e.target.value),
|
54
|
+
autoFocus: !0,
|
55
|
+
placeholder: f,
|
56
|
+
color: D,
|
57
|
+
autoCapitalize: "none",
|
58
|
+
textTransform: x,
|
59
|
+
type: b,
|
60
|
+
onKeyDown: $,
|
61
|
+
maxLength: h,
|
62
|
+
align: g
|
63
|
+
}
|
64
|
+
),
|
65
|
+
o === "password" && /* @__PURE__ */ s(
|
66
|
+
R,
|
67
|
+
{
|
68
|
+
isVisible: i,
|
69
|
+
onToggle: () => T((e) => !e)
|
70
|
+
}
|
71
|
+
)
|
76
72
|
]
|
77
73
|
}
|
78
|
-
)
|
74
|
+
)
|
79
75
|
}
|
80
76
|
);
|
81
|
-
},
|
77
|
+
}, q = S;
|
82
78
|
export {
|
83
|
-
|
79
|
+
q as default
|
84
80
|
};
|
85
81
|
//# sourceMappingURL=custom-input-field.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"custom-input-field.js","sources":["../../../../../src/features/auth/signup/custom-input-field/custom-input-field.tsx"],"sourcesContent":["import type { ICustomInputFieldProps } from './custom-input-field-types';\n\nimport { useCallback, useMemo, useState, type FC, type KeyboardEvent } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport
|
1
|
+
{"version":3,"file":"custom-input-field.js","sources":["../../../../../src/features/auth/signup/custom-input-field/custom-input-field.tsx"],"sourcesContent":["import type { ICustomInputFieldProps } from './custom-input-field-types';\n\nimport { useCallback, useMemo, useState, type FC, type KeyboardEvent } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport PhoneCountrySelector from './country-selector/country-selector';\nimport * as Styled from './custom-input-field-styled';\nimport { InputWrapper } from './input-wrapper/input-wrapper';\nimport PasswordToggleIcon from './password-toggle/password-toggle';\n\nconst CustomInputField: FC<ICustomInputFieldProps> = ({\n value,\n onChange,\n error,\n helperText,\n onEnter,\n isLoading,\n isValid,\n type = 'text',\n placeholder,\n actionElement,\n maxLength,\n width,\n textTransform,\n textAlign = 'center',\n selectedCountry,\n onCountryChange,\n}) => {\n const theme = useTheme();\n const [isPasswordVisible, setIsPasswordVisible] = 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 inputType = useMemo(() => {\n if (type === 'password') return isPasswordVisible ? 'text' : 'password';\n\n if (type === 'phone') return 'number';\n\n return type;\n }, [type, isPasswordVisible]);\n\n const inputColor = useMemo(() => {\n if (error) return theme.colors.RED;\n\n if (isValid) return theme.colors.GREEN_4;\n\n return theme.colors.WHITE;\n }, [error, isValid, theme.colors]);\n\n return (\n <InputWrapper\n helperText={error || helperText}\n isLoading={isLoading}\n actionElement={actionElement}\n >\n <FlexView\n $width={width ?? '100%'}\n $flex={1}\n $alignItems=\"center\"\n $flexDirection=\"row\"\n $flexGapX={0.5}\n >\n {type === 'phone' && (\n <PhoneCountrySelector onChange={onCountryChange} value={selectedCountry} />\n )}\n <Styled.CustomInput\n value={value}\n onChange={event => onChange(event.target.value)}\n autoFocus\n placeholder={placeholder}\n color={inputColor}\n autoCapitalize=\"none\"\n textTransform={textTransform}\n type={inputType}\n onKeyDown={handleKeyDown}\n maxLength={maxLength}\n align={textAlign}\n />\n {type === 'password' && (\n <PasswordToggleIcon\n isVisible={isPasswordVisible}\n onToggle={() => setIsPasswordVisible(prev => !prev)}\n />\n )}\n </FlexView>\n </InputWrapper>\n );\n};\n\nexport default CustomInputField;\n"],"names":["CustomInputField","value","onChange","error","helperText","onEnter","isLoading","isValid","type","placeholder","actionElement","maxLength","width","textTransform","textAlign","selectedCountry","onCountryChange","theme","useTheme","isPasswordVisible","setIsPasswordVisible","useState","handleKeyDown","useCallback","event","inputType","useMemo","inputColor","jsx","InputWrapper","jsxs","FlexView","PhoneCountrySelector","Styled.CustomInput","PasswordToggleIcon","prev","CustomInputField$1"],"mappings":";;;;;;;;AAWA,MAAMA,IAA+C,CAAC;AAAA,EACpD,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,YAAAC;AAAA,EACA,SAAAC;AAAA,EACA,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,eAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,iBAAAC;AAAA,EACA,iBAAAC;AACF,MAAM;AACJ,QAAMC,IAAQC,KACR,CAACC,GAAmBC,CAAoB,IAAIC,EAAS,EAAK,GAE1DC,IAAgBC;AAAA,IACpB,CAACC,MAA2C;AACtC,MAAAA,EAAM,QAAQ,YACNnB,KAAA,QAAAA;AAAA,IAEd;AAAA,IACA,CAACA,CAAO;AAAA,EAAA,GAGJoB,IAAYC,EAAQ,MACpBlB,MAAS,aAAmBW,IAAoB,SAAS,aAEzDX,MAAS,UAAgB,WAEtBA,GACN,CAACA,GAAMW,CAAiB,CAAC,GAEtBQ,IAAaD,EAAQ,MACrBvB,IAAcc,EAAM,OAAO,MAE3BV,IAAgBU,EAAM,OAAO,UAE1BA,EAAM,OAAO,OACnB,CAACd,GAAOI,GAASU,EAAM,MAAM,CAAC;AAG/B,SAAA,gBAAAW;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,YAAY1B,KAASC;AAAA,MACrB,WAAAE;AAAA,MACA,eAAAI;AAAA,MAEA,UAAA,gBAAAoB;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,QAAQnB,KAAS;AAAA,UACjB,OAAO;AAAA,UACP,aAAY;AAAA,UACZ,gBAAe;AAAA,UACf,WAAW;AAAA,UAEV,UAAA;AAAA,YAAAJ,MAAS,WACP,gBAAAoB,EAAAI,GAAA,EAAqB,UAAUhB,GAAiB,OAAOD,GAAiB;AAAA,YAE3E,gBAAAa;AAAA,cAACK;AAAAA,cAAA;AAAA,gBACC,OAAAhC;AAAA,gBACA,UAAU,CAAAuB,MAAStB,EAASsB,EAAM,OAAO,KAAK;AAAA,gBAC9C,WAAS;AAAA,gBACT,aAAAf;AAAA,gBACA,OAAOkB;AAAA,gBACP,gBAAe;AAAA,gBACf,eAAAd;AAAA,gBACA,MAAMY;AAAA,gBACN,WAAWH;AAAA,gBACX,WAAAX;AAAA,gBACA,OAAOG;AAAA,cAAA;AAAA,YACT;AAAA,YACCN,MAAS,cACR,gBAAAoB;AAAA,cAACM;AAAA,cAAA;AAAA,gBACC,WAAWf;AAAA,gBACX,UAAU,MAAMC,EAAqB,CAAAe,MAAQ,CAACA,CAAI;AAAA,cAAA;AAAA,YACpD;AAAA,UAAA;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EAAA;AAGN,GAEAC,IAAepC;"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
2
|
+
import t from "../../../../../assets/line-icons/icons/eye.js";
|
3
|
+
import e from "../../../../../assets/line-icons/icons/striked-eye.js";
|
4
|
+
import l from "../../../../ui/buttons/clickable/clickable.js";
|
5
|
+
const h = ({ isVisible: i, onToggle: r }) => /* @__PURE__ */ o(l, { label: "toggle-password-visibility", onClick: r, children: i ? /* @__PURE__ */ o(t, { color: "WHITE", width: 24, height: 24 }) : /* @__PURE__ */ o(e, { color: "WHITE", width: 24, height: 24 }) });
|
6
|
+
export {
|
7
|
+
h as default
|
8
|
+
};
|
9
|
+
//# sourceMappingURL=password-toggle.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"password-toggle.js","sources":["../../../../../../src/features/auth/signup/custom-input-field/password-toggle/password-toggle.tsx"],"sourcesContent":["import type { IPasswordToggleProps } from './password-toggle-types';\nimport type { FC } from 'react';\n\nimport EyeIcon from '../../../../../assets/line-icons/icons/eye';\nimport StrikedEyeIcon from '../../../../../assets/line-icons/icons/striked-eye';\nimport Clickable from '../../../../ui/buttons/clickable/clickable';\n\nconst PasswordToggleIcon: FC<IPasswordToggleProps> = ({ isVisible, onToggle }) => (\n <Clickable label=\"toggle-password-visibility\" onClick={onToggle}>\n {isVisible ? (\n <EyeIcon color=\"WHITE\" width={24} height={24} />\n ) : (\n <StrikedEyeIcon color=\"WHITE\" width={24} height={24} />\n )}\n </Clickable>\n);\n\nexport default PasswordToggleIcon;\n"],"names":["PasswordToggleIcon","isVisible","onToggle","jsx","Clickable","EyeIcon","StrikedEyeIcon"],"mappings":";;;;AAOA,MAAMA,IAA+C,CAAC,EAAE,WAAAC,GAAW,UAAAC,EAAS,MACzE,gBAAAC,EAAAC,GAAA,EAAU,OAAM,8BAA6B,SAASF,GACpD,cACE,gBAAAC,EAAAE,GAAA,EAAQ,OAAM,SAAQ,OAAO,IAAI,QAAQ,GAAA,CAAI,IAE9C,gBAAAF,EAACG,GAAe,EAAA,OAAM,SAAQ,OAAO,IAAI,QAAQ,IAAI,EAEzD,CAAA;"}
|
package/dist/index.d.ts
CHANGED
@@ -1117,12 +1117,14 @@ declare interface ICustomInputFieldProps {
|
|
1117
1117
|
actionElement?: ReactNode;
|
1118
1118
|
isLoading?: boolean;
|
1119
1119
|
isValid?: boolean;
|
1120
|
-
type?: 'text' | 'password' | 'number';
|
1120
|
+
type?: 'text' | 'password' | 'number' | 'phone';
|
1121
1121
|
placeholder?: string;
|
1122
1122
|
maxLength?: number;
|
1123
1123
|
width?: number;
|
1124
1124
|
textTransform?: string;
|
1125
1125
|
textAlign?: string;
|
1126
|
+
onCountryChange?: (option: TSelectedCountry) => void;
|
1127
|
+
selectedCountry?: TSelectedCountry;
|
1126
1128
|
}
|
1127
1129
|
|
1128
1130
|
declare interface ICustomVideoProps extends React_2.DetailedHTMLProps<React_2.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement> {
|
@@ -2285,11 +2287,6 @@ declare interface IPerfectHitsProps {
|
|
2285
2287
|
value: number;
|
2286
2288
|
}
|
2287
2289
|
|
2288
|
-
declare interface IPhoneInputProps extends ICustomInputFieldProps {
|
2289
|
-
onCountryChange: (option: TSelectedCountry) => void;
|
2290
|
-
selectedCountry: TSelectedCountry;
|
2291
|
-
}
|
2292
|
-
|
2293
2290
|
declare interface IPlaceholder {
|
2294
2291
|
text?: string;
|
2295
2292
|
marks?: string;
|
@@ -3328,7 +3325,7 @@ declare interface IUsernamePasswordFormProps {
|
|
3328
3325
|
username: string;
|
3329
3326
|
password: string;
|
3330
3327
|
};
|
3331
|
-
|
3328
|
+
isLoading: boolean;
|
3332
3329
|
onChange: (key: 'username' | 'password', value: string) => void;
|
3333
3330
|
onSubmit: (e: FormEvent<HTMLFormElement>) => void;
|
3334
3331
|
onForgotPassword: () => void;
|
@@ -3976,8 +3973,6 @@ export declare const PercentileInput: React_2.ForwardRefExoticComponent<IPercent
|
|
3976
3973
|
|
3977
3974
|
export declare const PerfectHits: NamedExoticComponent<IPerfectHitsProps>;
|
3978
3975
|
|
3979
|
-
export declare const PhoneInput: FC<IPhoneInputProps>;
|
3980
|
-
|
3981
3976
|
/**
|
3982
3977
|
** Global/Platform specific events that needs to be tracked goes here
|
3983
3978
|
** Naming convention needs to be snake_case
|