najwer23morsels 1.5.0 → 1.7.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # najwer23morsels
2
2
 
3
+ ## 1.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - ButtonCopy
8
+
9
+ ## 1.6.0
10
+
11
+ ### Minor Changes
12
+
13
+ - FormSignUp
14
+
3
15
  ## 1.5.0
4
16
 
5
17
  ### Minor Changes
@@ -1,9 +1,9 @@
1
- interface CopyButtonProps extends React.HTMLAttributes<HTMLDivElement> {
1
+ interface ButtonCopyProps extends React.HTMLAttributes<HTMLDivElement> {
2
2
  children?: React.ReactNode;
3
3
  style?: React.CSSProperties;
4
4
  backgroundColor?: string;
5
5
  color?: string;
6
6
  textToCopy: string;
7
7
  }
8
- export declare const CopyButton: React.FC<CopyButtonProps>;
8
+ export declare const ButtonCopy: React.FC<ButtonCopyProps>;
9
9
  export {};
@@ -0,0 +1,2 @@
1
+ import { ButtonCopy } from './ButtonCopy';
2
+ export { ButtonCopy };
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{useState as o,useRef as r,useCallback as e,useEffect as i}from"react";import{B as n}from"./Button-B93Rn5W6.js";import{T as c}from"./TextBox-__k4jPYK.js";import"./Loader-BPh2L4dp.js";import"./LoaderDots-BoEg_zlZ.js";import"./style-inject.es-CrVRO2OA.js";const l=({children:l,className:a,style:s,textToCopy:u,color:m="white",backgroundColor:p="orangered",...d})=>{const[h,x]=o(!1),g=r(null),j=e(()=>{g.current&&clearTimeout(g.current),navigator.clipboard.writeText(u),x(!0),g.current=setTimeout(()=>{x(!1),g.current=null},800)},[]);return i(()=>()=>{g.current&&clearTimeout(g.current)},[]),t("div",{className:["n23mCopyButton",a].filter(Boolean).join(" "),...d,children:t(n,{type:"button",padding:"0px 3px",height:"auto",width:"auto",backgroundColor:h?"#4BB543":p,onClick:j,children:l??t(c,{mobileSize:10,desktopSize:10,fontWeight:600,lineHeight:"17px",color:m,children:"Copy"})})})};l.displayName="CopyButton";export{l as CopyButton};
1
+ import{jsx as t}from"react/jsx-runtime";import{useState as o,useRef as r,useCallback as e,useEffect as i}from"react";import{B as n}from"./Button-B93Rn5W6.js";import{T as c}from"./TextBox-__k4jPYK.js";import"./Loader-BPh2L4dp.js";import"./LoaderDots-BoEg_zlZ.js";import"./style-inject.es-CrVRO2OA.js";const l=({children:l,className:a,style:s,textToCopy:u,color:m="white",backgroundColor:p="orangered",...d})=>{const[h,x]=o(!1),g=r(null),j=e(()=>{g.current&&clearTimeout(g.current),navigator.clipboard.writeText(u),x(!0),g.current=setTimeout(()=>{x(!1),g.current=null},800)},[]);return i(()=>()=>{g.current&&clearTimeout(g.current)},[]),t("div",{className:["n23mButtonCopy",a].filter(Boolean).join(" "),...d,children:t(n,{type:"button",padding:"0px 3px",height:"auto",width:"auto",backgroundColor:h?"#4BB543":p,onClick:j,children:l??t(c,{mobileSize:10,desktopSize:10,fontWeight:600,lineHeight:"17px",color:m,children:"Copy"})})})};l.displayName="ButtonCopy";export{l as ButtonCopy};
@@ -0,0 +1,22 @@
1
+ import { type FormType } from '../Form';
2
+ interface FormSignUpProps 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
+ linkLogin?: {
17
+ link: string;
18
+ text: string;
19
+ };
20
+ }
21
+ export declare const FormSignUp: React.FC<FormSignUpProps>;
22
+ export {};
@@ -0,0 +1,2 @@
1
+ import { FormSignUp } from './FormSignUp';
2
+ export { FormSignUp };
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{B as o}from"./Button-B93Rn5W6.js";import{F as i}from"./Form-CgTuTB2Q.js";import{G as n}from"./Grid-DZqidZrf.js";import{I as t}from"./Input-EbrliieY.js";import{T as a}from"./TextBox-__k4jPYK.js";import{s}from"./style-inject.es-CrVRO2OA.js";import"react";import"./Loader-BPh2L4dp.js";import"./LoaderDots-BoEg_zlZ.js";import"./index-uD0K440h.js";var l={n23mFormSignUp:"FormSignUp-module_n23mFormSignUp__p9dT2",signUpWrapper:"FormSignUp-module_signUpWrapper__PcjYN"};s("@layer n23mFormSignUp{.FormSignUp-module_n23mFormSignUp__p9dT2{.FormSignUp-module_signUpWrapper__PcjYN{corner-shape:squircle;background-color:#fff;border:1px solid grey;border-radius:12px}}}");const p=({className:s,style:p,onSubmit:m,isPending:d,isError:c,isSuccess:g,errorMsg:h,successMsg:x,onNavigate:u,footerHeight:f="100px",linkMainPage:S,linkLogin:y,...b})=>{const k=e=>{u?u(e):window.location.href=e};return e("div",{className:[l.n23mFormSignUp,"n23mFormSignUp",s].filter(Boolean).join(" "),...b,style:{...p},children:e(n,{layout:"flex",flexWrap:"wrap",justifyContent:"center",alignItems:"center",widthMax:"1400px",minHeight:`calc(100dvb - ${f})`,children:r(n,{layout:"container",minHeight:0,widthMin:"min(450px, calc(100% - 40px))",padding:"20px",margin:"20px",className:l.signUpWrapper,children:[S&&e(a,{desktopSize:20,mobileSize:20,fontWeight:500,tag:"a",href:S.link,color:"grey",colorHover:"var(--n23mTextBoxColorHover, black)",onClick:e=>{e.preventDefault(),k(S.link)},children:S.text}),e(a,{tag:"h3",desktopSize:14,mobileSize:14,fontWeight:500,margin:"12px 0 18px",children:"Create an account now!"}),r(i,{onSubmit:m,isError:c,isPending:d,isSuccess:g,errorMsg:h,successMsg:x,children:[e(t,{validatorOptions:[{type:"empty"},{type:"email"}],label:"Email",name:"email",type:"text",placeholder:"Email"}),e(t,{label:"Password",type:"password",name:"pass",validatorOptions:[{type:"empty"}],placeholder:"Password"}),r(n,{layout:"flex",justifyContent:"space-between",alignItems:"flex-start",children:[e(o,{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:"SIGN UP"})}),y&&e("div",{children:e(a,{tag:"a",href:y.link,desktopSize:12,mobileSize:12,fontWeight:400,color:"var(--n23mTextBoxColor, orangered)",colorHover:"var(--n23mTextBoxColorHover, black)",onClick:e=>{e.preventDefault(),k(y.link)},children:y.text})})]})]})]})})})};p.displayName="FormSignUp";export{p as FormSignUp};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "najwer23morsels",
3
- "version": "1.5.0",
3
+ "version": "1.7.0",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./lib/index.mjs",
6
6
  "types": "./lib/index.d.ts",
@@ -1,2 +0,0 @@
1
- import { CopyButton } from './CopyButton';
2
- export { CopyButton };