@s_mart/telas-de-acesso 10.0.3-beta.1 → 10.0.3
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/dist/index.mjs +21 -21
- package/package.json +7 -7
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{LIcon as Je}from"@s_mart/core";import{Typography as Ge}from"@mui/material";import{telefone as Ke}from"@s_mart/masks";import{lineWhatsApp as Ye}from"@s_mart/regular-icons";import{
|
|
1
|
+
import{LIcon as Je}from"@s_mart/core";import{Typography as Ge}from"@mui/material";import{telefone as Ke}from"@s_mart/masks";import{lineWhatsApp as Ye}from"@s_mart/regular-icons";import{styled as $}from"@mui/material";import{colorPalette as Oe}from"@s_mart/tokens";import{toRem as p}from"@s_mart/utils";var oe=$("div")`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
align-items: center;
|
|
@@ -18,7 +18,7 @@ import{LIcon as Je}from"@s_mart/core";import{Typography as Ge}from"@mui/material
|
|
|
18
18
|
@media (max-height: 600px) {
|
|
19
19
|
justify-content: flex-start;
|
|
20
20
|
}
|
|
21
|
-
`,ae
|
|
21
|
+
`,ae=$("div")`
|
|
22
22
|
position: absolute;
|
|
23
23
|
left: 0;
|
|
24
24
|
bottom: 32px;
|
|
@@ -27,7 +27,7 @@ import{LIcon as Je}from"@s_mart/core";import{Typography as Ge}from"@mui/material
|
|
|
27
27
|
@media (max-width: 768px) {
|
|
28
28
|
display: none;
|
|
29
29
|
}
|
|
30
|
-
`,re
|
|
30
|
+
`,re=$("h1")`
|
|
31
31
|
position: absolute;
|
|
32
32
|
left: 32px;
|
|
33
33
|
top: 32px;
|
|
@@ -66,7 +66,7 @@ import{LIcon as Je}from"@s_mart/core";import{Typography as Ge}from"@mui/material
|
|
|
66
66
|
@media (max-width: 500px) {
|
|
67
67
|
display: none;
|
|
68
68
|
}
|
|
69
|
-
`,ie
|
|
69
|
+
`,ie=$("div")`
|
|
70
70
|
position: relative;
|
|
71
71
|
z-index: 2;
|
|
72
72
|
|
|
@@ -75,7 +75,7 @@ import{LIcon as Je}from"@s_mart/core";import{Typography as Ge}from"@mui/material
|
|
|
75
75
|
margin: ${p(16)};
|
|
76
76
|
|
|
77
77
|
background-color: ${({theme:e})=>e.palette.common.white};
|
|
78
|
-
`,ne
|
|
78
|
+
`,ne=$("button")`
|
|
79
79
|
position: relative;
|
|
80
80
|
z-index: 2;
|
|
81
81
|
|
|
@@ -149,14 +149,14 @@ import{LIcon as Je}from"@s_mart/core";import{Typography as Ge}from"@mui/material
|
|
|
149
149
|
color: ${R.green[300]};
|
|
150
150
|
border-color: ${R.green[300]};
|
|
151
151
|
}
|
|
152
|
-
`;import{useForm as Ze,useWatch as je}from"react-hook-form";var _=e=>e?e.match(/[a-z]/i):!1,X=e=>e?e.match(/[0-9]/i):!1,A=e=>e?e.length>=6:!1,ce={validate:e=>{if(!e)return"Obrigat\xF3rio";if(!_(e))return"Deve ter pelo menos uma letra";if(!X(e))return"Deve ter pelo menos um n\xFAmero";if(!A(e))return"Deve ter pelo menos 6 caracteres"}},ue=e=>({validate:o=>{if(!o)return"Obrigat\xF3rio";if(o!==e)return"As senhas devem ser iguais"}});function fe({defaultValues:e}){let o=Ze({defaultValues:e}),a=je({control:o.control,name:"senha"}),n=_(a),t=X(a),i=A(a);return{form:o,senha:a,senhaContemLetra:n,senhaContemNumero:t,senhaContemMinimoDe6Caracteres:i}}import{TextField as Q}from"@s_mart/form";import{required as et}from"@s_mart/rules";import{jsx as U}from"react/jsx-runtime";var W={textFieldNome:e=>U(Q,{...e}),textFieldEmail:e=>U(Q,{...e}),textFieldSenha:e=>U(Q,{...e})},he={type:"text",name:"nome",label:"Nome completo",required:!0,rules:et},ye={type:"email",name:"email",label:"E-mail de acesso",required:!0,disabled:!0},ge={type:"password",name:"senha",label:"Senha de acesso",required:!0,rules:ce};import{FormProvider as it}from"react-hook-form";import{memo as nt,useMemo as st}from"react";import{jsx as r,jsxs as d}from"react/jsx-runtime";var Ce=nt(e=>{let{form:o,senha:a,senhaContemLetra:n,senhaContemMinimoDe6Caracteres:t,senhaContemNumero:i}=fe(e),h=e.logo,x=e.slots,y=st(()=>typeof h=="string"?r("img",{src:h,alt:"Logo do sistema"}):h,[h]),T=x?.textFieldNome??W.textFieldNome,w=x?.textFieldEmail??W.textFieldEmail,N=x?.textFieldSenha??W.textFieldSenha;return r(l,{...e,children:d(se,{children:[d(pe,{children:[h&&r("div",{children:y}),d(B,{variant:"titleSM",children:["Vamos cadastrar uma senha de acesso ao ",e.nomeSistema,"."]})]}),r(it,{...o,children:r("form",{onSubmit:o.handleSubmit(e.onSubmit),children:d(le,{children:[r(w,{...ye}),r(T,{...he}),d(me,{children:[d("div",{children:[r(N,{...ge}),r(at,{type:"password",name:"confirmarSenha",label:"Confirme sua senha",required:!0,rules:ue(a)})]}),d("div",{children:[r(B,{variant:"bodyXS",children:"Sua senha precisa conter:"}),d(de,{children:[d(D,{"data-checked":!!n,children:[n&&r(O,{icon:J,size:"16px",removeMargin:!0}),r(B,{variant:"bodyXS",children:"Uma letra"})]}),d(D,{"data-checked":!!i,children:[i&&r(O,{icon:J,size:"16px",removeMargin:!0}),r(B,{variant:"bodyXS",children:"Um n\xFAmero"})]}),d(D,{"data-checked":!!t,children:[t&&r(O,{icon:J,size:"16px",removeMargin:!0}),r(B,{variant:"bodyXS",children:"M\xEDnimo de 6 caracteres"})]})]})]})]}),r("div",{children:r(ot,{name:"termosDeUso",label:d("div",{style:{display:"flex",gap:4},children:[r("span",{children:"Li e aceito os"}),r(rt,{href:e.linkTermosDeUso,target:"_blank",sx:L=>({color:L.palette.primary.main}),rel:"noreferrer",children:"termos de uso"})]})})}),r("div",{children:r(tt,{type:"submit",fullWidth:!0,disabled:!o.formState.isValid,children:"Concluir meu cadastro"})})]})})})]})})});Ce.displayName="TelaCadastro";import{useMemo as pt}from"react";import{Button as Se,Indicator as lt}from"@s_mart/core";import{Checkbox as mt,Form as dt,TextField as be}from"@s_mart/form";import{composeValidators as ct,required as $e,email as ut}from"@s_mart/rules";import{useCapsLock as ft}from"@s_mart/hooks";import{colorPalette as ht}from"@s_mart/tokens";import{Typography as yt,useMediaQuery as gt}from"@mui/material";import G
|
|
152
|
+
`;import{useForm as Ze,useWatch as je}from"react-hook-form";var _=e=>e?e.match(/[a-z]/i):!1,X=e=>e?e.match(/[0-9]/i):!1,A=e=>e?e.length>=6:!1,ce={validate:e=>{if(!e)return"Obrigat\xF3rio";if(!_(e))return"Deve ter pelo menos uma letra";if(!X(e))return"Deve ter pelo menos um n\xFAmero";if(!A(e))return"Deve ter pelo menos 6 caracteres"}},ue=e=>({validate:o=>{if(!o)return"Obrigat\xF3rio";if(o!==e)return"As senhas devem ser iguais"}});function fe({defaultValues:e}){let o=Ze({defaultValues:e}),a=je({control:o.control,name:"senha"}),n=_(a),t=X(a),i=A(a);return{form:o,senha:a,senhaContemLetra:n,senhaContemNumero:t,senhaContemMinimoDe6Caracteres:i}}import{TextField as Q}from"@s_mart/form";import{required as et}from"@s_mart/rules";import{jsx as U}from"react/jsx-runtime";var W={textFieldNome:e=>U(Q,{...e}),textFieldEmail:e=>U(Q,{...e}),textFieldSenha:e=>U(Q,{...e})},he={type:"text",name:"nome",label:"Nome completo",required:!0,rules:et},ye={type:"email",name:"email",label:"E-mail de acesso",required:!0,disabled:!0},ge={type:"password",name:"senha",label:"Senha de acesso",required:!0,rules:ce};import{FormProvider as it}from"react-hook-form";import{memo as nt,useMemo as st}from"react";import{jsx as r,jsxs as d}from"react/jsx-runtime";var Ce=nt(e=>{let{form:o,senha:a,senhaContemLetra:n,senhaContemMinimoDe6Caracteres:t,senhaContemNumero:i}=fe(e),h=e.logo,x=e.slots,y=st(()=>typeof h=="string"?r("img",{src:h,alt:"Logo do sistema"}):h,[h]),T=x?.textFieldNome??W.textFieldNome,w=x?.textFieldEmail??W.textFieldEmail,N=x?.textFieldSenha??W.textFieldSenha;return r(l,{...e,children:d(se,{children:[d(pe,{children:[h&&r("div",{children:y}),d(B,{variant:"titleSM",children:["Vamos cadastrar uma senha de acesso ao ",e.nomeSistema,"."]})]}),r(it,{...o,children:r("form",{onSubmit:o.handleSubmit(e.onSubmit),children:d(le,{children:[r(w,{...ye}),r(T,{...he}),d(me,{children:[d("div",{children:[r(N,{...ge}),r(at,{type:"password",name:"confirmarSenha",label:"Confirme sua senha",required:!0,rules:ue(a)})]}),d("div",{children:[r(B,{variant:"bodyXS",children:"Sua senha precisa conter:"}),d(de,{children:[d(D,{"data-checked":!!n,children:[n&&r(O,{icon:J,size:"16px",removeMargin:!0}),r(B,{variant:"bodyXS",children:"Uma letra"})]}),d(D,{"data-checked":!!i,children:[i&&r(O,{icon:J,size:"16px",removeMargin:!0}),r(B,{variant:"bodyXS",children:"Um n\xFAmero"})]}),d(D,{"data-checked":!!t,children:[t&&r(O,{icon:J,size:"16px",removeMargin:!0}),r(B,{variant:"bodyXS",children:"M\xEDnimo de 6 caracteres"})]})]})]})]}),r("div",{children:r(ot,{name:"termosDeUso",label:d("div",{style:{display:"flex",gap:4},children:[r("span",{children:"Li e aceito os"}),r(rt,{href:e.linkTermosDeUso,target:"_blank",sx:L=>({color:L.palette.primary.main}),rel:"noreferrer",children:"termos de uso"})]})})}),r("div",{children:r(tt,{type:"submit",fullWidth:!0,disabled:!o.formState.isValid,children:"Concluir meu cadastro"})})]})})})]})})});Ce.displayName="TelaCadastro";import{useMemo as pt}from"react";import{Button as Se,Indicator as lt}from"@s_mart/core";import{Checkbox as mt,Form as dt,TextField as be}from"@s_mart/form";import{composeValidators as ct,required as $e,email as ut}from"@s_mart/rules";import{useCapsLock as ft}from"@s_mart/hooks";import{colorPalette as ht}from"@s_mart/tokens";import{Typography as yt,useMediaQuery as gt}from"@mui/material";import{styled as G}from"@mui/material";import{toRem as P}from"@s_mart/utils";var xe=G("div")`
|
|
153
153
|
display: grid;
|
|
154
154
|
gap: ${P(32)};
|
|
155
|
-
`,ve=G
|
|
155
|
+
`,ve=G("header")`
|
|
156
156
|
display: grid;
|
|
157
157
|
text-align: center;
|
|
158
158
|
gap: ${P(16)};
|
|
159
|
-
`,Te=G
|
|
159
|
+
`,Te=G("div")`
|
|
160
160
|
display: grid;
|
|
161
161
|
gap: ${P(16)};
|
|
162
162
|
|
|
@@ -168,7 +168,7 @@ import{LIcon as Je}from"@s_mart/core";import{Typography as Ge}from"@mui/material
|
|
|
168
168
|
> div:last-of-type {
|
|
169
169
|
gap: ${P(8)};
|
|
170
170
|
}
|
|
171
|
-
`;import{jsx as c,jsxs as q}from"react/jsx-runtime";function Ct({logo:e,initialValues:o,onSubmit:a,onEsqueciMinhaSenha:n,errorLabel:t,...i}){let h=typeof e=="string"?c("img",{src:e,alt:"Logo do sistema"}):e,x=ft(),y=gt("(max-width: 500px)"),T=pt(()=>({manterConectado:!1,...o}),[o]);return c(l,{...i,paperStyle:{minWidth:y?void 0:456,width:y?"90%":void 0},children:q(xe,{children:[c(ve,{children:e&&c("div",{children:h})}),c(dt,{onSubmit:a,defaultValues:T,children:q(Te,{children:[q("div",{children:[c(be,{name:"email",label:"E-mail de acesso",required:!0,rules:ct([$e,ut]),autoComplete:"email",type:"email"}),q("div",{children:[c(be,{name:"senha",label:"Senha de acesso",type:"password",required:!0,rules:$e}),x&&c(lt,{severity:"warning",children:"Capslock ativado"}),!!t&&c(yt,{variant:"titleXXS",color:ht.red[300],children:t})]})]}),c(mt,{name:"manterConectado",label:"Manter conectado"}),q("div",{children:[c(Se,{type:"submit",fullWidth:!0,children:"Entrar"}),n&&c(Se,{type:"button",fullWidth:!0,variant:"text",onClick:n,children:"Esqueci minha senha"})]})]})})]})})}import{Button as qe,LIcon as xt}from"@s_mart/core";import{Typography as Ee,useMediaQuery as vt}from"@mui/material";import{colorPalette as Y}from"@s_mart/tokens";import{lineWhatsApp as Tt}from"@s_mart/regular-icons";import Fe
|
|
171
|
+
`;import{jsx as c,jsxs as q}from"react/jsx-runtime";function Ct({logo:e,initialValues:o,onSubmit:a,onEsqueciMinhaSenha:n,errorLabel:t,...i}){let h=typeof e=="string"?c("img",{src:e,alt:"Logo do sistema"}):e,x=ft(),y=gt("(max-width: 500px)"),T=pt(()=>({manterConectado:!1,...o}),[o]);return c(l,{...i,paperStyle:{minWidth:y?void 0:456,width:y?"90%":void 0},children:q(xe,{children:[c(ve,{children:e&&c("div",{children:h})}),c(dt,{onSubmit:a,defaultValues:T,children:q(Te,{children:[q("div",{children:[c(be,{name:"email",label:"E-mail de acesso",required:!0,rules:ct([$e,ut]),autoComplete:"email",type:"email"}),q("div",{children:[c(be,{name:"senha",label:"Senha de acesso",type:"password",required:!0,rules:$e}),x&&c(lt,{severity:"warning",children:"Capslock ativado"}),!!t&&c(yt,{variant:"titleXXS",color:ht.red[300],children:t})]})]}),c(mt,{name:"manterConectado",label:"Manter conectado"}),q("div",{children:[c(Se,{type:"submit",fullWidth:!0,children:"Entrar"}),n&&c(Se,{type:"button",fullWidth:!0,variant:"text",onClick:n,children:"Esqueci minha senha"})]})]})})]})})}import{Button as qe,LIcon as xt}from"@s_mart/core";import{Typography as Ee,useMediaQuery as vt}from"@mui/material";import{colorPalette as Y}from"@s_mart/tokens";import{lineWhatsApp as Tt}from"@s_mart/regular-icons";import{styled as Fe}from"@mui/material";import{toRem as K}from"@s_mart/utils";var Be=Fe("div")`
|
|
172
172
|
display: grid;
|
|
173
173
|
gap: ${K(32)};
|
|
174
174
|
|
|
@@ -176,11 +176,11 @@ import{LIcon as Je}from"@s_mart/core";import{Typography as Ge}from"@mui/material
|
|
|
176
176
|
display: grid;
|
|
177
177
|
gap: ${K(8)};
|
|
178
178
|
}
|
|
179
|
-
`,Pe=Fe
|
|
179
|
+
`,Pe=Fe("header")`
|
|
180
180
|
display: grid;
|
|
181
181
|
text-align: center;
|
|
182
182
|
gap: ${K(16)};
|
|
183
|
-
`;import{jsx as C,jsxs as E}from"react/jsx-runtime";function St({logo:e,onPrecisoDeAjuda:o,onRealizarAcesso:a,...n}){let t=typeof e=="string"?C("img",{src:e,alt:"Logo do sistema"}):e,i=vt("(max-width: 500px)");return C(l,{...n,paperStyle:{minWidth:i?void 0:456,width:i?"90%":void 0},children:E(Be,{children:[E("div",{children:[C(Pe,{children:e&&C("div",{children:t})}),E("div",{style:{display:"flex",flexDirection:"column",textAlign:"center",gap:8,color:Y.neutral[800]},children:[C(Ee,{variant:"bodyMD",children:"Parece que este convite j\xE1 foi usado ou expirou."}),C(Ee,{variant:"bodyMD",children:"J\xE1 se cadastrou? Realize o login."})]})]}),E("div",{children:[C(qe,{fullWidth:!0,onClick:a,children:"Realizar login"}),E(qe,{fullWidth:!0,variant:"text",onClick:o,style:{display:"flex",gap:4,color:Y.neutral[900]},children:[C(xt,{icon:Tt,size:"20px",removeMargin:!0,color:Y.neutral[900]}),"Preciso de outro convite"]})]})]})})}import{Button as bt}from"@s_mart/core";import{useMediaQuery as $t,Typography as Ne}from"@mui/material";import Me
|
|
183
|
+
`;import{jsx as C,jsxs as E}from"react/jsx-runtime";function St({logo:e,onPrecisoDeAjuda:o,onRealizarAcesso:a,...n}){let t=typeof e=="string"?C("img",{src:e,alt:"Logo do sistema"}):e,i=vt("(max-width: 500px)");return C(l,{...n,paperStyle:{minWidth:i?void 0:456,width:i?"90%":void 0},children:E(Be,{children:[E("div",{children:[C(Pe,{children:e&&C("div",{children:t})}),E("div",{style:{display:"flex",flexDirection:"column",textAlign:"center",gap:8,color:Y.neutral[800]},children:[C(Ee,{variant:"bodyMD",children:"Parece que este convite j\xE1 foi usado ou expirou."}),C(Ee,{variant:"bodyMD",children:"J\xE1 se cadastrou? Realize o login."})]})]}),E("div",{children:[C(qe,{fullWidth:!0,onClick:a,children:"Realizar login"}),E(qe,{fullWidth:!0,variant:"text",onClick:o,style:{display:"flex",gap:4,color:Y.neutral[900]},children:[C(xt,{icon:Tt,size:"20px",removeMargin:!0,color:Y.neutral[900]}),"Preciso de outro convite"]})]})]})})}import{Button as bt}from"@s_mart/core";import{useMediaQuery as $t,Typography as Ne}from"@mui/material";import{styled as Me}from"@mui/material";import{toRem as Z}from"@s_mart/utils";var ke=Me("div")`
|
|
184
184
|
display: grid;
|
|
185
185
|
gap: ${Z(32)};
|
|
186
186
|
|
|
@@ -188,21 +188,21 @@ import{LIcon as Je}from"@s_mart/core";import{Typography as Ge}from"@mui/material
|
|
|
188
188
|
display: grid;
|
|
189
189
|
gap: ${Z(16)};
|
|
190
190
|
}
|
|
191
|
-
`,we=Me
|
|
191
|
+
`,we=Me("header")`
|
|
192
192
|
display: grid;
|
|
193
193
|
text-align: center;
|
|
194
194
|
gap: ${Z(16)};
|
|
195
|
-
`;import{jsx as v,jsxs as Le}from"react/jsx-runtime";function Ft({logo:e,onVoltarParaLogin:o,...a}){let n=typeof e=="string"?v("img",{src:e,alt:"Logo do sistema"}):e,t=$t("(max-width: 500px)");return v(l,{...a,paperStyle:{maxWidth:t?void 0:456,width:t?"90%":void 0},children:Le(ke,{children:[Le("div",{style:{display:"flex",flexDirection:"column",gap:24},children:[v(we,{children:e&&v("div",{children:n})}),v(Ne,{variant:"titleMD",textAlign:"center",children:"Instru\xE7\xF5es enviadas"}),v(Ne,{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(bt,{fullWidth:!0,onClick:o,children:"Voltar para login"})]})})}import{Button as Bt,LIcon as j}from"@s_mart/core";import{Typography as M}from"@mui/material";import{Form as Pt,TextField as He}from"@s_mart/form";import{required as qt}from"@s_mart/rules";import{lineCheck as ee}from"@s_mart/regular-icons";import{
|
|
195
|
+
`;import{jsx as v,jsxs as Le}from"react/jsx-runtime";function Ft({logo:e,onVoltarParaLogin:o,...a}){let n=typeof e=="string"?v("img",{src:e,alt:"Logo do sistema"}):e,t=$t("(max-width: 500px)");return v(l,{...a,paperStyle:{maxWidth:t?void 0:456,width:t?"90%":void 0},children:Le(ke,{children:[Le("div",{style:{display:"flex",flexDirection:"column",gap:24},children:[v(we,{children:e&&v("div",{children:n})}),v(Ne,{variant:"titleMD",textAlign:"center",children:"Instru\xE7\xF5es enviadas"}),v(Ne,{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(bt,{fullWidth:!0,onClick:o,children:"Voltar para login"})]})})}import{Button as Bt,LIcon as j}from"@s_mart/core";import{Typography as M}from"@mui/material";import{Form as Pt,TextField as He}from"@s_mart/form";import{required as qt}from"@s_mart/rules";import{lineCheck as ee}from"@s_mart/regular-icons";import{styled as b}from"@mui/material";import{colorPalette as I}from"@s_mart/tokens";import{toRem as u}from"@s_mart/utils";var Re=b("div")`
|
|
196
196
|
display: grid;
|
|
197
197
|
gap: ${u(32)};
|
|
198
|
-
`,De=b
|
|
198
|
+
`,De=b("header")`
|
|
199
199
|
display: grid;
|
|
200
200
|
text-align: center;
|
|
201
201
|
gap: ${u(16)};
|
|
202
|
-
`,We=b
|
|
202
|
+
`,We=b("div")`
|
|
203
203
|
display: grid;
|
|
204
204
|
gap: ${u(32)};
|
|
205
|
-
`,Ie=b
|
|
205
|
+
`,Ie=b("div")`
|
|
206
206
|
display: grid;
|
|
207
207
|
gap: ${u(4)};
|
|
208
208
|
|
|
@@ -221,11 +221,11 @@ import{LIcon as Je}from"@s_mart/core";import{Typography as Ge}from"@mui/material
|
|
|
221
221
|
display: grid;
|
|
222
222
|
gap: ${u(4)};
|
|
223
223
|
}
|
|
224
|
-
`,Ve=b
|
|
224
|
+
`,Ve=b("div")`
|
|
225
225
|
display: flex;
|
|
226
226
|
flex-wrap: wrap;
|
|
227
227
|
gap: ${u(8)};
|
|
228
|
-
`,V=b
|
|
228
|
+
`,V=b("div")`
|
|
229
229
|
display: flex;
|
|
230
230
|
align-items: center;
|
|
231
231
|
gap: ${u(4)};
|
|
@@ -242,7 +242,7 @@ import{LIcon as Je}from"@s_mart/core";import{Typography as Ge}from"@mui/material
|
|
|
242
242
|
color: ${I.green[300]};
|
|
243
243
|
border-color: ${I.green[300]};
|
|
244
244
|
`}}
|
|
245
|
-
`;function ze(){let e=t=>t?t.match(/[a-z]/i):!1,o=t=>t?t.match(/[0-9]/i):!1,a=t=>t?t.length>=6:!1;return{senhaContemLetra:e,senhaContemNumero:o,senhaContemMinimoDe6Caracteres:a,desabilitarBotaoDeCadastro:t=>!t.senha||!t.confirmarSenha||!e(t.senha)||!o(t.senha)||!a(t.senha)}}import{jsx as s,jsxs as g}from"react/jsx-runtime";function Et({logo:e,onTrocarMinhaSenha:o,...a}){let{senhaContemLetra:n,senhaContemNumero:t,senhaContemMinimoDe6Caracteres:i,desabilitarBotaoDeCadastro:h}=ze();return s(l,{...a,children:g(Re,{children:[g(De,{children:[e&&s("div",{children:typeof e=="string"?s("img",{src:e,alt:"Logo do sistema"}):e}),s(M,{variant:"titleSM",children:"Vamos cadastrar uma nova senha de acesso."})]}),s(Pt,{onSubmit:o,children:({watch:y})=>{let T=n(y("senha")),w=t(y("senha")),N=i(y("senha"));return g(We,{children:[g(Ie,{children:[g("div",{children:[s(He,{type:"password",name:"senha",label:"Senha de acesso",required:!0,rules:qt}),s(He,{type:"password",name:"confirmarSenha",label:"Confirme sua senha",required:!0,rules:{validate:L=>{if(!L)return"Campo obrigat\xF3rio";if(L!==y("senha"))return"As senhas devem ser iguais"}}})]}),g("div",{children:[s(M,{variant:"bodyXS",children:"Sua senha precisa conter:"}),g(Ve,{children:[g(V,{checked:!!T,children:[T&&s(j,{icon:ee,size:"16px",removeMargin:!0}),s(M,{variant:"bodyXS",children:"Uma letra"})]}),g(V,{checked:!!w,children:[w&&s(j,{icon:ee,size:"16px",removeMargin:!0}),s(M,{variant:"bodyXS",children:"Um n\xFAmero"})]}),g(V,{checked:!!N,children:[N&&s(j,{icon:ee,size:"16px",removeMargin:!0}),s(M,{variant:"bodyXS",children:"M\xEDnimo de 6 caracteres"})]})]})]})]}),s("div",{children:s(Bt,{type:"submit",fullWidth:!0,disabled:h(y()),children:"Trocar minha senha"})})]})}})]})})}import{Button as Qe}from"@s_mart/core";import{Typography as Ue,useMediaQuery as Mt}from"@mui/material";import te
|
|
245
|
+
`;function ze(){let e=t=>t?t.match(/[a-z]/i):!1,o=t=>t?t.match(/[0-9]/i):!1,a=t=>t?t.length>=6:!1;return{senhaContemLetra:e,senhaContemNumero:o,senhaContemMinimoDe6Caracteres:a,desabilitarBotaoDeCadastro:t=>!t.senha||!t.confirmarSenha||!e(t.senha)||!o(t.senha)||!a(t.senha)}}import{jsx as s,jsxs as g}from"react/jsx-runtime";function Et({logo:e,onTrocarMinhaSenha:o,...a}){let{senhaContemLetra:n,senhaContemNumero:t,senhaContemMinimoDe6Caracteres:i,desabilitarBotaoDeCadastro:h}=ze();return s(l,{...a,children:g(Re,{children:[g(De,{children:[e&&s("div",{children:typeof e=="string"?s("img",{src:e,alt:"Logo do sistema"}):e}),s(M,{variant:"titleSM",children:"Vamos cadastrar uma nova senha de acesso."})]}),s(Pt,{onSubmit:o,children:({watch:y})=>{let T=n(y("senha")),w=t(y("senha")),N=i(y("senha"));return g(We,{children:[g(Ie,{children:[g("div",{children:[s(He,{type:"password",name:"senha",label:"Senha de acesso",required:!0,rules:qt}),s(He,{type:"password",name:"confirmarSenha",label:"Confirme sua senha",required:!0,rules:{validate:L=>{if(!L)return"Campo obrigat\xF3rio";if(L!==y("senha"))return"As senhas devem ser iguais"}}})]}),g("div",{children:[s(M,{variant:"bodyXS",children:"Sua senha precisa conter:"}),g(Ve,{children:[g(V,{checked:!!T,children:[T&&s(j,{icon:ee,size:"16px",removeMargin:!0}),s(M,{variant:"bodyXS",children:"Uma letra"})]}),g(V,{checked:!!w,children:[w&&s(j,{icon:ee,size:"16px",removeMargin:!0}),s(M,{variant:"bodyXS",children:"Um n\xFAmero"})]}),g(V,{checked:!!N,children:[N&&s(j,{icon:ee,size:"16px",removeMargin:!0}),s(M,{variant:"bodyXS",children:"M\xEDnimo de 6 caracteres"})]})]})]})]}),s("div",{children:s(Bt,{type:"submit",fullWidth:!0,disabled:h(y()),children:"Trocar minha senha"})})]})}})]})})}import{Button as Qe}from"@s_mart/core";import{Typography as Ue,useMediaQuery as Mt}from"@mui/material";import{styled as te}from"@mui/material";import{toRem as k}from"@s_mart/utils";var _e=te("div")`
|
|
246
246
|
display: grid;
|
|
247
247
|
gap: ${k(32)};
|
|
248
248
|
|
|
@@ -250,11 +250,11 @@ import{LIcon as Je}from"@s_mart/core";import{Typography as Ge}from"@mui/material
|
|
|
250
250
|
display: grid;
|
|
251
251
|
gap: ${k(16)};
|
|
252
252
|
}
|
|
253
|
-
`,Xe=te
|
|
253
|
+
`,Xe=te("header")`
|
|
254
254
|
display: grid;
|
|
255
255
|
text-align: center;
|
|
256
256
|
gap: ${k(16)};
|
|
257
|
-
`,Ae=te
|
|
257
|
+
`,Ae=te("div")`
|
|
258
258
|
display: grid;
|
|
259
259
|
gap: ${k(32)};
|
|
260
260
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@s_mart/telas-de-acesso",
|
|
3
|
-
"version": "10.0.3
|
|
3
|
+
"version": "10.0.3",
|
|
4
4
|
"main": "./dist/index.mjs",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"types": "./dist/index.d.mts",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"react-dom": ">=18.3.1",
|
|
26
26
|
"react-hook-form": "^7.51.0",
|
|
27
27
|
"typescript": ">=5.4.2",
|
|
28
|
-
"@s_mart/core": "9.0.3
|
|
29
|
-
"@s_mart/form": "9.0.3-beta.1",
|
|
28
|
+
"@s_mart/core": "9.0.3",
|
|
30
29
|
"@s_mart/hooks": "8.0.9",
|
|
31
|
-
"@s_mart/
|
|
30
|
+
"@s_mart/form": "9.0.3",
|
|
32
31
|
"@s_mart/regular-icons": "6.0.6",
|
|
32
|
+
"@s_mart/masks": "5.2.0",
|
|
33
33
|
"@s_mart/tokens": "5.1.1",
|
|
34
34
|
"@s_mart/utils": "5.3.4"
|
|
35
35
|
},
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"@types/react": ">=18.3.12",
|
|
45
45
|
"@types/react-dom": ">=18.3.1",
|
|
46
46
|
"typescript": ">=5.4.2",
|
|
47
|
-
"@s_mart/
|
|
48
|
-
"@s_mart/
|
|
47
|
+
"@s_mart/form": "9.0.3",
|
|
48
|
+
"@s_mart/core": "9.0.3",
|
|
49
|
+
"@s_mart/regular-icons": "6.0.6",
|
|
49
50
|
"@s_mart/hooks": "8.0.9",
|
|
50
51
|
"@s_mart/masks": "5.2.0",
|
|
51
|
-
"@s_mart/regular-icons": "6.0.6",
|
|
52
52
|
"@s_mart/tokens": "5.1.1",
|
|
53
53
|
"@s_mart/utils": "5.3.4"
|
|
54
54
|
},
|