@s_mart/telas-de-acesso 4.0.2 → 5.0.1
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 +86 -201
- package/package.json +23 -16
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
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`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
align-items: center;
|
|
@@ -18,7 +18,7 @@ var t2=Object.create;var k1=Object.defineProperty;var l2=Object.getOwnPropertyDe
|
|
|
18
18
|
@media (max-height: 600px) {
|
|
19
19
|
justify-content: flex-start;
|
|
20
20
|
}
|
|
21
|
-
`,
|
|
21
|
+
`,te=B.div`
|
|
22
22
|
position: absolute;
|
|
23
23
|
left: 0;
|
|
24
24
|
bottom: 32px;
|
|
@@ -27,26 +27,26 @@ var t2=Object.create;var k1=Object.defineProperty;var l2=Object.getOwnPropertyDe
|
|
|
27
27
|
@media (max-width: 768px) {
|
|
28
28
|
display: none;
|
|
29
29
|
}
|
|
30
|
-
`,
|
|
30
|
+
`,oe=B.h1`
|
|
31
31
|
position: absolute;
|
|
32
32
|
left: 32px;
|
|
33
33
|
top: 32px;
|
|
34
34
|
|
|
35
35
|
color: ${({theme:e})=>e.palette.common.white};
|
|
36
|
-
font-size: ${
|
|
36
|
+
font-size: ${p(32)};
|
|
37
37
|
line-height: 150%;
|
|
38
38
|
font-weight: normal;
|
|
39
39
|
|
|
40
40
|
@media (max-width: 768px) {
|
|
41
41
|
left: 16px;
|
|
42
42
|
top: 16px;
|
|
43
|
-
font-size: ${
|
|
43
|
+
font-size: ${p(24)};
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
@media (max-height: 830px) {
|
|
47
47
|
left: 16px;
|
|
48
48
|
top: 16px;
|
|
49
|
-
font-size: ${
|
|
49
|
+
font-size: ${p(24)};
|
|
50
50
|
|
|
51
51
|
@media (max-width: 768px) {
|
|
52
52
|
display: none;
|
|
@@ -59,35 +59,35 @@ var t2=Object.create;var k1=Object.defineProperty;var l2=Object.getOwnPropertyDe
|
|
|
59
59
|
|
|
60
60
|
span {
|
|
61
61
|
background-color: #262626;
|
|
62
|
-
padding: ${
|
|
63
|
-
border-radius: ${
|
|
62
|
+
padding: ${p(4)} ${p(8)};
|
|
63
|
+
border-radius: ${p(12)};
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
@media (max-width: 500px) {
|
|
67
67
|
display: none;
|
|
68
68
|
}
|
|
69
|
-
`,
|
|
69
|
+
`,re=B.div`
|
|
70
70
|
position: relative;
|
|
71
71
|
z-index: 2;
|
|
72
72
|
|
|
73
|
-
padding: ${
|
|
74
|
-
border-radius: ${
|
|
75
|
-
margin: ${
|
|
73
|
+
padding: ${p(32)};
|
|
74
|
+
border-radius: ${p(24)};
|
|
75
|
+
margin: ${p(16)};
|
|
76
76
|
|
|
77
77
|
background-color: ${({theme:e})=>e.palette.common.white};
|
|
78
|
-
`,
|
|
78
|
+
`,ne=B.button`
|
|
79
79
|
position: relative;
|
|
80
80
|
z-index: 2;
|
|
81
81
|
|
|
82
82
|
background-color: ${({theme:e})=>e.palette.primary.main};
|
|
83
|
-
padding: ${
|
|
83
|
+
padding: ${p(4)} ${p(8)};
|
|
84
84
|
border: none;
|
|
85
|
-
border-radius: ${
|
|
85
|
+
border-radius: ${p(8)};
|
|
86
86
|
cursor: pointer;
|
|
87
87
|
|
|
88
88
|
display: flex;
|
|
89
89
|
align-items: center;
|
|
90
|
-
gap: ${
|
|
90
|
+
gap: ${p(4)};
|
|
91
91
|
|
|
92
92
|
color: ${({theme:e})=>e.palette.common.white};
|
|
93
93
|
|
|
@@ -96,285 +96,170 @@ var t2=Object.create;var k1=Object.defineProperty;var l2=Object.getOwnPropertyDe
|
|
|
96
96
|
background-color: transparent;
|
|
97
97
|
|
|
98
98
|
svg {
|
|
99
|
-
color: ${
|
|
99
|
+
color: ${He.green[300]};
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
`;import{jsx as
|
|
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`
|
|
103
103
|
display: grid;
|
|
104
|
-
gap: ${
|
|
105
|
-
|
|
104
|
+
gap: ${l(32)};
|
|
105
|
+
`,se=S.header`
|
|
106
106
|
display: grid;
|
|
107
107
|
text-align: center;
|
|
108
|
-
gap: ${
|
|
109
|
-
`,
|
|
108
|
+
gap: ${l(16)};
|
|
109
|
+
`,pe=S.div`
|
|
110
110
|
display: grid;
|
|
111
|
-
gap: ${
|
|
112
|
-
`,
|
|
111
|
+
gap: ${l(32)};
|
|
112
|
+
`,de=S.div`
|
|
113
113
|
display: grid;
|
|
114
|
-
gap: ${
|
|
114
|
+
gap: ${l(4)};
|
|
115
115
|
|
|
116
116
|
> div:first-of-type {
|
|
117
117
|
display: grid;
|
|
118
118
|
grid-template-columns: 1fr 1fr;
|
|
119
|
-
gap: ${
|
|
119
|
+
gap: ${l(16)};
|
|
120
120
|
|
|
121
121
|
@media (max-width: 768px) {
|
|
122
122
|
grid-template-columns: 1fr;
|
|
123
|
-
gap: ${
|
|
123
|
+
gap: ${l(8)};
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
> div:last-of-type {
|
|
128
128
|
display: grid;
|
|
129
|
-
gap: ${
|
|
129
|
+
gap: ${l(4)};
|
|
130
130
|
}
|
|
131
|
-
`,
|
|
131
|
+
`,le=S.div`
|
|
132
132
|
display: flex;
|
|
133
133
|
flex-wrap: wrap;
|
|
134
|
-
gap: ${
|
|
135
|
-
`,
|
|
134
|
+
gap: ${l(8)};
|
|
135
|
+
`,D=S.div`
|
|
136
136
|
display: flex;
|
|
137
137
|
align-items: center;
|
|
138
|
-
gap: ${
|
|
138
|
+
gap: ${l(4)};
|
|
139
139
|
|
|
140
|
-
color: ${
|
|
141
|
-
border: 1px solid ${
|
|
142
|
-
border-radius: ${
|
|
143
|
-
padding: ${
|
|
140
|
+
color: ${R.neutral[600]};
|
|
141
|
+
border: 1px solid ${R.neutral[600]};
|
|
142
|
+
border-radius: ${l(4)};
|
|
143
|
+
padding: ${l(3)} ${l(4)};
|
|
144
144
|
|
|
145
145
|
line-height: 1em;
|
|
146
146
|
vertical-align: middle;
|
|
147
147
|
|
|
148
148
|
${({checked:e})=>{if(e)return`
|
|
149
|
-
color: ${
|
|
150
|
-
border-color: ${
|
|
149
|
+
color: ${R.green[300]};
|
|
150
|
+
border-color: ${R.green[300]};
|
|
151
151
|
`}}
|
|
152
|
-
`;function
|
|
153
|
-
display: flex;
|
|
154
|
-
align-items: center;
|
|
155
|
-
justify-content: space-between;
|
|
156
|
-
gap: ${i(8)};
|
|
157
|
-
|
|
158
|
-
background-color: white;
|
|
159
|
-
border-radius: 4px;
|
|
160
|
-
padding: ${i(16)} ${i(16)};
|
|
161
|
-
|
|
162
|
-
box-shadow: 0px 3px 12px rgba(0, 0, 0, 0.12);
|
|
163
|
-
|
|
164
|
-
border-left: 6px solid
|
|
165
|
-
${({variant:e})=>{switch(e){case"error":return d.red[300];case"warning":return d.yellow[300];case"info":return d.blue[100];default:case"success":return d.green[300]}}};
|
|
166
|
-
|
|
167
|
-
> div {
|
|
168
|
-
display: flex;
|
|
169
|
-
align-items: center;
|
|
170
|
-
gap: ${i(8)};
|
|
171
|
-
}
|
|
172
|
-
`,Pe=C1.div`
|
|
173
|
-
display: flex;
|
|
174
|
-
flex-direction: column;
|
|
175
|
-
justify-content: center;
|
|
176
|
-
|
|
177
|
-
> *:first-of-type {
|
|
178
|
-
margin-bottom: ${i(4)};
|
|
179
|
-
}
|
|
180
|
-
`,$e=C1.div`
|
|
181
|
-
cursor: pointer;
|
|
182
|
-
align-self: flex-start;
|
|
183
|
-
`,Oe=j2.i`
|
|
184
|
-
align-self: center;
|
|
185
|
-
display: inline-flex;
|
|
186
|
-
color: ${({color:e})=>e};
|
|
187
|
-
|
|
188
|
-
user-select: none;
|
|
189
|
-
|
|
190
|
-
svg {
|
|
191
|
-
z-index: 0 !important;
|
|
192
|
-
outline: 0 !important;
|
|
193
|
-
|
|
194
|
-
${({left:e})=>(typeof e=="string"||typeof e=="number"&&e>0)&&$`
|
|
195
|
-
left: ${e};
|
|
196
|
-
`}
|
|
197
|
-
|
|
198
|
-
${({right:e})=>(typeof e=="string"||typeof e=="number"&&e>0)&&$`
|
|
199
|
-
right: ${e};
|
|
200
|
-
`}
|
|
201
|
-
|
|
202
|
-
${({top:e})=>(typeof e=="string"||typeof e=="number"&&e>0)&&$`
|
|
203
|
-
top: ${e};
|
|
204
|
-
`}
|
|
205
|
-
|
|
206
|
-
${({bottom:e})=>(typeof e=="string"||typeof e=="number"&&e>0)&&$`
|
|
207
|
-
bottom: ${e};
|
|
208
|
-
`}
|
|
209
|
-
|
|
210
|
-
${({color:e})=>{let a=e;return e==="inherit"&&(a="currentColor"),$`
|
|
211
|
-
fill: ${a};
|
|
212
|
-
`}}
|
|
213
|
-
position: relative;
|
|
214
|
-
|
|
215
|
-
height: ${({height:e})=>e} !important;
|
|
216
|
-
width: ${({width:e})=>e} !important;
|
|
217
|
-
|
|
218
|
-
${({removeMargin:e})=>e?$`
|
|
219
|
-
margin: 0;
|
|
220
|
-
`:$`
|
|
221
|
-
margin: 0 ${i(4)};
|
|
222
|
-
`}
|
|
223
|
-
}
|
|
224
|
-
`;function N(){return N=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},N.apply(this,arguments)}var Y2=typeof window<"u"?h1.useLayoutEffect:h1.useEffect,Q2=Y2;function e0(e,a){let r=N({},a);return Object.keys(e).forEach(t=>{if(t.toString().match(/^(components|slots)$/))r[t]=N({},e[t],r[t]);else if(t.toString().match(/^(componentsProps|slotProps)$/)){let n=e[t]||{},o=a[t];r[t]={},!o||!Object.keys(o)?r[t]=n:!n||!Object.keys(n)?r[t]=o:(r[t]=N({},o),Object.keys(n).forEach(v=>{r[t][v]=e0(n[v],o[v])}))}else r[t]===void 0&&(r[t]=e[t])}),r}function X2(e){return Object.keys(e).length===0}function G2(e=null){let a=a0.useContext(K2);return!a||X2(a)?e:a}var J2=G2;function e3(e){let{theme:a,name:r,props:t}=e;return!a||!a.components||!a.components[r]||!a.components[r].defaultProps?t:e0(a.components[r].defaultProps,t)}var a3=Q2;function r3(e,a,r,t,n){let[o,v]=V.useState(()=>n&&r?r(e).matches:t?t(e).matches:a);return a3(()=>{let m=!0;if(!r)return;let s=r(e),q=()=>{m&&v(s.matches)};return q(),s.addListener(q),()=>{m=!1,s.removeListener(q)}},[e,r]),o}var r0=V.useSyncExternalStore;function n3(e,a,r,t,n){let o=V.useCallback(()=>a,[a]),v=V.useMemo(()=>{if(n&&r)return()=>r(e).matches;if(t!==null){let{matches:q}=t(e);return()=>q}return o},[o,e,t,n,r]),[m,s]=V.useMemo(()=>{if(r===null)return[o,()=>()=>{}];let q=r(e);return[()=>q.matches,g=>(q.addListener(g),()=>{q.removeListener(g)})]},[o,r,e]);return r0(s,m,v)}function i3(e,a={}){let r=J2(),t=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:n=!1,matchMedia:o=t?window.matchMedia:null,ssrMatchMedia:v=null,noSsr:m=!1}=e3({name:"MuiUseMediaQuery",props:a,theme:r});process.env.NODE_ENV!=="production"&&typeof e=="function"&&r===null&&console.error(["MUI: The `query` argument provided is invalid.","You are providing a function without a theme in the context.","One of the parent elements needs to use a ThemeProvider."].join(`
|
|
225
|
-
`));let s=typeof e=="function"?e(r):e;s=s.replace(/^@media( ?)/m,"");let q=(r0!==void 0?n3:r3)(s,n,o,v,m);return process.env.NODE_ENV!=="production"&&V.useDebugValue({query:s,match:q}),q}var T=(e,a)=>i3(e,a);import b1 from"@emotion/styled";var n0=b1.div`
|
|
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`
|
|
226
153
|
display: grid;
|
|
227
|
-
gap: ${
|
|
228
|
-
`,
|
|
154
|
+
gap: ${F(32)};
|
|
155
|
+
`,fe=A.header`
|
|
229
156
|
display: grid;
|
|
230
157
|
text-align: center;
|
|
231
|
-
gap: ${
|
|
232
|
-
`,
|
|
158
|
+
gap: ${F(16)};
|
|
159
|
+
`,he=A.div`
|
|
233
160
|
display: grid;
|
|
234
|
-
gap: ${
|
|
161
|
+
gap: ${F(16)};
|
|
235
162
|
|
|
236
163
|
> div {
|
|
237
164
|
display: grid;
|
|
238
|
-
gap: ${
|
|
165
|
+
gap: ${F(16)};
|
|
239
166
|
}
|
|
240
167
|
|
|
241
168
|
> div:last-of-type {
|
|
242
|
-
gap: ${
|
|
169
|
+
gap: ${F(8)};
|
|
243
170
|
}
|
|
244
|
-
`;import{jsx as
|
|
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`
|
|
245
172
|
display: grid;
|
|
246
|
-
gap: ${
|
|
173
|
+
gap: ${Q(32)};
|
|
247
174
|
|
|
248
175
|
> div {
|
|
249
176
|
display: grid;
|
|
250
|
-
gap: ${
|
|
177
|
+
gap: ${Q(8)};
|
|
251
178
|
}
|
|
252
|
-
`,
|
|
179
|
+
`,Te=ve.header`
|
|
253
180
|
display: grid;
|
|
254
181
|
text-align: center;
|
|
255
|
-
gap: ${
|
|
256
|
-
`;import{jsx as
|
|
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`
|
|
257
184
|
display: grid;
|
|
258
|
-
gap: ${
|
|
185
|
+
gap: ${O(32)};
|
|
259
186
|
|
|
260
187
|
> div {
|
|
261
188
|
display: grid;
|
|
262
|
-
gap: ${
|
|
189
|
+
gap: ${O(16)};
|
|
263
190
|
}
|
|
264
|
-
`,
|
|
191
|
+
`,qe=be.header`
|
|
265
192
|
display: grid;
|
|
266
193
|
text-align: center;
|
|
267
|
-
gap: ${
|
|
268
|
-
`;import{jsx as
|
|
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`
|
|
269
196
|
display: grid;
|
|
270
|
-
gap: ${
|
|
271
|
-
`,
|
|
197
|
+
gap: ${u(32)};
|
|
198
|
+
`,ke=$.header`
|
|
272
199
|
display: grid;
|
|
273
200
|
text-align: center;
|
|
274
|
-
gap: ${
|
|
275
|
-
`,
|
|
201
|
+
gap: ${u(16)};
|
|
202
|
+
`,Ee=$.div`
|
|
276
203
|
display: grid;
|
|
277
|
-
gap: ${
|
|
278
|
-
`,
|
|
204
|
+
gap: ${u(32)};
|
|
205
|
+
`,we=$.div`
|
|
279
206
|
display: grid;
|
|
280
|
-
gap: ${
|
|
207
|
+
gap: ${u(4)};
|
|
281
208
|
|
|
282
209
|
> div:first-of-type {
|
|
283
210
|
display: grid;
|
|
284
211
|
grid-template-columns: 1fr 1fr;
|
|
285
|
-
gap: ${
|
|
212
|
+
gap: ${u(16)};
|
|
286
213
|
|
|
287
214
|
@media (max-width: 768px) {
|
|
288
215
|
grid-template-columns: 1fr;
|
|
289
|
-
gap: ${
|
|
216
|
+
gap: ${u(8)};
|
|
290
217
|
}
|
|
291
218
|
}
|
|
292
219
|
|
|
293
220
|
> div:last-of-type {
|
|
294
221
|
display: grid;
|
|
295
|
-
gap: ${
|
|
222
|
+
gap: ${u(4)};
|
|
296
223
|
}
|
|
297
|
-
`,
|
|
224
|
+
`,Le=$.div`
|
|
298
225
|
display: flex;
|
|
299
226
|
flex-wrap: wrap;
|
|
300
|
-
gap: ${
|
|
301
|
-
`,
|
|
227
|
+
gap: ${u(8)};
|
|
228
|
+
`,_=$.div`
|
|
302
229
|
display: flex;
|
|
303
230
|
align-items: center;
|
|
304
|
-
gap: ${
|
|
231
|
+
gap: ${u(4)};
|
|
305
232
|
|
|
306
|
-
color: ${
|
|
307
|
-
border: 1px solid ${
|
|
308
|
-
border-radius: ${
|
|
309
|
-
padding: ${
|
|
233
|
+
color: ${W.neutral[600]};
|
|
234
|
+
border: 1px solid ${W.neutral[600]};
|
|
235
|
+
border-radius: ${u(4)};
|
|
236
|
+
padding: ${u(3)} ${u(4)};
|
|
310
237
|
|
|
311
238
|
line-height: 1em;
|
|
312
239
|
vertical-align: middle;
|
|
313
240
|
|
|
314
241
|
${({checked:e})=>{if(e)return`
|
|
315
|
-
color: ${
|
|
316
|
-
border-color: ${
|
|
242
|
+
color: ${W.green[300]};
|
|
243
|
+
border-color: ${W.green[300]};
|
|
317
244
|
`}}
|
|
318
|
-
`;function
|
|
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`
|
|
319
246
|
display: grid;
|
|
320
|
-
gap: ${
|
|
247
|
+
gap: ${w(32)};
|
|
321
248
|
|
|
322
249
|
> div {
|
|
323
250
|
display: grid;
|
|
324
|
-
gap: ${
|
|
251
|
+
gap: ${w(16)};
|
|
325
252
|
}
|
|
326
|
-
`,
|
|
253
|
+
`,We=K.header`
|
|
327
254
|
display: grid;
|
|
328
255
|
text-align: center;
|
|
329
|
-
gap: ${
|
|
330
|
-
`,
|
|
256
|
+
gap: ${w(16)};
|
|
257
|
+
`,_e=K.div`
|
|
331
258
|
display: grid;
|
|
332
|
-
gap: ${
|
|
259
|
+
gap: ${w(32)};
|
|
333
260
|
|
|
334
261
|
> div:last-of-type {
|
|
335
262
|
display: grid;
|
|
336
|
-
gap: ${
|
|
263
|
+
gap: ${w(16)};
|
|
337
264
|
}
|
|
338
|
-
`;import{Form as
|
|
339
|
-
/*! Bundled license information:
|
|
340
|
-
|
|
341
|
-
@mui/styled-engine/index.js:
|
|
342
|
-
(**
|
|
343
|
-
* @mui/styled-engine v5.14.6
|
|
344
|
-
*
|
|
345
|
-
* @license MIT
|
|
346
|
-
* This source code is licensed under the MIT license found in the
|
|
347
|
-
* LICENSE file in the root directory of this source tree.
|
|
348
|
-
*)
|
|
349
|
-
|
|
350
|
-
@mui/material/index.js:
|
|
351
|
-
(**
|
|
352
|
-
* @mui/material v5.14.6
|
|
353
|
-
*
|
|
354
|
-
* @license MIT
|
|
355
|
-
* This source code is licensed under the MIT license found in the
|
|
356
|
-
* LICENSE file in the root directory of this source tree.
|
|
357
|
-
*)
|
|
358
|
-
*/
|
|
359
|
-
/*! Bundled license information:
|
|
360
|
-
|
|
361
|
-
react-is/cjs/react-is.production.min.js:
|
|
362
|
-
(** @license React v16.13.1
|
|
363
|
-
* react-is.production.min.js
|
|
364
|
-
*
|
|
365
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
366
|
-
*
|
|
367
|
-
* This source code is licensed under the MIT license found in the
|
|
368
|
-
* LICENSE file in the root directory of this source tree.
|
|
369
|
-
*)
|
|
370
|
-
|
|
371
|
-
react-is/cjs/react-is.development.js:
|
|
372
|
-
(** @license React v16.13.1
|
|
373
|
-
* react-is.development.js
|
|
374
|
-
*
|
|
375
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
376
|
-
*
|
|
377
|
-
* This source code is licensed under the MIT license found in the
|
|
378
|
-
* LICENSE file in the root directory of this source tree.
|
|
379
|
-
*)
|
|
380
|
-
*/
|
|
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};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@s_mart/telas-de-acesso",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -9,20 +9,20 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
"dist/**"
|
|
11
11
|
],
|
|
12
|
-
"scripts": {
|
|
13
|
-
"build": "tsup src/index.tsx --minify --format esm --dts --external react",
|
|
14
|
-
"dev": "tsup src/index.tsx --format esm --watch --dts --external react",
|
|
15
|
-
"lint": "eslint src/**/*.ts* --fix"
|
|
16
|
-
},
|
|
17
12
|
"dependencies": {
|
|
18
13
|
"tsup": "^6.7.0",
|
|
19
14
|
"typescript": "^5.2.2",
|
|
20
15
|
"@types/react": "^18.2.21",
|
|
21
16
|
"@types/react-dom": "18.2.4",
|
|
22
|
-
"@s_mart/core": "
|
|
23
|
-
"@s_mart/form": "
|
|
24
|
-
"@s_mart/masks": "
|
|
25
|
-
"@s_mart/rules": "
|
|
17
|
+
"@s_mart/core": "5.0.1",
|
|
18
|
+
"@s_mart/form": "5.0.1",
|
|
19
|
+
"@s_mart/masks": "5.0.0",
|
|
20
|
+
"@s_mart/rules": "5.0.0",
|
|
21
|
+
"@s_mart/tokens": "5.0.0",
|
|
22
|
+
"@s_mart/utils": "5.0.0",
|
|
23
|
+
"@s_mart/regular-icons": "5.0.1",
|
|
24
|
+
"eslint-config-smarten": "4.0.1",
|
|
25
|
+
"@s_mart/hooks": "5.0.1"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"react": ">=18.2.0",
|
|
@@ -33,16 +33,23 @@
|
|
|
33
33
|
"@types/react-dom": ">=18.2.7",
|
|
34
34
|
"@emotion/react": ">=11.10.8",
|
|
35
35
|
"@emotion/styled": ">=11.10.8",
|
|
36
|
-
"@s_mart/core": "
|
|
37
|
-
"@s_mart/form": "
|
|
38
|
-
"@s_mart/masks": "
|
|
36
|
+
"@s_mart/core": "5.0.1",
|
|
37
|
+
"@s_mart/form": "5.0.1",
|
|
38
|
+
"@s_mart/masks": "5.0.0",
|
|
39
|
+
"@s_mart/tokens": "5.0.0",
|
|
40
|
+
"@s_mart/utils": "5.0.0",
|
|
41
|
+
"@s_mart/regular-icons": "5.0.1",
|
|
42
|
+
"@s_mart/hooks": "5.0.1"
|
|
39
43
|
},
|
|
40
44
|
"devDependencies": {
|
|
41
|
-
"
|
|
42
|
-
"eslint": "^8.47.0",
|
|
43
|
-
"eslint-config-smarten": "*"
|
|
45
|
+
"eslint": "^8.47.0"
|
|
44
46
|
},
|
|
45
47
|
"publishConfig": {
|
|
46
48
|
"access": "public"
|
|
49
|
+
},
|
|
50
|
+
"scripts": {
|
|
51
|
+
"build": "tsup src/index.tsx --minify --format esm --dts --external react",
|
|
52
|
+
"dev": "tsup src/index.tsx --format esm --watch --dts --external react",
|
|
53
|
+
"lint": "eslint src/**/*.ts* --fix"
|
|
47
54
|
}
|
|
48
55
|
}
|