najwer23morsels 1.3.0 → 1.3.2
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/lib/FormLogin/FormLogin.d.ts +17 -12
- package/lib/FormLogin.js +1 -1
- package/package.json +1 -1
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
import { type FormType } from '../Form';
|
|
2
|
-
interface FormLoginData {
|
|
3
|
-
code?: string;
|
|
4
|
-
message?: string;
|
|
5
|
-
}
|
|
6
|
-
interface FormLoginError {
|
|
7
|
-
message?: string;
|
|
8
|
-
}
|
|
9
2
|
interface FormLoginProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSubmit'> {
|
|
10
|
-
children?: React.ReactNode;
|
|
11
3
|
style?: React.CSSProperties;
|
|
12
4
|
onSubmit: (formData: FormType) => void;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
isError: boolean;
|
|
6
|
+
isPending: boolean;
|
|
7
|
+
isSuccess: boolean;
|
|
8
|
+
errorMsg: string | null | undefined;
|
|
9
|
+
successMsg: string | null | undefined;
|
|
17
10
|
onNavigate?: (path: string) => void;
|
|
11
|
+
linkMainPage?: {
|
|
12
|
+
link: string;
|
|
13
|
+
text: string;
|
|
14
|
+
};
|
|
15
|
+
linkForgotPassword?: {
|
|
16
|
+
link: string;
|
|
17
|
+
text: string;
|
|
18
|
+
};
|
|
19
|
+
linkSignUp?: {
|
|
20
|
+
link: string;
|
|
21
|
+
text: string;
|
|
22
|
+
};
|
|
18
23
|
}
|
|
19
24
|
export declare const FormLogin: React.FC<FormLoginProps>;
|
|
20
25
|
export {};
|
package/lib/FormLogin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{B as r}from"./Button-B93Rn5W6.js";import{F as i}from"./Form-CgTuTB2Q.js";import{G as t}from"./Grid-DZqidZrf.js";import{I as n}from"./Input-EbrliieY.js";import{T as a}from"./TextBox-__k4jPYK.js";import{s
|
|
1
|
+
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{B as r}from"./Button-B93Rn5W6.js";import{F as i}from"./Form-CgTuTB2Q.js";import{G as t}from"./Grid-DZqidZrf.js";import{I as n}from"./Input-EbrliieY.js";import{T as a}from"./TextBox-__k4jPYK.js";import{s as l}from"./style-inject.es-CrVRO2OA.js";import"react";import"./Loader-BPh2L4dp.js";import"./LoaderDots-BoEg_zlZ.js";import"./index-uD0K440h.js";var s={n23mFormLogin:"FormLogin-module_n23mFormLogin__1mOEk",loginWrapper:"FormLogin-module_loginWrapper__HOEgv"};l("@layer n23mFormLogin{.FormLogin-module_n23mFormLogin__1mOEk{.FormLogin-module_loginWrapper__HOEgv{corner-shape:squircle;background-color:#fff;border:1px solid grey;border-radius:12px}}}");const m=({className:l,style:m,onSubmit:p,isPending:d,isError:c,isSuccess:g,errorMsg:x,successMsg:h,onNavigate:u,linkMainPage:f,linkForgotPassword:v,linkSignUp:y,...b})=>{const k=e=>{u?u(e):window.location.href=e};return e("div",{className:[s.n23mFormLogin,"n23mFormLogin",l].filter(Boolean).join(" "),...b,style:{...m},children:e(t,{layout:"flex",flexWrap:"wrap",justifyContent:"center",alignItems:"center",widthMax:"1400px",minHeight:"calc(100dvb - 100px)",children:o(t,{layout:"container",minHeight:0,widthMin:"min(450px, calc(100% - 40px))",padding:"20px",margin:"20px",className:s.loginWrapper,children:[f&&e(a,{desktopSize:20,mobileSize:20,fontWeight:500,tag:"a",href:f.link,color:"grey",colorHover:"var(--n23mTextBoxColorHover, black)",onClick:e=>{e.preventDefault(),k("/")},children:f.text}),e(a,{tag:"h3",desktopSize:14,mobileSize:14,fontWeight:500,margin:"12px 0 18px",children:"Good to see you!"}),o(i,{onSubmit:p,isError:c,isPending:d,isSuccess:g,errorMsg:x,successMsg:h,children:[e(n,{validatorOptions:[{type:"empty"},{type:"email"}],label:"Email",name:"email",type:"text",placeholder:"Email"}),e(n,{label:"Password",type:"password",name:"pass",validatorOptions:[{type:"empty"}],placeholder:"Password"}),o(t,{layout:"flex",justifyContent:"space-between",alignItems:"flex-start",children:[e(r,{type:"submit",disabled:d,height:"40px",width:"80px",padding:0,backgroundColor:"orangered",backgroundColorDisabled:"grey",children:e(a,{tag:"span",desktopSize:16,mobileSize:16,fontWeight:400,color:"white",children:"LOG IN"})}),o("div",{children:[v&&e("div",{children:e(a,{tag:"a",href:v.text,desktopSize:12,mobileSize:12,fontWeight:400,color:"var(--n23mTextBoxColor, orangered)",colorHover:"var(--n23mTextBoxColorHover, black)",onClick:e=>{e.preventDefault(),k(v.text)},children:v.text})}),y&&e(t,{layout:"flex",justifyContent:"right",children:e(a,{tag:"a",href:y.text,desktopSize:12,mobileSize:12,fontWeight:400,color:"var(--n23mTextBoxColor, orangered)",colorHover:"var(--n23mTextBoxColorHover, black)",onClick:e=>{e.preventDefault(),k(y.text)},children:"sign up"})})]})]})]})]})})})};m.displayName="FormLogin";export{m as FormLogin};
|