@s_mart/telas-de-acesso 7.0.1 → 7.0.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.
Files changed (2) hide show
  1. package/dist/index.mjs +21 -21
  2. package/package.json +12 -11
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import{LIcon as Ve,Typography as Xe}from"@s_mart/core";import{telefone as Ae}from"@s_mart/masks";import{lineWhatsApp as Qe}from"@s_mart/regular-icons";import{toRem as p}from"@s_mart/utils";import B from"@emotion/styled";import{colorPalette as He}from"@s_mart/tokens";var ae=B.div`
1
+ import{LIcon as Ve}from"@s_mart/core";import{Typography as Xe}from"@mui/material";import{telefone as Ae}from"@s_mart/masks";import{lineWhatsApp as Qe}from"@s_mart/regular-icons";import{toRem as p}from"@s_mart/utils";import B from"@emotion/styled";import{colorPalette as He}from"@s_mart/tokens";var ae=B.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  align-items: center;
@@ -75,7 +75,7 @@ import{LIcon as Ve,Typography as Xe}from"@s_mart/core";import{telefone as Ae}fro
75
75
  margin: ${p(16)};
76
76
 
77
77
  background-color: ${({theme:e})=>e.palette.common.white};
78
- `,ne=B.button`
78
+ `,ie=B.button`
79
79
  position: relative;
80
80
  z-index: 2;
81
81
 
@@ -99,48 +99,48 @@ import{LIcon as Ve,Typography as Xe}from"@s_mart/core";import{telefone as Ae}fro
99
99
  color: ${He.green[300]};
100
100
  }
101
101
  }
102
- `;import{jsx as q,jsxs as H}from"react/jsx-runtime";function d({children:e,whatsapp:t,textoChamativo:r,style:n,paperStyle:a,ilustracao:i}){return H(ae,{style:n,children:[r&&q(oe,{children:r}),i&&q(te,{children:typeof i=="string"?q("img",{src:i,alt:"Logo do sistema"}):i}),q(re,{style:a,children:e}),t&&H(ne,{onClick:()=>{window.open(`https://api.whatsapp.com/send?phone=${t}`)},style:{marginBottom:16},children:[H(Xe,{variant:"bodyXS",children:["Com d\xFAvidas? ",Ae.format(t.slice(2))]}),q(Ve,{icon:Qe,size:"20px",removeMargin:!0})]})]})}import{Button as Ue,LIcon as V,Typography as M}from"@s_mart/core";import{Checkbox as Oe,Form as Je,TextField as N}from"@s_mart/form";import{required as ce}from"@s_mart/rules";import{lineCheck as X}from"@s_mart/regular-icons";import{colorPalette as R}from"@s_mart/tokens";import S from"@emotion/styled";import{toRem as l}from"@s_mart/utils";var ie=S.div`
102
+ `;import{jsx as q,jsxs as H}from"react/jsx-runtime";function d({children:e,whatsapp:t,textoChamativo:r,style:i,paperStyle:a,ilustracao:n}){return H(ae,{style:i,children:[r&&q(oe,{children:r}),n&&q(te,{children:typeof n=="string"?q("img",{src:n,alt:"Logo do sistema"}):n}),q(re,{style:a,children:e}),t&&H(ie,{onClick:()=>{window.open(`https://api.whatsapp.com/send?phone=${t}`)},style:{marginBottom:16},children:[H(Xe,{variant:"bodyXS",children:["Com d\xFAvidas? ",Ae.format(t.slice(2))]}),q(Ve,{icon:Qe,size:"20px",removeMargin:!0})]})]})}import{Button as Ue,LIcon as V}from"@s_mart/core";import{Checkbox as Oe,Form as Je,TextField as N}from"@s_mart/form";import{Typography as M}from"@mui/material";import{required as ce}from"@s_mart/rules";import{lineCheck as X}from"@s_mart/regular-icons";import{colorPalette as R}from"@s_mart/tokens";import S from"@emotion/styled";import{toRem as m}from"@s_mart/utils";var ne=S.div`
103
103
  display: grid;
104
- gap: ${l(32)};
104
+ gap: ${m(32)};
105
105
  `,se=S.header`
106
106
  display: grid;
107
107
  text-align: center;
108
- gap: ${l(16)};
108
+ gap: ${m(16)};
109
109
  `,pe=S.div`
110
110
  display: grid;
111
- gap: ${l(32)};
111
+ gap: ${m(32)};
112
112
  `,de=S.div`
113
113
  display: grid;
114
- gap: ${l(4)};
114
+ gap: ${m(4)};
115
115
 
116
116
  > div:first-of-type {
117
117
  display: grid;
118
118
  grid-template-columns: 1fr 1fr;
119
- gap: ${l(16)};
119
+ gap: ${m(16)};
120
120
 
121
121
  @media (max-width: 768px) {
122
122
  grid-template-columns: 1fr;
123
- gap: ${l(8)};
123
+ gap: ${m(8)};
124
124
  }
125
125
  }
126
126
 
127
127
  > div:last-of-type {
128
128
  display: grid;
129
- gap: ${l(4)};
129
+ gap: ${m(4)};
130
130
  }
131
- `,le=S.div`
131
+ `,me=S.div`
132
132
  display: flex;
133
133
  flex-wrap: wrap;
134
- gap: ${l(8)};
134
+ gap: ${m(8)};
135
135
  `,D=S.div`
136
136
  display: flex;
137
137
  align-items: center;
138
- gap: ${l(4)};
138
+ gap: ${m(4)};
139
139
 
140
140
  color: ${R.neutral[600]};
141
141
  border: 1px solid ${R.neutral[600]};
142
- border-radius: ${l(4)};
143
- padding: ${l(3)} ${l(4)};
142
+ border-radius: ${m(4)};
143
+ padding: ${m(3)} ${m(4)};
144
144
 
145
145
  line-height: 1em;
146
146
  vertical-align: middle;
@@ -149,7 +149,7 @@ import{LIcon as Ve,Typography as Xe}from"@s_mart/core";import{telefone as Ae}fro
149
149
  color: ${R.green[300]};
150
150
  border-color: ${R.green[300]};
151
151
  `}}
152
- `;function me(){let e=a=>a?a.match(/[a-z]/i):!1,t=a=>a?a.match(/[0-9]/i):!1,r=a=>a?a.length>=6:!1;return{senhaContemLetra:e,senhaContemNumero:t,senhaContemMinimoDe6Caracteres:r,desabilitarBotaoDeCadastro:a=>!a.email||!a.senha||!a.confirmarSenha||!a.termosDeUso||!e(a.senha)||!t(a.senha)||!r(a.senha)}}import{jsx as o,jsxs as m}from"react/jsx-runtime";function Ge({logo:e,nomeSistema:t,onSubmit:r,linkTermosDeUso:n,email:a,nome:i,...x}){let{senhaContemLetra:b,senhaContemNumero:h,senhaContemMinimoDe6Caracteres:T,desabilitarBotaoDeCadastro:L}=me();return o(d,{...x,children:m(ie,{children:[m(se,{children:[e&&o("div",{children:typeof e=="string"?o("img",{src:e,alt:"Logo do sistema"}):e}),m(M,{variant:"titleSM",children:["Vamos cadastrar uma senha de acesso ao ",t,"."]})]}),o(Je,{onSubmit:r,defaultValues:{email:a,nome:i,termosDeUso:!1},children:({watch:g})=>{let Y=b(g("senha")),Z=h(g("senha")),j=T(g("senha"));return m(pe,{children:[o(N,{name:"email",label:"E-mail de acesso",required:!0,disabled:!0}),o(N,{name:"nome",label:"Nome completo",required:!0,rules:ce}),m(de,{children:[m("div",{children:[o(N,{type:"password",name:"senha",label:"Senha de acesso",required:!0,rules:ce}),o(N,{type:"password",name:"confirmarSenha",label:"Confirme sua senha",required:!0,rules:{validate:ee=>{if(!ee)return"Campo obrigat\xF3rio";if(ee!==g("senha"))return"As senhas devem ser iguais"}}})]}),m("div",{children:[o(M,{variant:"bodyXS",children:"Sua senha precisa conter:"}),m(le,{children:[m(D,{checked:!!Y,children:[Y&&o(V,{icon:X,size:"16px",removeMargin:!0}),o(M,{variant:"bodyXS",children:"Uma letra"})]}),m(D,{checked:!!Z,children:[Z&&o(V,{icon:X,size:"16px",removeMargin:!0}),o(M,{variant:"bodyXS",children:"Um n\xFAmero"})]}),m(D,{checked:!!j,children:[j&&o(V,{icon:X,size:"16px",removeMargin:!0}),o(M,{variant:"bodyXS",children:"M\xEDnimo de 6 caracteres"})]})]})]})]}),o("div",{children:o(Oe,{name:"termosDeUso",label:m("div",{style:{display:"flex",gap:4},children:[o("span",{children:"Li e aceito os"}),o("a",{href:n,target:"_blank",style:{color:"var(--color-primary)"},rel:"noreferrer",children:"termos de uso"})]})})}),o("div",{children:o(Ue,{type:"submit",fullWidth:!0,disabled:L(g()),children:"Concluir meu cadastro"})})]})}})]})})}import{useMemo as Ke}from"react";import{Button as ye,Indicator as Ye,Typography as Ze}from"@s_mart/core";import{Checkbox as je,Form as ea,TextField as ge}from"@s_mart/form";import{composeValidators as aa,required as Ce,email as ta}from"@s_mart/rules";import{useCapsLock as oa,useMediaQuery as ra}from"@s_mart/hooks";import{colorPalette as na}from"@s_mart/tokens";import A from"@emotion/styled";import{toRem as F}from"@s_mart/utils";var ue=A.div`
152
+ `;function le(){let e=a=>a?a.match(/[a-z]/i):!1,t=a=>a?a.match(/[0-9]/i):!1,r=a=>a?a.length>=6:!1;return{senhaContemLetra:e,senhaContemNumero:t,senhaContemMinimoDe6Caracteres:r,desabilitarBotaoDeCadastro:a=>!a.email||!a.senha||!a.confirmarSenha||!a.termosDeUso||!e(a.senha)||!t(a.senha)||!r(a.senha)}}import{jsx as o,jsxs as l}from"react/jsx-runtime";function Ge({logo:e,nomeSistema:t,onSubmit:r,linkTermosDeUso:i,email:a,nome:n,...x}){let{senhaContemLetra:b,senhaContemNumero:h,senhaContemMinimoDe6Caracteres:T,desabilitarBotaoDeCadastro:L}=le();return o(d,{...x,children:l(ne,{children:[l(se,{children:[e&&o("div",{children:typeof e=="string"?o("img",{src:e,alt:"Logo do sistema"}):e}),l(M,{variant:"titleSM",children:["Vamos cadastrar uma senha de acesso ao ",t,"."]})]}),o(Je,{onSubmit:r,defaultValues:{email:a,nome:n,termosDeUso:!1},children:({watch:g})=>{let Y=b(g("senha")),Z=h(g("senha")),j=T(g("senha"));return l(pe,{children:[o(N,{name:"email",label:"E-mail de acesso",required:!0,disabled:!0}),o(N,{name:"nome",label:"Nome completo",required:!0,rules:ce}),l(de,{children:[l("div",{children:[o(N,{type:"password",name:"senha",label:"Senha de acesso",required:!0,rules:ce}),o(N,{type:"password",name:"confirmarSenha",label:"Confirme sua senha",required:!0,rules:{validate:ee=>{if(!ee)return"Campo obrigat\xF3rio";if(ee!==g("senha"))return"As senhas devem ser iguais"}}})]}),l("div",{children:[o(M,{variant:"bodyXS",children:"Sua senha precisa conter:"}),l(me,{children:[l(D,{checked:!!Y,children:[Y&&o(V,{icon:X,size:"16px",removeMargin:!0}),o(M,{variant:"bodyXS",children:"Uma letra"})]}),l(D,{checked:!!Z,children:[Z&&o(V,{icon:X,size:"16px",removeMargin:!0}),o(M,{variant:"bodyXS",children:"Um n\xFAmero"})]}),l(D,{checked:!!j,children:[j&&o(V,{icon:X,size:"16px",removeMargin:!0}),o(M,{variant:"bodyXS",children:"M\xEDnimo de 6 caracteres"})]})]})]})]}),o("div",{children:o(Oe,{name:"termosDeUso",label:l("div",{style:{display:"flex",gap:4},children:[o("span",{children:"Li e aceito os"}),o("a",{href:i,target:"_blank",style:{color:"var(--color-primary)"},rel:"noreferrer",children:"termos de uso"})]})})}),o("div",{children:o(Ue,{type:"submit",fullWidth:!0,disabled:L(g()),children:"Concluir meu cadastro"})})]})}})]})})}import{useMemo as Ke}from"react";import{Button as ye,Indicator as Ye}from"@s_mart/core";import{Checkbox as Ze,Form as je,TextField as ge}from"@s_mart/form";import{composeValidators as ea,required as Ce,email as aa}from"@s_mart/rules";import{useCapsLock as ta}from"@s_mart/hooks";import{colorPalette as oa}from"@s_mart/tokens";import{Typography as ra,useMediaQuery as ia}from"@mui/material";import A from"@emotion/styled";import{toRem as F}from"@s_mart/utils";var ue=A.div`
153
153
  display: grid;
154
154
  gap: ${F(32)};
155
155
  `,fe=A.header`
@@ -168,7 +168,7 @@ import{LIcon as Ve,Typography as Xe}from"@s_mart/core";import{telefone as Ae}fro
168
168
  > div:last-of-type {
169
169
  gap: ${F(8)};
170
170
  }
171
- `;import{jsx as c,jsxs as P}from"react/jsx-runtime";function ia({logo:e,initialValues:t,onSubmit:r,onEsqueciMinhaSenha:n,errorLabel:a,...i}){let x=typeof e=="string"?c("img",{src:e,alt:"Logo do sistema"}):e,b=oa(),h=ra("(max-width: 500px)"),T=Ke(()=>({manterConectado:!1,...t}),[t]);return c(d,{...i,paperStyle:{minWidth:h?void 0:456,width:h?"90%":void 0},children:P(ue,{children:[c(fe,{children:e&&c("div",{children:x})}),c(ea,{onSubmit:r,defaultValues:T,children:P(he,{children:[P("div",{children:[c(ge,{name:"email",label:"E-mail de acesso",required:!0,rules:aa([Ce,ta]),autoComplete:"email",type:"email"}),P("div",{children:[c(ge,{name:"senha",label:"Senha de acesso",type:"password",required:!0,rules:Ce}),b&&c(Ye,{severity:"warning",children:"Capslock ativado"}),!!a&&c(Ze,{variant:"titleXXS",color:na.red[300],children:a})]})]}),c(je,{name:"manterConectado",label:"Manter conectado"}),P("div",{children:[c(ye,{type:"submit",fullWidth:!0,children:"Entrar"}),n&&c(ye,{type:"button",fullWidth:!0,variant:"text",onClick:n,children:"Esqueci minha senha"})]})]})})]})})}import{Button as Se,LIcon as sa,Typography as $e}from"@s_mart/core";import{useMediaQuery as pa}from"@s_mart/hooks";import{colorPalette as U}from"@s_mart/tokens";import{lineWhatsApp as da}from"@s_mart/regular-icons";import ve from"@emotion/styled";import{toRem as Q}from"@s_mart/utils";var xe=ve.div`
171
+ `;import{jsx as c,jsxs as P}from"react/jsx-runtime";function na({logo:e,initialValues:t,onSubmit:r,onEsqueciMinhaSenha:i,errorLabel:a,...n}){let x=typeof e=="string"?c("img",{src:e,alt:"Logo do sistema"}):e,b=ta(),h=ia("(max-width: 500px)"),T=Ke(()=>({manterConectado:!1,...t}),[t]);return c(d,{...n,paperStyle:{minWidth:h?void 0:456,width:h?"90%":void 0},children:P(ue,{children:[c(fe,{children:e&&c("div",{children:x})}),c(je,{onSubmit:r,defaultValues:T,children:P(he,{children:[P("div",{children:[c(ge,{name:"email",label:"E-mail de acesso",required:!0,rules:ea([Ce,aa]),autoComplete:"email",type:"email"}),P("div",{children:[c(ge,{name:"senha",label:"Senha de acesso",type:"password",required:!0,rules:Ce}),b&&c(Ye,{severity:"warning",children:"Capslock ativado"}),!!a&&c(ra,{variant:"titleXXS",color:oa.red[300],children:a})]})]}),c(Ze,{name:"manterConectado",label:"Manter conectado"}),P("div",{children:[c(ye,{type:"submit",fullWidth:!0,children:"Entrar"}),i&&c(ye,{type:"button",fullWidth:!0,variant:"text",onClick:i,children:"Esqueci minha senha"})]})]})})]})})}import{Button as Se,LIcon as sa}from"@s_mart/core";import{Typography as $e}from"@mui/material";import{useMediaQuery as pa}from"@s_mart/hooks";import{colorPalette as U}from"@s_mart/tokens";import{lineWhatsApp as da}from"@s_mart/regular-icons";import ve from"@emotion/styled";import{toRem as Q}from"@s_mart/utils";var xe=ve.div`
172
172
  display: grid;
173
173
  gap: ${Q(32)};
174
174
 
@@ -180,7 +180,7 @@ import{LIcon as Ve,Typography as Xe}from"@s_mart/core";import{telefone as Ae}fro
180
180
  display: grid;
181
181
  text-align: center;
182
182
  gap: ${Q(16)};
183
- `;import{jsx as C,jsxs as k}from"react/jsx-runtime";function la({logo:e,onPrecisoDeAjuda:t,onRealizarAcesso:r,...n}){let a=typeof e=="string"?C("img",{src:e,alt:"Logo do sistema"}):e,i=pa("(max-width: 500px)");return C(d,{...n,paperStyle:{minWidth:i?void 0:456,width:i?"90%":void 0},children:k(xe,{children:[k("div",{children:[C(Te,{children:e&&C("div",{children:a})}),k("div",{style:{display:"flex",flexDirection:"column",textAlign:"center",gap:8,color:U.neutral[800]},children:[C($e,{variant:"bodyMD",children:"Parece que este convite j\xE1 foi usado ou expirou."}),C($e,{variant:"bodyMD",children:"J\xE1 se cadastrou? Realize o login."})]})]}),k("div",{children:[C(Se,{fullWidth:!0,onClick:r,children:"Realizar login"}),k(Se,{fullWidth:!0,variant:"text",onClick:t,style:{display:"flex",gap:4,color:U.neutral[900]},children:[C(sa,{icon:da,size:"20px",removeMargin:!0,color:U.neutral[900]}),"Preciso de outro convite"]})]})]})})}import{Button as ma,Typography as Me}from"@s_mart/core";import{useMediaQuery as ca}from"@s_mart/hooks";import be from"@emotion/styled";import{toRem as O}from"@s_mart/utils";var Be=be.div`
183
+ `;import{jsx as C,jsxs as k}from"react/jsx-runtime";function ma({logo:e,onPrecisoDeAjuda:t,onRealizarAcesso:r,...i}){let a=typeof e=="string"?C("img",{src:e,alt:"Logo do sistema"}):e,n=pa("(max-width: 500px)");return C(d,{...i,paperStyle:{minWidth:n?void 0:456,width:n?"90%":void 0},children:k(xe,{children:[k("div",{children:[C(Te,{children:e&&C("div",{children:a})}),k("div",{style:{display:"flex",flexDirection:"column",textAlign:"center",gap:8,color:U.neutral[800]},children:[C($e,{variant:"bodyMD",children:"Parece que este convite j\xE1 foi usado ou expirou."}),C($e,{variant:"bodyMD",children:"J\xE1 se cadastrou? Realize o login."})]})]}),k("div",{children:[C(Se,{fullWidth:!0,onClick:r,children:"Realizar login"}),k(Se,{fullWidth:!0,variant:"text",onClick:t,style:{display:"flex",gap:4,color:U.neutral[900]},children:[C(sa,{icon:da,size:"20px",removeMargin:!0,color:U.neutral[900]}),"Preciso de outro convite"]})]})]})})}import{Button as la}from"@s_mart/core";import{useMediaQuery as ca,Typography as Me}from"@mui/material";import be from"@emotion/styled";import{toRem as O}from"@s_mart/utils";var Be=be.div`
184
184
  display: grid;
185
185
  gap: ${O(32)};
186
186
 
@@ -192,7 +192,7 @@ import{LIcon as Ve,Typography as Xe}from"@s_mart/core";import{telefone as Ae}fro
192
192
  display: grid;
193
193
  text-align: center;
194
194
  gap: ${O(16)};
195
- `;import{jsx as v,jsxs as Fe}from"react/jsx-runtime";function ua({logo:e,onVoltarParaLogin:t,...r}){let n=typeof e=="string"?v("img",{src:e,alt:"Logo do sistema"}):e,a=ca("(max-width: 500px)");return v(d,{...r,paperStyle:{maxWidth:a?void 0:456,width:a?"90%":void 0},children:Fe(Be,{children:[Fe("div",{style:{display:"flex",flexDirection:"column",gap:24},children:[v(qe,{children:e&&v("div",{children:n})}),v(Me,{variant:"titleMD",textAlign:"center",children:"Instru\xE7\xF5es enviadas"}),v(Me,{variant:"bodySM",textAlign:"center",children:"Enviamos ao seu e-mail de acesso as instru\xE7\xF5es para criar uma nova senha. Verifique sua caixa de entrada e de Spam."})]}),v(ma,{fullWidth:!0,onClick:t,children:"Voltar para login"})]})})}import{Button as fa,LIcon as J,Typography as E}from"@s_mart/core";import{Form as ha,TextField as De}from"@s_mart/form";import{required as ya}from"@s_mart/rules";import{lineCheck as G}from"@s_mart/regular-icons";import{colorPalette as W}from"@s_mart/tokens";import $ from"@emotion/styled";import{toRem as u}from"@s_mart/utils";var Pe=$.div`
195
+ `;import{jsx as v,jsxs as Fe}from"react/jsx-runtime";function ua({logo:e,onVoltarParaLogin:t,...r}){let i=typeof e=="string"?v("img",{src:e,alt:"Logo do sistema"}):e,a=ca("(max-width: 500px)");return v(d,{...r,paperStyle:{maxWidth:a?void 0:456,width:a?"90%":void 0},children:Fe(Be,{children:[Fe("div",{style:{display:"flex",flexDirection:"column",gap:24},children:[v(qe,{children:e&&v("div",{children:i})}),v(Me,{variant:"titleMD",textAlign:"center",children:"Instru\xE7\xF5es enviadas"}),v(Me,{variant:"bodySM",textAlign:"center",children:"Enviamos ao seu e-mail de acesso as instru\xE7\xF5es para criar uma nova senha. Verifique sua caixa de entrada e de Spam."})]}),v(la,{fullWidth:!0,onClick:t,children:"Voltar para login"})]})})}import{Button as fa,LIcon as J}from"@s_mart/core";import{Typography as E}from"@mui/material";import{Form as ha,TextField as De}from"@s_mart/form";import{required as ya}from"@s_mart/rules";import{lineCheck as G}from"@s_mart/regular-icons";import{colorPalette as W}from"@s_mart/tokens";import $ from"@emotion/styled";import{toRem as u}from"@s_mart/utils";var Pe=$.div`
196
196
  display: grid;
197
197
  gap: ${u(32)};
198
198
  `,ke=$.header`
@@ -242,7 +242,7 @@ import{LIcon as Ve,Typography as Xe}from"@s_mart/core";import{telefone as Ae}fro
242
242
  color: ${W.green[300]};
243
243
  border-color: ${W.green[300]};
244
244
  `}}
245
- `;function Re(){let e=a=>a?a.match(/[a-z]/i):!1,t=a=>a?a.match(/[0-9]/i):!1,r=a=>a?a.length>=6:!1;return{senhaContemLetra:e,senhaContemNumero:t,senhaContemMinimoDe6Caracteres:r,desabilitarBotaoDeCadastro:a=>!a.senha||!a.confirmarSenha||!e(a.senha)||!t(a.senha)||!r(a.senha)}}import{jsx as s,jsxs as y}from"react/jsx-runtime";function ga({logo:e,onTrocarMinhaSenha:t,...r}){let{senhaContemLetra:n,senhaContemNumero:a,senhaContemMinimoDe6Caracteres:i,desabilitarBotaoDeCadastro:x}=Re();return s(d,{...r,children:y(Pe,{children:[y(ke,{children:[e&&s("div",{children:typeof e=="string"?s("img",{src:e,alt:"Logo do sistema"}):e}),s(E,{variant:"titleSM",children:"Vamos cadastrar uma nova senha de acesso."})]}),s(ha,{onSubmit:t,children:({watch:h})=>{let T=n(h("senha")),L=a(h("senha")),z=i(h("senha"));return y(Ee,{children:[y(we,{children:[y("div",{children:[s(De,{type:"password",name:"senha",label:"Senha de acesso",required:!0,rules:ya}),s(De,{type:"password",name:"confirmarSenha",label:"Confirme sua senha",required:!0,rules:{validate:g=>{if(!g)return"Campo obrigat\xF3rio";if(g!==h("senha"))return"As senhas devem ser iguais"}}})]}),y("div",{children:[s(E,{variant:"bodyXS",children:"Sua senha precisa conter:"}),y(Le,{children:[y(_,{checked:!!T,children:[T&&s(J,{icon:G,size:"16px",removeMargin:!0}),s(E,{variant:"bodyXS",children:"Uma letra"})]}),y(_,{checked:!!L,children:[L&&s(J,{icon:G,size:"16px",removeMargin:!0}),s(E,{variant:"bodyXS",children:"Um n\xFAmero"})]}),y(_,{checked:!!z,children:[z&&s(J,{icon:G,size:"16px",removeMargin:!0}),s(E,{variant:"bodyXS",children:"M\xEDnimo de 6 caracteres"})]})]})]})]}),s("div",{children:s(fa,{type:"submit",fullWidth:!0,disabled:x(h()),children:"Trocar minha senha"})})]})}})]})})}import{Button as Ie,Typography as ze}from"@s_mart/core";import{useMediaQuery as Ca}from"@s_mart/hooks";import K from"@emotion/styled";import{toRem as w}from"@s_mart/utils";var Ne=K.div`
245
+ `;function Re(){let e=a=>a?a.match(/[a-z]/i):!1,t=a=>a?a.match(/[0-9]/i):!1,r=a=>a?a.length>=6:!1;return{senhaContemLetra:e,senhaContemNumero:t,senhaContemMinimoDe6Caracteres:r,desabilitarBotaoDeCadastro:a=>!a.senha||!a.confirmarSenha||!e(a.senha)||!t(a.senha)||!r(a.senha)}}import{jsx as s,jsxs as y}from"react/jsx-runtime";function ga({logo:e,onTrocarMinhaSenha:t,...r}){let{senhaContemLetra:i,senhaContemNumero:a,senhaContemMinimoDe6Caracteres:n,desabilitarBotaoDeCadastro:x}=Re();return s(d,{...r,children:y(Pe,{children:[y(ke,{children:[e&&s("div",{children:typeof e=="string"?s("img",{src:e,alt:"Logo do sistema"}):e}),s(E,{variant:"titleSM",children:"Vamos cadastrar uma nova senha de acesso."})]}),s(ha,{onSubmit:t,children:({watch:h})=>{let T=i(h("senha")),L=a(h("senha")),z=n(h("senha"));return y(Ee,{children:[y(we,{children:[y("div",{children:[s(De,{type:"password",name:"senha",label:"Senha de acesso",required:!0,rules:ya}),s(De,{type:"password",name:"confirmarSenha",label:"Confirme sua senha",required:!0,rules:{validate:g=>{if(!g)return"Campo obrigat\xF3rio";if(g!==h("senha"))return"As senhas devem ser iguais"}}})]}),y("div",{children:[s(E,{variant:"bodyXS",children:"Sua senha precisa conter:"}),y(Le,{children:[y(_,{checked:!!T,children:[T&&s(J,{icon:G,size:"16px",removeMargin:!0}),s(E,{variant:"bodyXS",children:"Uma letra"})]}),y(_,{checked:!!L,children:[L&&s(J,{icon:G,size:"16px",removeMargin:!0}),s(E,{variant:"bodyXS",children:"Um n\xFAmero"})]}),y(_,{checked:!!z,children:[z&&s(J,{icon:G,size:"16px",removeMargin:!0}),s(E,{variant:"bodyXS",children:"M\xEDnimo de 6 caracteres"})]})]})]})]}),s("div",{children:s(fa,{type:"submit",fullWidth:!0,disabled:x(h()),children:"Trocar minha senha"})})]})}})]})})}import{Button as Ie}from"@s_mart/core";import{Typography as ze}from"@mui/material";import{useMediaQuery as Ca}from"@s_mart/hooks";import K from"@emotion/styled";import{toRem as w}from"@s_mart/utils";var Ne=K.div`
246
246
  display: grid;
247
247
  gap: ${w(32)};
248
248
 
@@ -262,4 +262,4 @@ import{LIcon as Ve,Typography as Xe}from"@s_mart/core";import{telefone as Ae}fro
262
262
  display: grid;
263
263
  gap: ${w(16)};
264
264
  }
265
- `;import{Form as va,TextField as xa}from"@s_mart/form";import{composeValidators as Ta,email as Sa,required as $a}from"@s_mart/rules";import{jsx as f,jsxs as I}from"react/jsx-runtime";function ba({logo:e,onVoltarParaLogin:t,onConfirmar:r,...n}){let a=typeof e=="string"?f("img",{src:e,alt:"Logo do sistema"}):e,i=Ca("(max-width: 500px)");return f(d,{...n,paperStyle:{minWidth:i?void 0:456,width:i?"90%":void 0},children:I(Ne,{children:[I("div",{style:{display:"flex",flexDirection:"column",gap:24},children:[f(We,{children:e&&f("div",{children:a})}),f(ze,{variant:"titleMD",textAlign:"center",children:"Esqueceu a senha?"}),f(ze,{variant:"bodySM",textAlign:"center",children:"Informe seu e-mail de acesso para receber instru\xE7\xF5es e criar uma nova senha."})]}),f(va,{onSubmit:r,children:I(_e,{children:[f("div",{children:f(xa,{name:"email",label:"E-mail de acesso",required:!0,rules:Ta([$a,Sa]),type:"email"})}),I("div",{children:[f(Ie,{fullWidth:!0,type:"submit",children:"Confirmar"}),f(Ie,{fullWidth:!0,onClick:t,variant:"neutral",children:"Voltar para login"})]})]})})]})})}export{Ge as TelaCadastro,la as TelaConviteExpirado,ba as TelaEsqueceuSenha,ua as TelaInstrucoesEnviadas,ia as TelaLogin,ga as TelaNovaSenha,d as TemplateTelaBase};
265
+ `;import{Form as va,TextField as xa}from"@s_mart/form";import{composeValidators as Ta,email as Sa,required as $a}from"@s_mart/rules";import{jsx as f,jsxs as I}from"react/jsx-runtime";function ba({logo:e,onVoltarParaLogin:t,onConfirmar:r,...i}){let a=typeof e=="string"?f("img",{src:e,alt:"Logo do sistema"}):e,n=Ca("(max-width: 500px)");return f(d,{...i,paperStyle:{minWidth:n?void 0:456,width:n?"90%":void 0},children:I(Ne,{children:[I("div",{style:{display:"flex",flexDirection:"column",gap:24},children:[f(We,{children:e&&f("div",{children:a})}),f(ze,{variant:"titleMD",textAlign:"center",children:"Esqueceu a senha?"}),f(ze,{variant:"bodySM",textAlign:"center",children:"Informe seu e-mail de acesso para receber instru\xE7\xF5es e criar uma nova senha."})]}),f(va,{onSubmit:r,children:I(_e,{children:[f("div",{children:f(xa,{name:"email",label:"E-mail de acesso",required:!0,rules:Ta([$a,Sa]),type:"email"})}),I("div",{children:[f(Ie,{fullWidth:!0,type:"submit",children:"Confirmar"}),f(Ie,{fullWidth:!0,onClick:t,variant:"neutral",children:"Voltar para login"})]})]})})]})})}export{Ge as TelaCadastro,ma as TelaConviteExpirado,ba as TelaEsqueceuSenha,ua as TelaInstrucoesEnviadas,na as TelaLogin,ga as TelaNovaSenha,d as TemplateTelaBase};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@s_mart/telas-de-acesso",
3
- "version": "7.0.1",
3
+ "version": "7.0.2",
4
4
  "main": "./dist/index.mjs",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.mts",
@@ -13,16 +13,17 @@
13
13
  "tsup": "8.0.2",
14
14
  "typescript": ">=5.4.2",
15
15
  "@types/react": ">=18.3.1",
16
+ "@mui/material": ">=5.15.11",
16
17
  "@types/react-dom": ">=18.3.0",
17
- "@s_mart/core": "7.0.0",
18
- "@s_mart/form": "7.0.1",
19
- "@s_mart/masks": "5.1.0",
18
+ "@s_mart/core": "7.0.1",
19
+ "@s_mart/form": "7.1.1",
20
+ "@s_mart/masks": "5.1.1",
20
21
  "@s_mart/rules": "5.1.1",
21
22
  "@s_mart/tokens": "5.1.0",
22
- "@s_mart/utils": "5.1.0",
23
+ "@s_mart/utils": "5.1.1",
23
24
  "@s_mart/regular-icons": "5.2.0",
24
25
  "eslint-config-smarten": "4.1.0",
25
- "@s_mart/hooks": "7.0.0"
26
+ "@s_mart/hooks": "7.0.1"
26
27
  },
27
28
  "peerDependencies": {
28
29
  "react": ">=18.3.1",
@@ -33,13 +34,13 @@
33
34
  "@types/react-dom": ">=18.3.0",
34
35
  "@emotion/react": "^11.11.4",
35
36
  "@emotion/styled": ">=11.11.5",
36
- "@s_mart/core": "7.0.0",
37
- "@s_mart/form": "7.0.1",
38
- "@s_mart/masks": "5.1.0",
37
+ "@s_mart/core": "7.0.1",
38
+ "@s_mart/form": "7.1.1",
39
+ "@s_mart/masks": "5.1.1",
39
40
  "@s_mart/tokens": "5.1.0",
40
- "@s_mart/utils": "5.1.0",
41
+ "@s_mart/utils": "5.1.1",
41
42
  "@s_mart/regular-icons": "5.2.0",
42
- "@s_mart/hooks": "7.0.0"
43
+ "@s_mart/hooks": "7.0.1"
43
44
  },
44
45
  "devDependencies": {
45
46
  "eslint": "^8.47.0"