@zydon/common 2.4.92 → 2.4.93

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.
@@ -1,4 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+ import { StackProps } from '@mui/material/Stack';
2
4
 
3
5
  interface PasswordRulesProps {
4
6
  password: string;
@@ -9,8 +11,11 @@ interface PasswordRulesProps {
9
11
  match?: {
10
12
  passwordMatch?: boolean;
11
13
  };
14
+ title?: ReactNode;
15
+ containerProps?: StackProps;
16
+ theme?: 'light' | 'dark';
12
17
  }
13
18
 
14
- declare const PasswordRules: ({ password, passwordSize, numberChar, specialCharacter, upperCaseChar, match, }: PasswordRulesProps) => react_jsx_runtime.JSX.Element;
19
+ declare const PasswordRules: ({ password, passwordSize, numberChar, specialCharacter, upperCaseChar, match, title, theme, containerProps, }: PasswordRulesProps) => react_jsx_runtime.JSX.Element;
15
20
 
16
21
  export { PasswordRules as default };
@@ -2,10 +2,10 @@ import { d } from '../../chunk-KOELUX3V.js';
2
2
  import { a as a$1 } from '../../chunk-GEGVRJQE.js';
3
3
  import '../../chunk-XELLQQ2N.js';
4
4
  import a from '@mui/material/Typography';
5
- import l from '@mui/material/Stack';
5
+ import i from '@mui/material/Stack';
6
6
  import { styled, alpha } from '@mui/material/styles';
7
7
  import { jsxs, jsx } from 'react/jsx-runtime';
8
8
 
9
- var R=styled(l)(({theme:r})=>({width:"100%",border:`solid 1px ${alpha(r.palette.grey[500],.32)}`,padding:16,borderRadius:8,gap:8})),y=styled(l)(()=>({gap:4})),s=styled(l)(({theme:r})=>({flexDirection:"row",alignItems:"center",gap:8,color:r.palette.text.secondary,div:{fontSize:12},strong:{fontWeight:700,color:r.palette.text.primary}}));var n=({passed:r})=>r?jsx(a$1,{icon:"SIMPLE_CHECK",color:"success.main"}):jsx(a$1,{icon:"WARNING_TRIANGULE",color:"warning.main"}),I=({password:r,passwordSize:t,numberChar:c=!1,specialCharacter:d$1=!1,upperCaseChar:m=!1,match:u})=>{let{hasSpecialCharacter:h,hasUpperCaseChar:f,isLengthValid:P,hasNumberChar:v}=d(r,t,c,d$1,m);return jsxs(R,{children:[jsx(a,{color:"text.secondary",variant:"body2",children:"Sua senha deve conter:"}),jsxs(y,{children:[jsxs(s,{children:[jsx(n,{passed:P}),jsxs(a,{component:"div",children:[jsxs("strong",{children:[t[0],"-",t[1]]})," ","caracteres"]})]}),m&&jsxs(s,{children:[jsx(n,{passed:f}),jsxs(a,{component:"div",children:["Pelo menos uma ",jsx("strong",{children:"letra mai\xFAscula"})]})]}),c&&jsxs(s,{children:[jsx(n,{passed:v}),jsxs(a,{component:"div",children:["Pelo menos ",jsx("strong",{children:"um n\xFAmero"})]})]}),d$1&&jsxs(s,{children:[jsx(n,{passed:h}),jsxs(a,{component:"div",children:["Pelo menos um ",jsx("strong",{children:"caracter especial"})," ",jsx("span",{children:"(#,@,!,?)"})]})]}),u&&jsxs(s,{children:[jsx(n,{passed:u.passwordMatch}),jsx(a,{component:"div",children:"Senha e confirma\xE7\xE3o de senha devem ser iguais"})]})]})]})},L=I;
9
+ var R=styled(i)(({theme:e})=>({width:"100%",borderColor:`${alpha(e.palette.grey[500],.32)}`,padding:16,borderRadius:8,gap:8})),y=styled(i)(()=>({gap:4})),t=styled(i,{shouldForwardProp:e=>e!=="themeColor"})(({theme:e,themeColor:s})=>({flexDirection:"row",alignItems:"center",gap:8,color:s==="light"?e.palette.text.secondary:e.palette.common.white,div:{fontSize:12},strong:{fontWeight:700,color:s==="light"?e.palette.text.primary:e.palette.common.white}}));var l=({passed:e})=>e?jsx(a$1,{icon:"SIMPLE_CHECK",color:"success.main"}):jsx(a$1,{icon:"WARNING_TRIANGULE",color:"warning.main"}),I=({password:e,passwordSize:s,numberChar:d$1=!1,specialCharacter:m=!1,upperCaseChar:g=!1,match:u,title:f="Sua senha deve conter:",theme:n="light",containerProps:P})=>{let{hasSpecialCharacter:C,hasUpperCaseChar:v,isLengthValid:T,hasNumberChar:w}=d(e,s,d$1,m,g);return jsxs(R,{border:"1px solid",...P,children:[f&&jsx(a,{color:"text.secondary",variant:"body2",children:"Sua senha deve conter:"}),jsxs(y,{children:[jsxs(t,{themeColor:n,children:[jsx(l,{passed:T}),jsxs(a,{component:"div",children:[jsxs("strong",{children:[s[0],"-",s[1]]})," ","caracteres"]})]}),g&&jsxs(t,{themeColor:n,children:[jsx(l,{passed:v}),jsxs(a,{component:"div",children:["Pelo menos uma ",jsx("strong",{children:"letra mai\xFAscula"})]})]}),d$1&&jsxs(t,{themeColor:n,children:[jsx(l,{passed:w}),jsxs(a,{component:"div",children:["Pelo menos ",jsx("strong",{children:"um n\xFAmero"})]})]}),m&&jsxs(t,{themeColor:n,children:[jsx(l,{passed:C}),jsxs(a,{component:"div",children:["Pelo menos um ",jsx("strong",{children:"caracter especial"})," ",jsx("span",{children:"(#,@,!,?)"})]})]}),u&&jsxs(t,{themeColor:n,children:[jsx(l,{passed:u.passwordMatch}),jsx(a,{component:"div",children:"Senha e confirma\xE7\xE3o de senha devem ser iguais"})]})]})]})},G=I;
10
10
 
11
- export { L as default };
11
+ export { G as default };
@@ -443,7 +443,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
443
443
  wordWrap?: csstype.Property.WordWrap | readonly NonNullable<csstype.Property.WordWrap | undefined>[] | readonly csstype.Property.WordWrap[] | undefined;
444
444
  writingMode?: csstype.Property.WritingMode | readonly NonNullable<csstype.Property.WritingMode | undefined>[] | readonly csstype.Property.WritingMode[] | undefined;
445
445
  zIndex?: csstype.Property.ZIndex | readonly NonNullable<csstype.Property.ZIndex | undefined>[] | readonly ((string & {}) | csstype.Globals | "auto")[] | undefined;
446
- zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reset")[] | undefined;
446
+ zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ("reset" | (string & {}) | csstype.Globals | "normal")[] | undefined;
447
447
  all?: csstype.Globals | readonly NonNullable<csstype.Globals | undefined>[] | readonly csstype.Globals[] | undefined;
448
448
  animation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "auto" | "none" | "both" | "alternate" | "alternate-reverse" | "backwards" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
449
449
  animationRange?: csstype.Property.AnimationRange<string | number> | readonly NonNullable<csstype.Property.AnimationRange<string | number> | undefined>[] | readonly (string | (string & {}))[] | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zydon/common",
3
- "version": "2.4.92",
3
+ "version": "2.4.93",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",