@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.
Files changed (2) hide show
  1. package/dist/index.mjs +86 -201
  2. package/package.json +23 -16
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- var t2=Object.create;var k1=Object.defineProperty;var l2=Object.getOwnPropertyDescriptor;var o2=Object.getOwnPropertyNames;var s2=Object.getPrototypeOf,c2=Object.prototype.hasOwnProperty;var K=(e,a)=>()=>(a||e((a={exports:{}}).exports,a),a.exports);var h2=(e,a,r,t)=>{if(a&&typeof a=="object"||typeof a=="function")for(let n of o2(a))!c2.call(e,n)&&n!==r&&k1(e,n,{get:()=>a[n],enumerable:!(t=l2(a,n))||t.enumerable});return e};var q2=(e,a,r)=>(r=e!=null?t2(s2(e)):{},h2(a||!e||!e.__esModule?k1(r,"default",{value:e,enumerable:!0}):r,e));var N1=K(c=>{"use strict";var p=typeof Symbol=="function"&&Symbol.for,p1=p?Symbol.for("react.element"):60103,f1=p?Symbol.for("react.portal"):60106,e1=p?Symbol.for("react.fragment"):60107,a1=p?Symbol.for("react.strict_mode"):60108,r1=p?Symbol.for("react.profiler"):60114,n1=p?Symbol.for("react.provider"):60109,i1=p?Symbol.for("react.context"):60110,g1=p?Symbol.for("react.async_mode"):60111,t1=p?Symbol.for("react.concurrent_mode"):60111,l1=p?Symbol.for("react.forward_ref"):60112,o1=p?Symbol.for("react.suspense"):60113,T2=p?Symbol.for("react.suspense_list"):60120,s1=p?Symbol.for("react.memo"):60115,c1=p?Symbol.for("react.lazy"):60116,Z2=p?Symbol.for("react.block"):60121,w2=p?Symbol.for("react.fundamental"):60117,A2=p?Symbol.for("react.responder"):60118,P2=p?Symbol.for("react.scope"):60119;function H(e){if(typeof e=="object"&&e!==null){var a=e.$$typeof;switch(a){case p1:switch(e=e.type,e){case g1:case t1:case e1:case r1:case a1:case o1:return e;default:switch(e=e&&e.$$typeof,e){case i1:case l1:case c1:case s1:case n1:return e;default:return a}}case f1:return a}}}function B1(e){return H(e)===t1}c.AsyncMode=g1;c.ConcurrentMode=t1;c.ContextConsumer=i1;c.ContextProvider=n1;c.Element=p1;c.ForwardRef=l1;c.Fragment=e1;c.Lazy=c1;c.Memo=s1;c.Portal=f1;c.Profiler=r1;c.StrictMode=a1;c.Suspense=o1;c.isAsyncMode=function(e){return B1(e)||H(e)===g1};c.isConcurrentMode=B1;c.isContextConsumer=function(e){return H(e)===i1};c.isContextProvider=function(e){return H(e)===n1};c.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===p1};c.isForwardRef=function(e){return H(e)===l1};c.isFragment=function(e){return H(e)===e1};c.isLazy=function(e){return H(e)===c1};c.isMemo=function(e){return H(e)===s1};c.isPortal=function(e){return H(e)===f1};c.isProfiler=function(e){return H(e)===r1};c.isStrictMode=function(e){return H(e)===a1};c.isSuspense=function(e){return H(e)===o1};c.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===e1||e===t1||e===r1||e===a1||e===o1||e===T2||typeof e=="object"&&e!==null&&(e.$$typeof===c1||e.$$typeof===s1||e.$$typeof===n1||e.$$typeof===i1||e.$$typeof===l1||e.$$typeof===w2||e.$$typeof===A2||e.$$typeof===P2||e.$$typeof===Z2)};c.typeOf=H});var I1=K(h=>{"use strict";process.env.NODE_ENV!=="production"&&function(){"use strict";var e=typeof Symbol=="function"&&Symbol.for,a=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,t=e?Symbol.for("react.fragment"):60107,n=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,v=e?Symbol.for("react.provider"):60109,m=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,q=e?Symbol.for("react.concurrent_mode"):60111,g=e?Symbol.for("react.forward_ref"):60112,k=e?Symbol.for("react.suspense"):60113,z=e?Symbol.for("react.suspense_list"):60120,w=e?Symbol.for("react.memo"):60115,A=e?Symbol.for("react.lazy"):60116,j=e?Symbol.for("react.block"):60121,Y=e?Symbol.for("react.fundamental"):60117,T0=e?Symbol.for("react.responder"):60118,Z0=e?Symbol.for("react.scope"):60119;function w0(l){return typeof l=="string"||typeof l=="function"||l===t||l===q||l===o||l===n||l===k||l===z||typeof l=="object"&&l!==null&&(l.$$typeof===A||l.$$typeof===w||l.$$typeof===v||l.$$typeof===m||l.$$typeof===g||l.$$typeof===Y||l.$$typeof===T0||l.$$typeof===Z0||l.$$typeof===j)}function M(l){if(typeof l=="object"&&l!==null){var d1=l.$$typeof;switch(d1){case a:var Q=l.type;switch(Q){case s:case q:case t:case o:case n:case k:return Q;default:var L1=Q&&Q.$$typeof;switch(L1){case m:case g:case A:case w:case v:return L1;default:return d1}}case r:return d1}}}var A0=s,P0=q,$0=m,D0=v,R0=a,F0=g,O0=t,_0=A,B0=w,N0=r,I0=o,W0=n,U0=k,z1=!1;function j0(l){return z1||(z1=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),S1(l)||M(l)===s}function S1(l){return M(l)===q}function Y0(l){return M(l)===m}function Q0(l){return M(l)===v}function K0(l){return typeof l=="object"&&l!==null&&l.$$typeof===a}function X0(l){return M(l)===g}function G0(l){return M(l)===t}function J0(l){return M(l)===A}function e2(l){return M(l)===w}function a2(l){return M(l)===r}function r2(l){return M(l)===o}function n2(l){return M(l)===n}function i2(l){return M(l)===k}h.AsyncMode=A0,h.ConcurrentMode=P0,h.ContextConsumer=$0,h.ContextProvider=D0,h.Element=R0,h.ForwardRef=F0,h.Fragment=O0,h.Lazy=_0,h.Memo=B0,h.Portal=N0,h.Profiler=I0,h.StrictMode=W0,h.Suspense=U0,h.isAsyncMode=j0,h.isConcurrentMode=S1,h.isContextConsumer=Y0,h.isContextProvider=Q0,h.isElement=K0,h.isForwardRef=X0,h.isFragment=G0,h.isLazy=J0,h.isMemo=e2,h.isPortal=a2,h.isProfiler=r2,h.isStrictMode=n2,h.isSuspense=i2,h.isValidElementType=w0,h.typeOf=M}()});var W1=K((ie,M1)=>{"use strict";process.env.NODE_ENV==="production"?M1.exports=N1():M1.exports=I1()});var G1=K((te,X1)=>{"use strict";var y1=W1(),$2={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},D2={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},R2={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Q1={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},H1={};H1[y1.ForwardRef]=R2;H1[y1.Memo]=Q1;function U1(e){return y1.isMemo(e)?Q1:H1[e.$$typeof]||$2}var F2=Object.defineProperty,O2=Object.getOwnPropertyNames,j1=Object.getOwnPropertySymbols,_2=Object.getOwnPropertyDescriptor,B2=Object.getPrototypeOf,Y1=Object.prototype;function K1(e,a,r){if(typeof a!="string"){if(Y1){var t=B2(a);t&&t!==Y1&&K1(e,t,r)}var n=O2(a);j1&&(n=n.concat(j1(a)));for(var o=U1(e),v=U1(a),m=0;m<n.length;++m){var s=n[m];if(!D2[s]&&!(r&&r[s])&&!(v&&v[s])&&!(o&&o[s])){var q=_2(a,s);try{F2(e,s,q)}catch{}}}}return e}X1.exports=K1});import{LIcon as V2,Typography as x2}from"@s_mart/core";import{telefone as z2}from"@s_mart/masks";var E={description:"m37.5 11.3-19 19.4-7-7.2a1 1 0 0 0-1.2 0l-2 2.1q-.6.7 0 1.3l9.6 9.8q.6.6 1.2 0l21.6-22.1c.4-.3.4-1 0-1.3l-2-2a1 1 0 0 0-1.2 0",id:"line-check-regular"};var X={description:"M35.2 12.7a15.9 15.9 0 0 0-25 19.1L8 40l8.4-2.2a16 16 0 0 0 23.6-14 16 16 0 0 0-4.8-11.1M24 37a13 13 0 0 1-6.7-1.9l-.5-.3-5 1.3 1.3-4.8-.3-.5a13.2 13.2 0 0 1 20.5-16.3q3.9 3.8 4 9.3C37.3 31 31.3 37 24 37m7.2-10-2.7-1q-.5-.3-.9.2l-1.2 1.5q-.4.4-.9.1c-2.3-1.1-3.9-2-5.4-4.7-.4-.7.4-.6 1.2-2.1v-.7c-.2-.2-1-2.2-1.3-3s-.6-.6-.9-.6h-.7q-.5-.1-1 .4c-.4.4-1.5 1.4-1.5 3.3 0 2 1.5 3.9 1.6 4.1.2.3 2.8 4.3 6.8 6 2.5 1.1 3.5 1.2 4.8 1 .7 0 2.3-1 2.6-1.9q.5-1.5.3-1.9l-.8-.4Z",id:"line-whatsapp-regular"};var i=e=>`${e/16}rem`;import O from"@emotion/styled";var v2=Object.defineProperty,d2=(e,a)=>{for(var r in a)v2(e,r,{get:a[r],enumerable:!0})},d={};d2(d,{blue:()=>u2,green:()=>M2,neutral:()=>b2,red:()=>f2,yellow:()=>H2});var m2={75:"#AFD2FF",100:"#689DCB",300:"#045BA8",500:"#132C70"},u2=m2,p2={75:"#FEBCAC",100:"#F5917F",300:"#EF4829",500:"#BD2601"},f2=p2,g2={75:"#D6EEBC",100:"#A5D770",300:"#49BF00",500:"#518133"},M2=g2,y2={75:"#FDEFB3",100:"#FFE380",300:"#FFAB00",500:"#C56C00"},H2=y2,C2={0:"#FFFFFF",10:"#FBFBFB",20:"#F4F5F7",30:"#EEEEEE",40:"#DBDBDB",50:"#CACACA",100:"#8B8B8B",500:"#555555",600:"#464646",800:"#2E2E2E",900:"#262626"},b2=C2;var E1=O.div`
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
- `,T1=O.div`
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
- `,Z1=O.h1`
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: ${i(32)};
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: ${i(24)};
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: ${i(24)};
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: ${i(4)} ${i(8)};
63
- border-radius: ${i(12)};
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
- `,w1=O.div`
69
+ `,re=B.div`
70
70
  position: relative;
71
71
  z-index: 2;
72
72
 
73
- padding: ${i(32)};
74
- border-radius: ${i(24)};
75
- margin: ${i(16)};
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
- `,A1=O.button`
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: ${i(4)} ${i(8)};
83
+ padding: ${p(4)} ${p(8)};
84
84
  border: none;
85
- border-radius: ${i(8)};
85
+ border-radius: ${p(8)};
86
86
  cursor: pointer;
87
87
 
88
88
  display: flex;
89
89
  align-items: center;
90
- gap: ${i(4)};
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: ${d.green[300]};
99
+ color: ${He.green[300]};
100
100
  }
101
101
  }
102
- `;import{jsx as _,jsxs as m1}from"react/jsx-runtime";function y({children:e,whatsapp:a,textoChamativo:r,style:t,paperStyle:n,ilustracao:o}){return m1(E1,{style:t,children:[r&&_(Z1,{children:r}),o&&_(T1,{children:typeof o=="string"?_("img",{src:o,alt:"Logo do sistema"}):o}),_(w1,{style:n,children:e}),a&&m1(A1,{onClick:()=>{window.open(`https://api.whatsapp.com/send?phone=${a}`)},style:{marginBottom:16},children:[m1(x2,{variant:"bodyXS",children:["Com d\xFAvidas? ",z2.format(a.slice(2))]}),_(V2,{icon:X,size:"20px",removeMargin:!0})]})]})}import{Button as S2,LIcon as u1,Typography as B}from"@s_mart/core";import{Checkbox as L2,Form as k2,TextField as J}from"@s_mart/form";import{required as _1}from"@s_mart/rules";import R from"@emotion/styled";var P1=R.div`
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: ${i(32)};
105
- `,$1=R.header`
104
+ gap: ${l(32)};
105
+ `,se=S.header`
106
106
  display: grid;
107
107
  text-align: center;
108
- gap: ${i(16)};
109
- `,D1=R.div`
108
+ gap: ${l(16)};
109
+ `,pe=S.div`
110
110
  display: grid;
111
- gap: ${i(32)};
112
- `,R1=R.div`
111
+ gap: ${l(32)};
112
+ `,de=S.div`
113
113
  display: grid;
114
- gap: ${i(4)};
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: ${i(16)};
119
+ gap: ${l(16)};
120
120
 
121
121
  @media (max-width: 768px) {
122
122
  grid-template-columns: 1fr;
123
- gap: ${i(8)};
123
+ gap: ${l(8)};
124
124
  }
125
125
  }
126
126
 
127
127
  > div:last-of-type {
128
128
  display: grid;
129
- gap: ${i(4)};
129
+ gap: ${l(4)};
130
130
  }
131
- `,F1=R.div`
131
+ `,le=S.div`
132
132
  display: flex;
133
133
  flex-wrap: wrap;
134
- gap: ${i(8)};
135
- `,G=R.div`
134
+ gap: ${l(8)};
135
+ `,D=S.div`
136
136
  display: flex;
137
137
  align-items: center;
138
- gap: ${i(4)};
138
+ gap: ${l(4)};
139
139
 
140
- color: ${d.neutral[600]};
141
- border: 1px solid ${d.neutral[600]};
142
- border-radius: ${i(4)};
143
- padding: ${i(3)} ${i(4)};
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: ${d.green[300]};
150
- border-color: ${d.green[300]};
149
+ color: ${R.green[300]};
150
+ border-color: ${R.green[300]};
151
151
  `}}
152
- `;function O1(){let e=n=>n?n.match(/[a-z]/i):!1,a=n=>n?n.match(/[0-9]/i):!1,r=n=>n?n.length>=6:!1;return{senhaContemLetra:e,senhaContemNumero:a,senhaContemMinimoDe6Caracteres:r,desabilitarBotaoDeCadastro:n=>!n.email||!n.senha||!n.confirmarSenha||!n.termosDeUso||!e(n.senha)||!a(n.senha)||!r(n.senha)}}import{jsx as u,jsxs as C}from"react/jsx-runtime";function E2({logo:e,nomeSistema:a,onSubmit:r,linkTermosDeUso:t,email:n,nome:o,...v}){let{senhaContemLetra:m,senhaContemNumero:s,senhaContemMinimoDe6Caracteres:q,desabilitarBotaoDeCadastro:g}=O1();return u(y,{...v,children:C(P1,{children:[C($1,{children:[e&&u("div",{children:typeof e=="string"?u("img",{src:e,alt:"Logo do sistema"}):e}),C(B,{variant:"titleSM",children:["Vamos cadastrar uma senha de acesso ao ",a,"."]})]}),u(k2,{onSubmit:r,defaultValues:{email:n,nome:o,termosDeUso:!1},children:({watch:z})=>{let w=m(z("senha")),A=s(z("senha")),j=q(z("senha"));return C(D1,{children:[u(J,{name:"email",label:"E-mail de acesso",required:!0,disabled:!0}),u(J,{name:"nome",label:"Nome completo",required:!0,rules:_1}),C(R1,{children:[C("div",{children:[u(J,{type:"password",name:"senha",label:"Senha de acesso",required:!0,rules:_1}),u(J,{type:"password",name:"confirmarSenha",label:"Confirme sua senha",required:!0,rules:{validate:Y=>{if(!Y)return"Campo obrigat\xF3rio";if(Y!==z("senha"))return"As senhas devem ser iguais"}}})]}),C("div",{children:[u(B,{variant:"bodyXS",children:"Sua senha precisa conter:"}),C(F1,{children:[C(G,{checked:!!w,children:[w&&u(u1,{icon:E,size:"16px",removeMargin:!0}),u(B,{variant:"bodyXS",children:"Uma letra"})]}),C(G,{checked:!!A,children:[A&&u(u1,{icon:E,size:"16px",removeMargin:!0}),u(B,{variant:"bodyXS",children:"Um n\xFAmero"})]}),C(G,{checked:!!j,children:[j&&u(u1,{icon:E,size:"16px",removeMargin:!0}),u(B,{variant:"bodyXS",children:"M\xEDnimo de 6 caracteres"})]})]})]})]}),u("div",{children:u(L2,{name:"termosDeUso",label:C("div",{style:{display:"flex",gap:4},children:[u("span",{children:"Li e aceito os"}),u("a",{href:t,target:"_blank",style:{color:"var(--color-primary)"},rel:"noreferrer",children:"termos de uso"})]})})}),u("div",{children:u(S2,{type:"submit",fullWidth:!0,disabled:g(z()),children:"Concluir meu cadastro"})})]})}})]})})}import{useMemo as t3}from"react";import{Button as l0,Indicator as l3,Typography as o3}from"@s_mart/core";import{Checkbox as s3,Form as c3,TextField as o0}from"@s_mart/form";import{composeValidators as h3,required as s0,email as q3}from"@s_mart/rules";import{useEffect as W2,useState as U2}from"react";import ke from"react";import se,{forwardRef as ce,useRef as he,useCallback as qe,useLayoutEffect as ve,useEffect as de,createElement as me,useState as ue,Component as pe,useContext as fe}from"react";import{createPortal as Me}from"react-dom";var N2=q2(G1());var I2="SnackbarContent",He={root:I2+"-root"};var L="SnackbarItem",Ce={contentRoot:L+"-contentRoot",lessPadding:L+"-lessPadding",variantSuccess:L+"-variantSuccess",variantError:L+"-variantError",variantInfo:L+"-variantInfo",variantWarning:L+"-variantWarning",message:L+"-message",action:L+"-action",wrappedRoot:L+"-wrappedRoot"};var P="SnackbarContainer",be={root:P+"-root",rootDense:P+"-rootDense",top:P+"-top",bottom:P+"-bottom",left:P+"-left",right:P+"-right",center:P+"-center"};var Ve=process.env.NODE_ENV!=="production";import C1 from"@emotion/styled";import j2 from"@emotion/styled";import{css as $}from"@emotion/react";import{jsx as Be}from"react/jsx-runtime";import{Fragment as Ie,jsx as We}from"react/jsx-runtime";import{Fragment as je,jsx as Ye,jsxs as Qe}from"react/jsx-runtime";import{useEffect as Xe,useRef as Ge}from"react";import*as h1 from"react";import"@emotion/styled";import{ThemeContext as K2}from"@emotion/react";import*as a0 from"react";import*as V from"react";var J1=()=>{let[e,a]=U2(!1);return W2(()=>{let r=t=>{t.key==="CapsLock"&&a(t.getModifierState("CapsLock"))};return window.addEventListener("keydown",r),()=>{window.removeEventListener("keydown",r)}},[]),e};var Ae=C1.div`
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: ${i(32)};
228
- `,i0=b1.header`
154
+ gap: ${F(32)};
155
+ `,fe=A.header`
229
156
  display: grid;
230
157
  text-align: center;
231
- gap: ${i(16)};
232
- `,t0=b1.div`
158
+ gap: ${F(16)};
159
+ `,he=A.div`
233
160
  display: grid;
234
- gap: ${i(16)};
161
+ gap: ${F(16)};
235
162
 
236
163
  > div {
237
164
  display: grid;
238
- gap: ${i(16)};
165
+ gap: ${F(16)};
239
166
  }
240
167
 
241
168
  > div:last-of-type {
242
- gap: ${i(8)};
169
+ gap: ${F(8)};
243
170
  }
244
- `;import{jsx as b,jsxs as I}from"react/jsx-runtime";function v3({logo:e,initialValues:a,onSubmit:r,onEsqueciMinhaSenha:t,errorLabel:n,...o}){let v=typeof e=="string"?b("img",{src:e,alt:"Logo do sistema"}):e,m=J1(),s=T("(max-width: 500px)"),q=t3(()=>({manterConectado:!1,...a}),[a]);return b(y,{...o,paperStyle:{minWidth:s?void 0:456,width:s?"90%":void 0},children:I(n0,{children:[b(i0,{children:e&&b("div",{children:v})}),b(c3,{onSubmit:r,defaultValues:q,children:I(t0,{children:[I("div",{children:[b(o0,{name:"email",label:"E-mail de acesso",required:!0,rules:h3([s0,q3]),autoComplete:"email",type:"email"}),I("div",{children:[b(o0,{name:"senha",label:"Senha de acesso",type:"password",required:!0,rules:s0}),m&&b(l3,{severity:"warning",children:"Capslock ativado"}),!!n&&b(o3,{variant:"titleXXS",color:d.red[300],children:n})]})]}),b(s3,{name:"manterConectado",label:"Manter conectado"}),I("div",{children:[b(l0,{type:"submit",fullWidth:!0,children:"Entrar"}),t&&b(l0,{type:"button",fullWidth:!0,variant:"text",onClick:t,children:"Esqueci minha senha"})]})]})})]})})}import{Button as v0,LIcon as d3,Typography as d0}from"@s_mart/core";import c0 from"@emotion/styled";var h0=c0.div`
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: ${i(32)};
173
+ gap: ${Q(32)};
247
174
 
248
175
  > div {
249
176
  display: grid;
250
- gap: ${i(8)};
177
+ gap: ${Q(8)};
251
178
  }
252
- `,q0=c0.header`
179
+ `,Te=ve.header`
253
180
  display: grid;
254
181
  text-align: center;
255
- gap: ${i(16)};
256
- `;import{jsx as Z,jsxs as W}from"react/jsx-runtime";function m3({logo:e,onPrecisoDeAjuda:a,onRealizarAcesso:r,...t}){let n=typeof e=="string"?Z("img",{src:e,alt:"Logo do sistema"}):e,o=T("(max-width: 500px)");return Z(y,{...t,paperStyle:{minWidth:o?void 0:456,width:o?"90%":void 0},children:W(h0,{children:[W("div",{children:[Z(q0,{children:e&&Z("div",{children:n})}),W("div",{style:{display:"flex",flexDirection:"column",textAlign:"center",gap:8,color:d.neutral[800]},children:[Z(d0,{variant:"bodyMD",children:"Parece que este convite j\xE1 foi usado ou expirou."}),Z(d0,{variant:"bodyMD",children:"J\xE1 se cadastrou? Realize o login."})]})]}),W("div",{children:[Z(v0,{fullWidth:!0,onClick:r,children:"Realizar login"}),W(v0,{fullWidth:!0,variant:"text",onClick:a,style:{display:"flex",gap:4,color:d.neutral[900]},children:[Z(d3,{icon:X,size:"20px",removeMargin:!0,color:d.neutral[900]}),"Preciso de outro convite"]})]})]})})}import{Button as u3,Typography as f0}from"@s_mart/core";import m0 from"@emotion/styled";var u0=m0.div`
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: ${i(32)};
185
+ gap: ${O(32)};
259
186
 
260
187
  > div {
261
188
  display: grid;
262
- gap: ${i(16)};
189
+ gap: ${O(16)};
263
190
  }
264
- `,p0=m0.header`
191
+ `,qe=be.header`
265
192
  display: grid;
266
193
  text-align: center;
267
- gap: ${i(16)};
268
- `;import{jsx as D,jsxs as g0}from"react/jsx-runtime";function p3({logo:e,onVoltarParaLogin:a,...r}){let t=typeof e=="string"?D("img",{src:e,alt:"Logo do sistema"}):e,n=T("(max-width: 500px)");return D(y,{...r,paperStyle:{maxWidth:n?void 0:456,width:n?"90%":void 0},children:g0(u0,{children:[g0("div",{style:{display:"flex",flexDirection:"column",gap:24},children:[D(p0,{children:e&&D("div",{children:t})}),D(f0,{variant:"titleMD",textAlign:"center",children:"Instru\xE7\xF5es enviadas"}),D(f0,{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."})]}),D(u3,{fullWidth:!0,onClick:a,children:"Voltar para login"})]})})}import{Button as f3,LIcon as V1,Typography as U}from"@s_mart/core";import{Form as g3,TextField as x0}from"@s_mart/form";import{required as M3}from"@s_mart/rules";import F from"@emotion/styled";var M0=F.div`
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: ${i(32)};
271
- `,y0=F.header`
197
+ gap: ${u(32)};
198
+ `,ke=$.header`
272
199
  display: grid;
273
200
  text-align: center;
274
- gap: ${i(16)};
275
- `,H0=F.div`
201
+ gap: ${u(16)};
202
+ `,Ee=$.div`
276
203
  display: grid;
277
- gap: ${i(32)};
278
- `,C0=F.div`
204
+ gap: ${u(32)};
205
+ `,we=$.div`
279
206
  display: grid;
280
- gap: ${i(4)};
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: ${i(16)};
212
+ gap: ${u(16)};
286
213
 
287
214
  @media (max-width: 768px) {
288
215
  grid-template-columns: 1fr;
289
- gap: ${i(8)};
216
+ gap: ${u(8)};
290
217
  }
291
218
  }
292
219
 
293
220
  > div:last-of-type {
294
221
  display: grid;
295
- gap: ${i(4)};
222
+ gap: ${u(4)};
296
223
  }
297
- `,b0=F.div`
224
+ `,Le=$.div`
298
225
  display: flex;
299
226
  flex-wrap: wrap;
300
- gap: ${i(8)};
301
- `,q1=F.div`
227
+ gap: ${u(8)};
228
+ `,_=$.div`
302
229
  display: flex;
303
230
  align-items: center;
304
- gap: ${i(4)};
231
+ gap: ${u(4)};
305
232
 
306
- color: ${d.neutral[600]};
307
- border: 1px solid ${d.neutral[600]};
308
- border-radius: ${i(4)};
309
- padding: ${i(3)} ${i(4)};
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: ${d.green[300]};
316
- border-color: ${d.green[300]};
242
+ color: ${W.green[300]};
243
+ border-color: ${W.green[300]};
317
244
  `}}
318
- `;function V0(){let e=n=>n?n.match(/[a-z]/i):!1,a=n=>n?n.match(/[0-9]/i):!1,r=n=>n?n.length>=6:!1;return{senhaContemLetra:e,senhaContemNumero:a,senhaContemMinimoDe6Caracteres:r,desabilitarBotaoDeCadastro:n=>!n.senha||!n.confirmarSenha||!e(n.senha)||!a(n.senha)||!r(n.senha)}}import{jsx as f,jsxs as S}from"react/jsx-runtime";function y3({logo:e,onTrocarMinhaSenha:a,...r}){let{senhaContemLetra:t,senhaContemNumero:n,senhaContemMinimoDe6Caracteres:o,desabilitarBotaoDeCadastro:v}=V0();return f(y,{...r,children:S(M0,{children:[S(y0,{children:[e&&f("div",{children:typeof e=="string"?f("img",{src:e,alt:"Logo do sistema"}):e}),f(U,{variant:"titleSM",children:"Vamos cadastrar uma nova senha de acesso."})]}),f(g3,{onSubmit:a,children:({watch:s})=>{let q=t(s("senha")),g=n(s("senha")),k=o(s("senha"));return S(H0,{children:[S(C0,{children:[S("div",{children:[f(x0,{type:"password",name:"senha",label:"Senha de acesso",required:!0,rules:M3}),f(x0,{type:"password",name:"confirmarSenha",label:"Confirme sua senha",required:!0,rules:{validate:z=>{if(!z)return"Campo obrigat\xF3rio";if(z!==s("senha"))return"As senhas devem ser iguais"}}})]}),S("div",{children:[f(U,{variant:"bodyXS",children:"Sua senha precisa conter:"}),S(b0,{children:[S(q1,{checked:!!q,children:[q&&f(V1,{icon:E,size:"16px",removeMargin:!0}),f(U,{variant:"bodyXS",children:"Uma letra"})]}),S(q1,{checked:!!g,children:[g&&f(V1,{icon:E,size:"16px",removeMargin:!0}),f(U,{variant:"bodyXS",children:"Um n\xFAmero"})]}),S(q1,{checked:!!k,children:[k&&f(V1,{icon:E,size:"16px",removeMargin:!0}),f(U,{variant:"bodyXS",children:"M\xEDnimo de 6 caracteres"})]})]})]})]}),f("div",{children:f(f3,{type:"submit",fullWidth:!0,disabled:v(s()),children:"Trocar minha senha"})})]})}})]})})}import{Button as k0,Typography as E0}from"@s_mart/core";import x1 from"@emotion/styled";var z0=x1.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: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: ${i(32)};
247
+ gap: ${w(32)};
321
248
 
322
249
  > div {
323
250
  display: grid;
324
- gap: ${i(16)};
251
+ gap: ${w(16)};
325
252
  }
326
- `,S0=x1.header`
253
+ `,We=K.header`
327
254
  display: grid;
328
255
  text-align: center;
329
- gap: ${i(16)};
330
- `,L0=x1.div`
256
+ gap: ${w(16)};
257
+ `,_e=K.div`
331
258
  display: grid;
332
- gap: ${i(32)};
259
+ gap: ${w(32)};
333
260
 
334
261
  > div:last-of-type {
335
262
  display: grid;
336
- gap: ${i(16)};
263
+ gap: ${w(16)};
337
264
  }
338
- `;import{Form as H3,TextField as C3}from"@s_mart/form";import{composeValidators as b3,email as V3,required as x3}from"@s_mart/rules";import{jsx as x,jsxs as v1}from"react/jsx-runtime";function z3({logo:e,onVoltarParaLogin:a,onConfirmar:r,...t}){let n=typeof e=="string"?x("img",{src:e,alt:"Logo do sistema"}):e,o=T("(max-width: 500px)");return x(y,{...t,paperStyle:{minWidth:o?void 0:456,width:o?"90%":void 0},children:v1(z0,{children:[v1("div",{style:{display:"flex",flexDirection:"column",gap:24},children:[x(S0,{children:e&&x("div",{children:n})}),x(E0,{variant:"titleMD",textAlign:"center",children:"Esqueceu a senha?"}),x(E0,{variant:"bodySM",textAlign:"center",children:"Informe seu e-mail de acesso para receber instru\xE7\xF5es e criar uma nova senha."})]}),x(H3,{onSubmit:r,children:v1(L0,{children:[x("div",{children:x(C3,{name:"email",label:"E-mail de acesso",required:!0,rules:b3([x3,V3]),type:"email"})}),v1("div",{children:[x(k0,{fullWidth:!0,type:"submit",children:"Confirmar"}),x(k0,{fullWidth:!0,onClick:a,variant:"neutral",children:"Voltar para login"})]})]})})]})})}export{E2 as TelaCadastro,m3 as TelaConviteExpirado,z3 as TelaEsqueceuSenha,p3 as TelaInstrucoesEnviadas,v3 as TelaLogin,y3 as TelaNovaSenha,y as TemplateTelaBase};
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": "4.0.2",
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
- "@s_mart/tsconfig": "*",
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
  }