najwer23morsels 1.4.0 → 1.4.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.
@@ -0,0 +1,18 @@
1
+ import { type FormType } from '../Form';
2
+ interface FormForgotPassOtpProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSubmit'> {
3
+ style?: React.CSSProperties;
4
+ onSubmit: (formData: FormType) => void;
5
+ isError: boolean;
6
+ isPending: boolean;
7
+ isSuccess: boolean;
8
+ errorMsg: string | null | undefined;
9
+ successMsg: string | null | undefined;
10
+ onNavigate?: (path: string) => void;
11
+ footerHeight?: string;
12
+ linkMainPage?: {
13
+ link: string;
14
+ text: string;
15
+ };
16
+ }
17
+ export declare const FormForgotPassOtp: React.FC<FormForgotPassOtpProps>;
18
+ export {};
@@ -0,0 +1,2 @@
1
+ import { FormForgotPassOtp } from './FormForgotPassOtp';
2
+ export { FormForgotPassOtp };
@@ -0,0 +1 @@
1
+ import{jsx as r,jsxs as o}from"react/jsx-runtime";import{useRef as e}from"react";import{B as t}from"./Button-B93Rn5W6.js";import{F as s}from"./Form-CgTuTB2Q.js";import{G as a}from"./Grid-DZqidZrf.js";import{I as n}from"./Input-EbrliieY.js";import{T as i}from"./TextBox-__k4jPYK.js";import{s as p}from"./style-inject.es-CrVRO2OA.js";import"./Loader-BPh2L4dp.js";import"./LoaderDots-BoEg_zlZ.js";import"./index-uD0K440h.js";var l={n23mFormForgotPassOtp:"FormForgotPassOtp-module_n23mFormForgotPassOtp__898ki",forogotPasswordOtpWrapper:"FormForgotPassOtp-module_forogotPasswordOtpWrapper__3s-uz"};p("@layer n23mFormForgotPassOtp{.FormForgotPassOtp-module_n23mFormForgotPassOtp__898ki{.FormForgotPassOtp-module_forogotPasswordOtpWrapper__3s-uz{corner-shape:squircle;background-color:#fff;border:1px solid grey;border-radius:12px}}}");const m=({className:p,style:m,onSubmit:c,isPending:d,isError:u,isSuccess:g,errorMsg:f,successMsg:h,onNavigate:F,footerHeight:w="100px",linkMainPage:b,...x})=>{const y=e(null),v=e(null),P=e(!1);return r("div",{className:[l.n23mFormForgotPassOtp,"n23mFormForgotPassOtp",p].filter(Boolean).join(" "),...x,style:{...m},children:r(a,{layout:"flex",flexWrap:"wrap",justifyContent:"center",alignItems:"center",widthMax:"1400px",minHeight:`calc(100dvb - ${w})`,children:o(a,{layout:"container",minHeight:0,widthMin:"min(450px, calc(100% - 40px))",padding:"20px",margin:"20px",className:l.forogotPasswordOtpWrapper,children:[b&&r(i,{desktopSize:20,mobileSize:20,fontWeight:500,tag:"a",href:b.link,color:"grey",colorHover:"var(--n23mTextBoxColorHover, black)",onClick:r=>{var o;r.preventDefault(),o=b.link,F?F(o):window.location.href=o},children:b.text}),r(i,{tag:"h3",desktopSize:14,mobileSize:14,fontWeight:500,margin:"12px 0 18px",children:"Change password"}),o(s,{onSubmit:c,isError:u,isPending:d,isSuccess:g,errorMsg:f,successMsg:h,children:[r(n,{inputRef:y,label:"New password",type:"password",name:"pass",validatorOptions:[{type:"empty"},{type:"equal",options:{ref:v}}],placeholder:"New password",onBlur:()=>{P.current||y.current?.value&&v.current?.value&&(P.current=!0,v.current?.dispatchEvent(new FocusEvent("focusout",{bubbles:!0})),P.current=!1)}}),r(n,{inputRef:v,label:"Confirm new password",type:"password",name:"confirmPass",validatorOptions:[{type:"empty"},{type:"equal",options:{ref:y}}],placeholder:"Confirm new password",onBlur:()=>{P.current||y.current?.value&&v.current?.value&&(P.current=!0,y.current?.dispatchEvent(new FocusEvent("focusout",{bubbles:!0})),P.current=!1)}}),r(t,{type:"submit",disabled:d,height:"40px",width:"80px",padding:0,backgroundColor:"orangered",backgroundColorDisabled:"grey",children:r(i,{tag:"span",desktopSize:16,mobileSize:16,fontWeight:400,color:"white",children:"SEND"})})]})]})})})};m.displayName="FormForgotPassOtp";export{m as FormForgotPassOtp};
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 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:f,linkMainPage:u,linkForgotPassword:v,linkSignUp:y,footerHeight:b="100px",...k})=>{const j=e=>{f?f(e):window.location.href=e};return e("div",{className:[s.n23mFormLogin,"n23mFormLogin",l].filter(Boolean).join(" "),...k,style:{...m},children:e(t,{layout:"flex",flexWrap:"wrap",justifyContent:"center",alignItems:"center",widthMax:"1400px",minHeight:`calc(100dvb - ${b})`,children:o(t,{layout:"container",minHeight:0,widthMin:"min(450px, calc(100% - 40px))",padding:"20px",margin:"20px",className:s.loginWrapper,children:[u&&e(a,{desktopSize:20,mobileSize:20,fontWeight:500,tag:"a",href:u.link,color:"grey",colorHover:"var(--n23mTextBoxColorHover, black)",onClick:e=>{e.preventDefault(),j("/")},children:u.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(),j(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(),j(y.text)},children:"sign up"})})]})]})]})]})})})};m.displayName="FormLogin";export{m as FormLogin};
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 l}from"./TextBox-__k4jPYK.js";import{s as a}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"};a("@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:a,style:m,onSubmit:d,isPending:p,isError:c,isSuccess:g,errorMsg:h,successMsg:x,onNavigate:f,linkMainPage:u,linkForgotPassword:k,linkSignUp:v,footerHeight:y="100px",...b})=>{const j=e=>{f?f(e):window.location.href=e};return e("div",{className:[s.n23mFormLogin,"n23mFormLogin",a].filter(Boolean).join(" "),...b,style:{...m},children:e(t,{layout:"flex",flexWrap:"wrap",justifyContent:"center",alignItems:"center",widthMax:"1400px",minHeight:`calc(100dvb - ${y})`,children:o(t,{layout:"container",minHeight:0,widthMin:"min(450px, calc(100% - 40px))",padding:"20px",margin:"20px",className:s.loginWrapper,children:[u&&e(l,{desktopSize:20,mobileSize:20,fontWeight:500,tag:"a",href:u.link,color:"grey",colorHover:"var(--n23mTextBoxColorHover, black)",onClick:e=>{e.preventDefault(),j("/")},children:u.text}),e(l,{tag:"h3",desktopSize:14,mobileSize:14,fontWeight:500,margin:"12px 0 18px",children:"Good to see you!"}),o(i,{onSubmit:d,isError:c,isPending:p,isSuccess:g,errorMsg:h,successMsg:x,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:p,height:"40px",width:"80px",padding:0,backgroundColor:"orangered",backgroundColorDisabled:"grey",children:e(l,{tag:"span",desktopSize:16,mobileSize:16,fontWeight:400,color:"white",children:"LOG IN"})}),o("div",{children:[k&&e("div",{children:e(l,{tag:"a",href:k.link,desktopSize:12,mobileSize:12,fontWeight:400,color:"var(--n23mTextBoxColor, orangered)",colorHover:"var(--n23mTextBoxColorHover, black)",onClick:e=>{e.preventDefault(),j(k.link)},children:k.text})}),v&&e(t,{layout:"flex",justifyContent:"right",children:e(l,{tag:"a",href:v.link,desktopSize:12,mobileSize:12,fontWeight:400,color:"var(--n23mTextBoxColor, orangered)",colorHover:"var(--n23mTextBoxColorHover, black)",onClick:e=>{e.preventDefault(),j(v.link)},children:v.text})})]})]})]})]})})})};m.displayName="FormLogin";export{m as FormLogin};
@@ -22,7 +22,7 @@ type ValidatorOption = {
22
22
  } | {
23
23
  type: 'equal';
24
24
  options: {
25
- ref: React.RefObject<HTMLInputElement>;
25
+ ref: React.RefObject<HTMLInputElement | null>;
26
26
  };
27
27
  } | {
28
28
  type: 'existsInOptions';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "najwer23morsels",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./lib/index.mjs",
6
6
  "types": "./lib/index.d.ts",