@s_mart/telas-de-acesso 10.0.6 → 10.1.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/dist/index.d.mts +11 -3
- package/dist/index.mjs +48 -48
- package/package.json +33 -29
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
|
+
import { ImgHTMLAttributes, ReactNode } from 'react';
|
|
3
4
|
import { TextFieldProps } from '@s_mart/form';
|
|
4
5
|
import { UseFormReturn, FieldValues } from 'react-hook-form';
|
|
5
6
|
|
|
@@ -157,16 +158,23 @@ interface TelaInstrucoesEnviadasProps extends Omit<TemplateTelaBaseProps, 'child
|
|
|
157
158
|
|
|
158
159
|
declare function TelaInstrucoesEnviadas({ logo, onVoltarParaLogin, ...rest }: TelaInstrucoesEnviadasProps): react_jsx_runtime.JSX.Element;
|
|
159
160
|
|
|
161
|
+
interface TelaNovaSenhaFormValues {
|
|
162
|
+
senha: string;
|
|
163
|
+
confirmarSenha: string;
|
|
164
|
+
termosDeUso: boolean;
|
|
165
|
+
}
|
|
166
|
+
interface TelaNovaSenhaFormValuesSubmit extends TelaNovaSenhaFormValues {
|
|
167
|
+
}
|
|
160
168
|
interface TelaNovaSenhaProps extends Omit<TemplateTelaBaseProps, 'children'> {
|
|
161
169
|
/**
|
|
162
170
|
* Logo do sistema que será exibido do topo do paper de cadastro
|
|
163
171
|
* @default undefined
|
|
164
172
|
*/
|
|
165
|
-
logo?:
|
|
173
|
+
logo?: ImgHTMLAttributes<HTMLImageElement>['src'] | ReactNode;
|
|
166
174
|
/**
|
|
167
175
|
* Função que será executado ao clicar no botão trocar minha senha
|
|
168
176
|
*/
|
|
169
|
-
onTrocarMinhaSenha: (data:
|
|
177
|
+
onTrocarMinhaSenha: (data: TelaNovaSenhaFormValuesSubmit) => void;
|
|
170
178
|
}
|
|
171
179
|
|
|
172
180
|
declare function TelaNovaSenha({ logo, onTrocarMinhaSenha, ...rest }: TelaNovaSenhaProps): react_jsx_runtime.JSX.Element;
|
|
@@ -192,4 +200,4 @@ interface TelaEsqueceuSenhaProps extends Omit<TemplateTelaBaseProps, 'children'>
|
|
|
192
200
|
|
|
193
201
|
declare function TelaEsqueceuSenha({ logo, onVoltarParaLogin, onConfirmar, ...rest }: TelaEsqueceuSenhaProps): react_jsx_runtime.JSX.Element;
|
|
194
202
|
|
|
195
|
-
export { type FormTelaCadastroSubmitValues, type FormTelaCadastroValues, TelaCadastro, type TelaCadastroProps, type TelaCadastroSlots, TelaConviteExpirado, type TelaConviteExpiradoProps, TelaEsqueceuSenha, type TelaEsqueceuSenhaProps, TelaInstrucoesEnviadas, type TelaInstrucoesEnviadasProps, TelaLogin, type TelaLoginProps, TelaNovaSenha, type TelaNovaSenhaProps, TemplateTelaBase, type TemplateTelaBaseProps };
|
|
203
|
+
export { type FormTelaCadastroSubmitValues, type FormTelaCadastroValues, TelaCadastro, type TelaCadastroProps, type TelaCadastroSlots, TelaConviteExpirado, type TelaConviteExpiradoProps, TelaEsqueceuSenha, type TelaEsqueceuSenhaProps, TelaInstrucoesEnviadas, type TelaInstrucoesEnviadasProps, TelaLogin, type TelaLoginProps, TelaNovaSenha, type TelaNovaSenhaFormValuesSubmit, type TelaNovaSenhaProps, TemplateTelaBase, type TemplateTelaBaseProps };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{LIcon as
|
|
1
|
+
import{LIcon as Ke}from"@s_mart/core";import{Typography as Ye}from"@mui/material";import{telefone as Ze}from"@s_mart/masks";import{lineWhatsApp as je}from"@s_mart/regular-icons";import{styled as $}from"@mui/material";import{colorPalette as Ge}from"@s_mart/tokens";import{toRem as p}from"@s_mart/utils";var j=$("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
|
-
`,
|
|
21
|
+
`,ee=$("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
|
-
`,
|
|
30
|
+
`,te=$("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
|
-
`,
|
|
69
|
+
`,oe=$("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
|
-
`,
|
|
78
|
+
`,ae=$("button")`
|
|
79
79
|
position: relative;
|
|
80
80
|
z-index: 2;
|
|
81
81
|
|
|
@@ -96,20 +96,20 @@ import{LIcon as Je}from"@s_mart/core";import{Typography as Ge}from"@mui/material
|
|
|
96
96
|
background-color: transparent;
|
|
97
97
|
|
|
98
98
|
svg {
|
|
99
|
-
color: ${
|
|
99
|
+
color: ${Ge.green[300]};
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
`;import{jsx as F,jsxs as
|
|
102
|
+
`;import{jsx as F,jsxs as I}from"react/jsx-runtime";function l({children:e,whatsapp:t,textoChamativo:r,style:i,paperStyle:a,ilustracao:n}){return I(j,{style:i,children:[r&&F(te,{children:r}),n&&F(ee,{children:typeof n=="string"?F("img",{src:n,alt:"Logo do sistema"}):n}),F(oe,{style:a,children:e}),t&&I(ae,{onClick:()=>{window.open(`https://api.whatsapp.com/send?phone=${t}`)},style:{marginBottom:16},children:[I(Ye,{variant:"bodyXS",children:["Com d\xFAvidas? ",Ze.format(t.slice(2))]}),F(Ke,{icon:je,size:"20px",removeMargin:!0})]})]})}import{Button as at,LIcon as A}from"@s_mart/core";import{Checkbox as rt,TextField as it}from"@s_mart/form";import{Link as nt,Typography as P}from"@mui/material";import{lineCheck as Q}from"@s_mart/regular-icons";import{colorPalette as w}from"@s_mart/tokens";import{styled as S}from"@mui/material";import{toRem as m}from"@s_mart/utils";var re=S("div")`
|
|
103
103
|
display: grid;
|
|
104
104
|
gap: ${m(32)};
|
|
105
|
-
`,
|
|
105
|
+
`,ie=S("header")`
|
|
106
106
|
display: grid;
|
|
107
107
|
text-align: center;
|
|
108
108
|
gap: ${m(16)};
|
|
109
|
-
`,
|
|
109
|
+
`,ne=S("div")`
|
|
110
110
|
display: grid;
|
|
111
111
|
gap: ${m(32)};
|
|
112
|
-
`,
|
|
112
|
+
`,se=S("div")`
|
|
113
113
|
display: grid;
|
|
114
114
|
gap: ${m(4)};
|
|
115
115
|
|
|
@@ -128,17 +128,17 @@ import{LIcon as Je}from"@s_mart/core";import{Typography as Ge}from"@mui/material
|
|
|
128
128
|
display: grid;
|
|
129
129
|
gap: ${m(4)};
|
|
130
130
|
}
|
|
131
|
-
`,
|
|
131
|
+
`,pe=S("div")`
|
|
132
132
|
display: flex;
|
|
133
133
|
flex-wrap: wrap;
|
|
134
134
|
gap: ${m(8)};
|
|
135
|
-
`,
|
|
135
|
+
`,L=S("div")`
|
|
136
136
|
display: flex;
|
|
137
137
|
align-items: center;
|
|
138
138
|
gap: ${m(4)};
|
|
139
139
|
|
|
140
|
-
color: ${
|
|
141
|
-
border: 1px solid ${
|
|
140
|
+
color: ${w.neutral[600]};
|
|
141
|
+
border: 1px solid ${w.neutral[600]};
|
|
142
142
|
border-radius: ${m(4)};
|
|
143
143
|
padding: ${m(3)} ${m(4)};
|
|
144
144
|
|
|
@@ -146,63 +146,63 @@ import{LIcon as Je}from"@s_mart/core";import{Typography as Ge}from"@mui/material
|
|
|
146
146
|
vertical-align: middle;
|
|
147
147
|
|
|
148
148
|
&[data-checked='true'] {
|
|
149
|
-
color: ${
|
|
150
|
-
border-color: ${
|
|
149
|
+
color: ${w.green[300]};
|
|
150
|
+
border-color: ${w.green[300]};
|
|
151
151
|
}
|
|
152
|
-
`;import{useForm as
|
|
152
|
+
`;import{useForm as et,useWatch as tt}from"react-hook-form";var V=e=>e?e.match(/[a-z]/i):!1,z=e=>e?e.match(/[0-9]/i):!1,H=e=>e?e.length>=6:!1,le={validate:e=>{if(!e)return"Obrigat\xF3rio";if(!V(e))return"Deve ter pelo menos uma letra";if(!z(e))return"Deve ter pelo menos um n\xFAmero";if(!H(e))return"Deve ter pelo menos 6 caracteres"}},me=e=>({validate:t=>{if(!t)return"Obrigat\xF3rio";if(t!==e)return"As senhas devem ser iguais"}});function de({defaultValues:e}){let t=et({defaultValues:e,mode:"all"}),r=tt({control:t.control,name:"senha"}),i=V(r),a=z(r),n=H(r);return{form:t,senha:r,senhaContemLetra:i,senhaContemNumero:a,senhaContemMinimoDe6Caracteres:n}}import{TextField as _}from"@s_mart/form";import{required as ot}from"@s_mart/rules";import{jsx as X}from"react/jsx-runtime";var N={textFieldNome:e=>X(_,{...e}),textFieldEmail:e=>X(_,{...e}),textFieldSenha:e=>X(_,{...e})},ce={type:"text",name:"nome",label:"Nome completo",required:!0,rules:ot},ue={type:"email",name:"email",label:"E-mail de acesso",required:!0,disabled:!0},fe={type:"password",name:"senha",label:"Senha de acesso",required:!0,rules:le};import{FormProvider as st}from"react-hook-form";import{memo as pt,useMemo as lt}from"react";import{required as mt}from"@s_mart/rules";import{jsx as o,jsxs as d}from"react/jsx-runtime";var he=pt(e=>{let{form:t,senha:r,senhaContemLetra:i,senhaContemMinimoDe6Caracteres:a,senhaContemNumero:n}=de(e),f=e.logo,C=e.slots,v=lt(()=>typeof f=="string"?o("img",{src:f,alt:"Logo do sistema"}):f,[f]),y=C?.textFieldNome??N.textFieldNome,Ue=C?.textFieldEmail??N.textFieldEmail,Oe=C?.textFieldSenha??N.textFieldSenha;return o(l,{...e,children:d(re,{children:[d(ie,{children:[f&&o("div",{children:v}),d(P,{variant:"titleSM",children:["Vamos cadastrar uma senha de acesso ao ",e.nomeSistema,"."]})]}),o(st,{...t,children:o("form",{onSubmit:t.handleSubmit(e.onSubmit),children:d(ne,{children:[o(Ue,{...ue}),o(y,{...ce}),d(se,{children:[d("div",{children:[o(Oe,{...fe}),o(it,{type:"password",name:"confirmarSenha",label:"Confirme sua senha",required:!0,rules:me(r)})]}),d("div",{children:[o(P,{variant:"bodyXS",children:"Sua senha precisa conter:"}),d(pe,{children:[d(L,{"data-checked":!!i,children:[i&&o(A,{icon:Q,size:"16px",removeMargin:!0}),o(P,{variant:"bodyXS",children:"Uma letra"})]}),d(L,{"data-checked":!!n,children:[n&&o(A,{icon:Q,size:"16px",removeMargin:!0}),o(P,{variant:"bodyXS",children:"Um n\xFAmero"})]}),d(L,{"data-checked":!!a,children:[a&&o(A,{icon:Q,size:"16px",removeMargin:!0}),o(P,{variant:"bodyXS",children:"M\xEDnimo de 6 caracteres"})]})]})]})]}),o("div",{children:o(rt,{rules:mt,name:"termosDeUso",label:d("div",{style:{display:"flex",gap:4},children:[o("span",{children:"Li e aceito os"}),o(nt,{href:e.linkTermosDeUso,target:"_blank",sx:Je=>({color:Je.palette.primary.main}),rel:"noreferrer",children:"termos de uso"})]})})}),o("div",{children:o(at,{type:"submit",fullWidth:!0,children:"Concluir meu cadastro"})})]})})})]})})});he.displayName="TelaCadastro";import{useMemo as dt}from"react";import{Button as xe,Indicator as ct}from"@s_mart/core";import{Checkbox as ut,Form as ft,TextField as ve}from"@s_mart/form";import{composeValidators as ht,required as Te,email as yt}from"@s_mart/rules";import{useCapsLock as gt}from"@s_mart/hooks";import{colorPalette as Ct}from"@s_mart/tokens";import{Typography as xt,useMediaQuery as vt}from"@mui/material";import{styled as U}from"@mui/material";import{toRem as B}from"@s_mart/utils";var ye=U("div")`
|
|
153
153
|
display: grid;
|
|
154
|
-
gap: ${
|
|
155
|
-
`,
|
|
154
|
+
gap: ${B(32)};
|
|
155
|
+
`,ge=U("header")`
|
|
156
156
|
display: grid;
|
|
157
157
|
text-align: center;
|
|
158
|
-
gap: ${
|
|
159
|
-
`,
|
|
158
|
+
gap: ${B(16)};
|
|
159
|
+
`,Ce=U("div")`
|
|
160
160
|
display: grid;
|
|
161
|
-
gap: ${
|
|
161
|
+
gap: ${B(16)};
|
|
162
162
|
|
|
163
163
|
> div {
|
|
164
164
|
display: grid;
|
|
165
|
-
gap: ${
|
|
165
|
+
gap: ${B(16)};
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
> div:last-of-type {
|
|
169
|
-
gap: ${
|
|
169
|
+
gap: ${B(8)};
|
|
170
170
|
}
|
|
171
|
-
`;import{jsx as c,jsxs as q}from"react/jsx-runtime";function
|
|
171
|
+
`;import{jsx as c,jsxs as q}from"react/jsx-runtime";function Tt({logo:e,initialValues:t,onSubmit:r,onEsqueciMinhaSenha:i,errorLabel:a,...n}){let f=typeof e=="string"?c("img",{src:e,alt:"Logo do sistema"}):e,C=gt(),v=vt("(max-width: 500px)"),y=dt(()=>({manterConectado:!1,...t}),[t]);return c(l,{...n,paperStyle:{minWidth:v?void 0:456,width:v?"90%":void 0},children:q(ye,{children:[c(ge,{children:e&&c("div",{children:f})}),c(ft,{onSubmit:r,defaultValues:y,children:q(Ce,{children:[q("div",{children:[c(ve,{name:"email",label:"E-mail de acesso",required:!0,rules:ht([Te,yt]),autoComplete:"email",type:"email"}),q("div",{children:[c(ve,{name:"senha",label:"Senha de acesso",type:"password",required:!0,rules:Te}),C&&c(ct,{severity:"warning",children:"Capslock ativado"}),!!a&&c(xt,{variant:"titleXXS",color:Ct.red[300],children:a})]})]}),c(ut,{name:"manterConectado",label:"Manter conectado"}),q("div",{children:[c(xe,{type:"submit",fullWidth:!0,children:"Entrar"}),i&&c(xe,{type:"button",fullWidth:!0,variant:"text",onClick:i,children:"Esqueci minha senha"})]})]})})]})})}import{Button as Fe,LIcon as St}from"@s_mart/core";import{Typography as Pe,useMediaQuery as bt}from"@mui/material";import{colorPalette as J}from"@s_mart/tokens";import{lineWhatsApp as $t}from"@s_mart/regular-icons";import{styled as Se}from"@mui/material";import{toRem as O}from"@s_mart/utils";var be=Se("div")`
|
|
172
172
|
display: grid;
|
|
173
|
-
gap: ${
|
|
173
|
+
gap: ${O(32)};
|
|
174
174
|
|
|
175
175
|
> div {
|
|
176
176
|
display: grid;
|
|
177
|
-
gap: ${
|
|
177
|
+
gap: ${O(8)};
|
|
178
178
|
}
|
|
179
|
-
|
|
179
|
+
`,$e=Se("header")`
|
|
180
180
|
display: grid;
|
|
181
181
|
text-align: center;
|
|
182
|
-
gap: ${
|
|
183
|
-
`;import{jsx as
|
|
182
|
+
gap: ${O(16)};
|
|
183
|
+
`;import{jsx as x,jsxs as E}from"react/jsx-runtime";function Ft({logo:e,onPrecisoDeAjuda:t,onRealizarAcesso:r,...i}){let a=typeof e=="string"?x("img",{src:e,alt:"Logo do sistema"}):e,n=bt("(max-width: 500px)");return x(l,{...i,paperStyle:{minWidth:n?void 0:456,width:n?"90%":void 0},children:E(be,{children:[E("div",{children:[x($e,{children:e&&x("div",{children:a})}),E("div",{style:{display:"flex",flexDirection:"column",textAlign:"center",gap:8,color:J.neutral[800]},children:[x(Pe,{variant:"bodyMD",children:"Parece que este convite j\xE1 foi usado ou expirou."}),x(Pe,{variant:"bodyMD",children:"J\xE1 se cadastrou? Realize o login."})]})]}),E("div",{children:[x(Fe,{fullWidth:!0,onClick:r,children:"Realizar login"}),E(Fe,{fullWidth:!0,variant:"text",onClick:t,style:{display:"flex",gap:4,color:J.neutral[900]},children:[x(St,{icon:$t,size:"20px",removeMargin:!0,color:J.neutral[900]}),"Preciso de outro convite"]})]})]})})}import{Button as Pt}from"@s_mart/core";import{useMediaQuery as Bt,Typography as Me}from"@mui/material";import{styled as Be}from"@mui/material";import{toRem as G}from"@s_mart/utils";var qe=Be("div")`
|
|
184
184
|
display: grid;
|
|
185
|
-
gap: ${
|
|
185
|
+
gap: ${G(32)};
|
|
186
186
|
|
|
187
187
|
> div {
|
|
188
188
|
display: grid;
|
|
189
|
-
gap: ${
|
|
189
|
+
gap: ${G(16)};
|
|
190
190
|
}
|
|
191
|
-
`,
|
|
191
|
+
`,Ee=Be("header")`
|
|
192
192
|
display: grid;
|
|
193
193
|
text-align: center;
|
|
194
|
-
gap: ${
|
|
195
|
-
`;import{jsx as
|
|
194
|
+
gap: ${G(16)};
|
|
195
|
+
`;import{jsx as T,jsxs as ke}from"react/jsx-runtime";function qt({logo:e,onVoltarParaLogin:t,...r}){let i=typeof e=="string"?T("img",{src:e,alt:"Logo do sistema"}):e,a=Bt("(max-width: 500px)");return T(l,{...r,paperStyle:{maxWidth:a?void 0:456,width:a?"90%":void 0},children:ke(qe,{children:[ke("div",{style:{display:"flex",flexDirection:"column",gap:24},children:[T(Ee,{children:e&&T("div",{children:i})}),T(Me,{variant:"titleMD",textAlign:"center",children:"Instru\xE7\xF5es enviadas"}),T(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."})]}),T(Pt,{fullWidth:!0,onClick:t,children:"Voltar para login"})]})})}import{Button as Et,LIcon as K}from"@s_mart/core";import{Typography as M}from"@mui/material";import{TextField as ze}from"@s_mart/form";import{required as Mt}from"@s_mart/rules";import{lineCheck as Y}from"@s_mart/regular-icons";import{styled as b}from"@mui/material";import{colorPalette as R}from"@s_mart/tokens";import{toRem as u}from"@s_mart/utils";var we=b("div")`
|
|
196
196
|
display: grid;
|
|
197
197
|
gap: ${u(32)};
|
|
198
|
-
`,
|
|
198
|
+
`,Le=b("header")`
|
|
199
199
|
display: grid;
|
|
200
200
|
text-align: center;
|
|
201
201
|
gap: ${u(16)};
|
|
202
|
-
`,
|
|
202
|
+
`,Ne=b("div")`
|
|
203
203
|
display: grid;
|
|
204
204
|
gap: ${u(32)};
|
|
205
|
-
`,
|
|
205
|
+
`,Re=b("div")`
|
|
206
206
|
display: grid;
|
|
207
207
|
gap: ${u(4)};
|
|
208
208
|
|
|
@@ -221,17 +221,17 @@ 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
|
-
`,
|
|
224
|
+
`,We=b("div")`
|
|
225
225
|
display: flex;
|
|
226
226
|
flex-wrap: wrap;
|
|
227
227
|
gap: ${u(8)};
|
|
228
|
-
`,
|
|
228
|
+
`,W=b("div")`
|
|
229
229
|
display: flex;
|
|
230
230
|
align-items: center;
|
|
231
231
|
gap: ${u(4)};
|
|
232
232
|
|
|
233
|
-
color: ${
|
|
234
|
-
border: 1px solid ${
|
|
233
|
+
color: ${R.neutral[600]};
|
|
234
|
+
border: 1px solid ${R.neutral[600]};
|
|
235
235
|
border-radius: ${u(4)};
|
|
236
236
|
padding: ${u(3)} ${u(4)};
|
|
237
237
|
|
|
@@ -239,10 +239,10 @@ import{LIcon as Je}from"@s_mart/core";import{Typography as Ge}from"@mui/material
|
|
|
239
239
|
vertical-align: middle;
|
|
240
240
|
|
|
241
241
|
${({checked:e})=>{if(e)return`
|
|
242
|
-
color: ${
|
|
243
|
-
border-color: ${
|
|
242
|
+
color: ${R.green[300]};
|
|
243
|
+
border-color: ${R.green[300]};
|
|
244
244
|
`}}
|
|
245
|
-
`;
|
|
245
|
+
`;import{FormProvider as kt,useForm as wt,useWatch as Lt}from"react-hook-form";var De=e=>e?e.match(/[a-z]/i):!1,Ie=e=>e?e.match(/[0-9]/i):!1,Ve=e=>e?e.length>=6:!1;import{jsx as s,jsxs as g}from"react/jsx-runtime";function Nt({logo:e,onTrocarMinhaSenha:t,...r}){let i=wt(),a=Lt({control:i.control,name:"senha"}),n=typeof e=="string"?s("img",{src:e,alt:"Logo do sistema"}):e,f=De(a),C=Ie(a),v=Ve(a);return s(l,{...r,children:g(we,{children:[g(Le,{children:[e&&s("div",{children:n}),s(M,{variant:"titleSM",children:"Vamos cadastrar uma nova senha de acesso."})]}),s(kt,{...i,children:s("form",{onSubmit:y=>{y.preventDefault(),y.stopPropagation(),i.handleSubmit(t)(y)},children:g(Ne,{children:[g(Re,{children:[g("div",{children:[s(ze,{type:"password",name:"senha",label:"Senha de acesso",required:!0,rules:Mt}),s(ze,{type:"password",name:"confirmarSenha",label:"Confirme sua senha",required:!0,rules:{validate:y=>{if(!y)return"Campo obrigat\xF3rio";if(y!==a)return"As senhas devem ser iguais"}}})]}),g("div",{children:[s(M,{variant:"bodyXS",children:"Sua senha precisa conter:"}),g(We,{children:[g(W,{checked:!!f,children:[f&&s(K,{icon:Y,size:"16px",removeMargin:!0}),s(M,{variant:"bodyXS",children:"Uma letra"})]}),g(W,{checked:!!C,children:[C&&s(K,{icon:Y,size:"16px",removeMargin:!0}),s(M,{variant:"bodyXS",children:"Um n\xFAmero"})]}),g(W,{checked:!!v,children:[v&&s(K,{icon:Y,size:"16px",removeMargin:!0}),s(M,{variant:"bodyXS",children:"M\xEDnimo de 6 caracteres"})]})]})]})]}),s(Et,{type:"submit",fullWidth:!0,children:"Trocar minha senha"})]})})})]})})}import{Button as Ae}from"@s_mart/core";import{Typography as Qe,useMediaQuery as Rt}from"@mui/material";import{styled as Z}from"@mui/material";import{toRem as k}from"@s_mart/utils";var He=Z("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
|
-
`,
|
|
253
|
+
`,_e=Z("header")`
|
|
254
254
|
display: grid;
|
|
255
255
|
text-align: center;
|
|
256
256
|
gap: ${k(16)};
|
|
257
|
-
`,
|
|
257
|
+
`,Xe=Z("div")`
|
|
258
258
|
display: grid;
|
|
259
259
|
gap: ${k(32)};
|
|
260
260
|
|
|
@@ -262,4 +262,4 @@ import{LIcon as Je}from"@s_mart/core";import{Typography as Ge}from"@mui/material
|
|
|
262
262
|
display: grid;
|
|
263
263
|
gap: ${k(16)};
|
|
264
264
|
}
|
|
265
|
-
`;import{Form as
|
|
265
|
+
`;import{Form as Wt,TextField as Dt}from"@s_mart/form";import{composeValidators as It,email as Vt,required as zt}from"@s_mart/rules";import{jsx as h,jsxs as D}from"react/jsx-runtime";function Ht({logo:e,onVoltarParaLogin:t,onConfirmar:r,...i}){let a=typeof e=="string"?h("img",{src:e,alt:"Logo do sistema"}):e,n=Rt("(max-width: 500px)");return h(l,{...i,paperStyle:{minWidth:n?void 0:456,width:n?"90%":void 0},children:D(He,{children:[D("div",{style:{display:"flex",flexDirection:"column",gap:24},children:[h(_e,{children:e&&h("div",{children:a})}),h(Qe,{variant:"titleMD",textAlign:"center",children:"Esqueceu a senha?"}),h(Qe,{variant:"bodySM",textAlign:"center",children:"Informe seu e-mail de acesso para receber instru\xE7\xF5es e criar uma nova senha."})]}),h(Wt,{onSubmit:r,children:D(Xe,{children:[h("div",{children:h(Dt,{name:"email",label:"E-mail de acesso",required:!0,rules:It([zt,Vt]),type:"email"})}),D("div",{children:[h(Ae,{fullWidth:!0,type:"submit",children:"Confirmar"}),h(Ae,{fullWidth:!0,onClick:t,variant:"neutral",children:"Voltar para login"})]})]})})]})})}export{he as TelaCadastro,Ft as TelaConviteExpirado,Ht as TelaEsqueceuSenha,qt as TelaInstrucoesEnviadas,Tt as TelaLogin,Nt as TelaNovaSenha,l as TemplateTelaBase};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@s_mart/telas-de-acesso",
|
|
3
|
-
"version": "10.0
|
|
3
|
+
"version": "10.1.0",
|
|
4
4
|
"main": "./dist/index.mjs",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"types": "./dist/index.d.mts",
|
|
@@ -10,47 +10,51 @@
|
|
|
10
10
|
"dist/**"
|
|
11
11
|
],
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"
|
|
14
|
-
"
|
|
13
|
+
"react-is": "^18.3.1",
|
|
14
|
+
"tsup": "8.5.0",
|
|
15
|
+
"@s_mart/rules": "5.2.0"
|
|
15
16
|
},
|
|
16
17
|
"peerDependencies": {
|
|
17
18
|
"@emotion/react": "^11.11.4",
|
|
18
19
|
"@emotion/styled": "^11.13.0",
|
|
19
|
-
"@mui/material": "^
|
|
20
|
-
"@mui/system": "^
|
|
21
|
-
"@types/node": ">=
|
|
22
|
-
"@types/react": "
|
|
23
|
-
"@types/react-dom": "
|
|
24
|
-
"react": "
|
|
25
|
-
"react-dom": "
|
|
20
|
+
"@mui/material": "^7.2.0",
|
|
21
|
+
"@mui/system": "^7.2.0",
|
|
22
|
+
"@types/node": ">=22.15.17",
|
|
23
|
+
"@types/react": "^18.3.12",
|
|
24
|
+
"@types/react-dom": "^18.3.1",
|
|
25
|
+
"react": "^18.3.1",
|
|
26
|
+
"react-dom": "^18.3.1",
|
|
26
27
|
"react-hook-form": "^7.51.0",
|
|
27
28
|
"typescript": ">=5.4.2",
|
|
28
|
-
"@s_mart/core": "
|
|
29
|
-
"@s_mart/form": "
|
|
30
|
-
"@s_mart/
|
|
31
|
-
"@s_mart/
|
|
32
|
-
"@s_mart/
|
|
33
|
-
"@s_mart/tokens": "
|
|
34
|
-
"@s_mart/utils": "5.
|
|
29
|
+
"@s_mart/core": "10.1.0",
|
|
30
|
+
"@s_mart/form": "10.2.0",
|
|
31
|
+
"@s_mart/regular-icons": "6.0.12",
|
|
32
|
+
"@s_mart/hooks": "8.1.2",
|
|
33
|
+
"@s_mart/masks": "5.3.0",
|
|
34
|
+
"@s_mart/tokens": "6.0.0",
|
|
35
|
+
"@s_mart/utils": "5.4.0"
|
|
35
36
|
},
|
|
36
37
|
"publishConfig": {
|
|
37
38
|
"access": "public"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
41
|
"@emotion/styled": "^11.13.0",
|
|
41
|
-
"@mui/material": "^
|
|
42
|
-
"@mui/system": "^
|
|
43
|
-
"@types/node": ">=
|
|
44
|
-
"@types/react": "
|
|
45
|
-
"@types/react-dom": "
|
|
42
|
+
"@mui/material": "^7.2.0",
|
|
43
|
+
"@mui/system": "^7.2.0",
|
|
44
|
+
"@types/node": ">=22.15.17",
|
|
45
|
+
"@types/react": "^18.3.12",
|
|
46
|
+
"@types/react-dom": "^18.3.1",
|
|
46
47
|
"typescript": ">=5.4.2",
|
|
47
|
-
"@s_mart/core": "
|
|
48
|
-
"@s_mart/form": "
|
|
49
|
-
"@s_mart/hooks": "8.
|
|
50
|
-
"@s_mart/masks": "5.
|
|
51
|
-
"@s_mart/regular-icons": "6.0.
|
|
52
|
-
"@s_mart/tokens": "
|
|
53
|
-
"@s_mart/utils": "5.
|
|
48
|
+
"@s_mart/core": "10.1.0",
|
|
49
|
+
"@s_mart/form": "10.2.0",
|
|
50
|
+
"@s_mart/hooks": "8.1.2",
|
|
51
|
+
"@s_mart/masks": "5.3.0",
|
|
52
|
+
"@s_mart/regular-icons": "6.0.12",
|
|
53
|
+
"@s_mart/tokens": "6.0.0",
|
|
54
|
+
"@s_mart/utils": "5.4.0"
|
|
55
|
+
},
|
|
56
|
+
"overrides": {
|
|
57
|
+
"react-is": "^18.3.1"
|
|
54
58
|
},
|
|
55
59
|
"scripts": {
|
|
56
60
|
"build": "tsup src/index.tsx --minify --format esm --dts --external react",
|