@s_mart/telas-de-acesso 11.0.7 → 16.0.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/components/templateTelaBase.d.ts +2 -0
- package/dist/components/templateTelaBase.styles.d.ts +5 -0
- package/dist/components/templateTelaBase.types.d.ts +35 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.mjs +595 -95
- package/dist/index.mjs.map +1 -0
- package/dist/screens/telaCadastro/telaCadastro.d.ts +2 -0
- package/dist/screens/telaCadastro/telaCadastro.styles.d.ts +8 -0
- package/dist/screens/telaCadastro/telaCadastro.types.d.ts +43 -0
- package/dist/screens/telaCadastro/telaCadastroRules.d.ts +9 -0
- package/dist/screens/telaCadastro/telaCadastroSlots.d.ts +6 -0
- package/dist/screens/telaCadastro/useTelaCadastro.d.ts +8 -0
- package/dist/screens/telaConviteExpirado/telaConviteExpirado.d.ts +2 -0
- package/dist/screens/telaConviteExpirado/telaConviteExpirado.styles.d.ts +2 -0
- package/dist/screens/telaConviteExpirado/telaConviteExpirado.types.d.ts +16 -0
- package/dist/screens/telaEsqueceuSenha/telaEsqueceuSenha.d.ts +2 -0
- package/dist/screens/telaEsqueceuSenha/telaEsqueceuSenha.styles.d.ts +3 -0
- package/dist/screens/telaEsqueceuSenha/telaEsqueceuSenha.types.d.ts +20 -0
- package/dist/screens/telaInstrucoesEnviadas/telaInstrucoesEnviadas.d.ts +2 -0
- package/dist/screens/telaInstrucoesEnviadas/telaInstrucoesEnviadas.styles.d.ts +2 -0
- package/dist/screens/telaInstrucoesEnviadas/telaInstrucoesEnviadas.types.d.ts +12 -0
- package/dist/screens/telaLogin/telaLogin.d.ts +2 -0
- package/dist/screens/telaLogin/telaLogin.styles.d.ts +3 -0
- package/dist/screens/telaLogin/telaLogin.types.d.ts +39 -0
- package/dist/screens/telaNovaSenha/telaNovaSenha.d.ts +2 -0
- package/dist/screens/telaNovaSenha/telaNovaSenha.helpers.d.ts +3 -0
- package/dist/screens/telaNovaSenha/telaNovaSenha.styles.d.ts +8 -0
- package/dist/screens/telaNovaSenha/telaNovaSenha.types.d.ts +20 -0
- package/package.json +39 -47
- package/dist/index.d.mts +0 -203
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/components/templateTelaBase.styles.ts","../src/components/templateTelaBase.tsx","../src/screens/telaCadastro/telaCadastro.styles.ts","../src/screens/telaCadastro/telaCadastroRules.ts","../src/screens/telaCadastro/telaCadastroSlots.tsx","../src/screens/telaCadastro/useTelaCadastro.tsx","../src/screens/telaCadastro/telaCadastro.tsx","../src/screens/telaLogin/telaLogin.styles.ts","../src/screens/telaLogin/telaLogin.tsx","../src/screens/telaConviteExpirado/telaConviteExpirado.styles.ts","../src/screens/telaConviteExpirado/telaConviteExpirado.tsx","../src/screens/telaInstrucoesEnviadas/telaInstrucoesEnviadas.styles.ts","../src/screens/telaInstrucoesEnviadas/telaInstrucoesEnviadas.tsx","../src/screens/telaNovaSenha/telaNovaSenha.helpers.ts","../src/screens/telaNovaSenha/telaNovaSenha.styles.ts","../src/screens/telaNovaSenha/telaNovaSenha.tsx","../src/screens/telaEsqueceuSenha/telaEsqueceuSenha.styles.ts","../src/screens/telaEsqueceuSenha/telaEsqueceuSenha.tsx"],"sourcesContent":["import { styled } from '@mui/material';\nimport { colorPalette } from '@s_mart/tokens';\nimport { toRem } from '@s_mart/utils';\n\nexport const TemplateTelaBaseContainer = styled('div')`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n overflow: auto;\n overflow-x: hidden;\n\n height: 100vh;\n\n background-color: ${({ theme }) => theme.palette.primary.main};\n transition: background-color 0.3s ease-in-out;\n\n @media (max-width: 500px) {\n background-color: ${({ theme }) => theme.palette.common.white};\n }\n\n @media (max-height: 600px) {\n justify-content: flex-start;\n }\n`;\n\nexport const IlustracaoContainer = styled('div')`\n position: absolute;\n left: 0;\n bottom: 32px;\n z-index: 1;\n\n @media (max-width: 768px) {\n display: none;\n }\n`;\n\nexport const TextContainer = styled('h1')`\n position: absolute;\n left: 32px;\n top: 32px;\n\n color: ${({ theme }) => theme.palette.common.white};\n font-size: ${toRem(32)};\n line-height: 150%;\n font-weight: normal;\n\n @media (max-width: 768px) {\n left: 16px;\n top: 16px;\n font-size: ${toRem(24)};\n }\n\n @media (max-height: 830px) {\n left: 16px;\n top: 16px;\n font-size: ${toRem(24)};\n\n @media (max-width: 768px) {\n display: none;\n }\n }\n\n @media (max-height: 600px) {\n display: none;\n }\n\n span {\n background-color: #262626;\n padding: ${toRem(4)} ${toRem(8)};\n border-radius: ${toRem(12)};\n }\n\n @media (max-width: 500px) {\n display: none;\n }\n`;\n\nexport const PaperContainer = styled('div')`\n position: relative;\n z-index: 2;\n\n padding: ${toRem(32)};\n border-radius: ${toRem(24)};\n margin: ${toRem(16)};\n\n background-color: ${({ theme }) => theme.palette.common.white};\n`;\n\nexport const WhatsappButton = styled('button')`\n position: relative;\n z-index: 2;\n\n background-color: ${({ theme }) => theme.palette.primary.main};\n padding: ${toRem(4)} ${toRem(8)};\n border: none;\n border-radius: ${toRem(8)};\n cursor: pointer;\n\n display: flex;\n align-items: center;\n gap: ${toRem(4)};\n\n color: ${({ theme }) => theme.palette.common.white};\n\n @media (max-width: 500px) {\n color: ${({ theme }) => theme.palette.common.black};\n background-color: transparent;\n\n svg {\n color: ${colorPalette.green[300]};\n }\n }\n`;\n","import { LIcon } from '@s_mart/core';\nimport { telefone } from '@s_mart/masks';\nimport { lineWhatsApp } from '@s_mart/regular-icons';\n\nimport { Typography } from '@mui/material';\n\nimport {\n IlustracaoContainer,\n PaperContainer,\n TemplateTelaBaseContainer,\n TextContainer,\n WhatsappButton,\n} from './templateTelaBase.styles';\nimport type { TemplateTelaBaseProps } from './templateTelaBase.types';\n\nexport function TemplateTelaBase({\n children,\n whatsapp,\n textoChamativo,\n style,\n paperStyle,\n ilustracao,\n}: TemplateTelaBaseProps) {\n const _ilustracao =\n typeof ilustracao === 'string' ? <img src={ilustracao} alt='Logo do sistema' /> : ilustracao;\n\n const _handleOpenWhatsapp = () => {\n window.open(`https://api.whatsapp.com/send?phone=${whatsapp}`);\n };\n\n return (\n <TemplateTelaBaseContainer style={style}>\n {textoChamativo && <TextContainer>{textoChamativo}</TextContainer>}\n {ilustracao && <IlustracaoContainer>{_ilustracao}</IlustracaoContainer>}\n\n <PaperContainer style={paperStyle}>{children}</PaperContainer>\n {whatsapp && (\n <WhatsappButton onClick={_handleOpenWhatsapp} style={{ marginBottom: 16 }}>\n <Typography variant='bodyXS'>\n Com dúvidas? {telefone.format(whatsapp.slice(2))}\n </Typography>\n <LIcon icon={lineWhatsApp} size='20px' removeMargin />\n </WhatsappButton>\n )}\n </TemplateTelaBaseContainer>\n );\n}\n","import { colorPalette } from '@s_mart/tokens';\nimport { styled } from '@mui/material';\nimport { toRem } from '@s_mart/utils';\n// Hack para evitar erro de importação do @mui/system e @emotion/styled, causado pelo symlink do pnpm\nimport type {} from '@mui/system';\nimport type {} from '@emotion/styled';\n\nexport const ContentContainer = styled('div')`\n display: grid;\n gap: ${toRem(32)};\n`;\n\nexport const HeaderContainer = styled('header')`\n display: grid;\n text-align: center;\n gap: ${toRem(16)};\n`;\n\nexport const FormContainer = styled('div')`\n display: grid;\n gap: ${toRem(32)};\n`;\n\nexport const SenhasContainer = styled('div')`\n display: grid;\n gap: ${toRem(4)};\n\n > div:first-of-type {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: ${toRem(16)};\n\n @media (max-width: 768px) {\n grid-template-columns: 1fr;\n gap: ${toRem(8)};\n }\n }\n\n > div:last-of-type {\n display: grid;\n gap: ${toRem(4)};\n }\n`;\n\nexport const RequisitosContainer = styled('div')`\n display: flex;\n flex-wrap: wrap;\n gap: ${toRem(8)};\n`;\n\nexport const CardRequisitoSenha = styled('div')<{ 'data-checked'?: boolean }>`\n display: flex;\n align-items: center;\n gap: ${toRem(4)};\n\n color: ${colorPalette.neutral[600]};\n border: 1px solid ${colorPalette.neutral[600]};\n border-radius: ${toRem(4)};\n padding: ${toRem(3)} ${toRem(4)};\n\n line-height: 1em;\n vertical-align: middle;\n\n &[data-checked='true'] {\n color: ${colorPalette.green[300]};\n border-color: ${colorPalette.green[300]};\n }\n`;\n","export const checarSenhaContemLetra = (senha: string) => {\n if (!senha) return false;\n\n return senha.match(/[a-z]/i);\n};\n\nexport const checarSenhaContemNumero = (senha: string) => {\n if (!senha) return false;\n\n return senha.match(/[0-9]/i);\n};\n\nexport const checarSenhaContemMinimoDe6Caracteres = (senha: string) => {\n if (!senha) return false;\n\n return senha.length >= 6;\n};\n\nexport const rulesSenha = {\n validate: (senha: string) => {\n if (!senha) return 'Obrigatório';\n if (!checarSenhaContemLetra(senha)) return 'Deve ter pelo menos uma letra';\n if (!checarSenhaContemNumero(senha)) return 'Deve ter pelo menos um número';\n if (!checarSenhaContemMinimoDe6Caracteres(senha)) return 'Deve ter pelo menos 6 caracteres';\n },\n};\n\nexport const rulesConfirmarSenha = (senha: string) => ({\n validate: (senhaConfirmacao: string) => {\n if (!senhaConfirmacao) return 'Obrigatório';\n if (senhaConfirmacao !== senha) return 'As senhas devem ser iguais';\n },\n});\n","import { TextField, type TextFieldProps } from '@s_mart/form';\nimport type { FormTelaCadastroValues, TelaCadastroSlots } from './telaCadastro.types';\nimport { required } from '@s_mart/rules';\nimport { rulesSenha } from './telaCadastroRules';\n\nexport const defaultSlots: Required<TelaCadastroSlots> = {\n textFieldNome: (props) => <TextField {...props} />,\n textFieldEmail: (props) => <TextField {...props} />,\n textFieldSenha: (props) => <TextField {...props} />,\n} as const;\n\nexport const textFieldNomeSlotProps: TextFieldProps = {\n type: 'text',\n name: 'nome',\n label: 'Nome completo',\n required: true,\n rules: required,\n};\n\nexport const textFieldEmailSlotProps: TextFieldProps = {\n type: 'email',\n name: 'email',\n label: 'E-mail de acesso',\n required: true,\n disabled: true,\n};\n\nexport const textFieldSenhaSlotProps: TextFieldProps = {\n type: 'password',\n name: 'senha',\n label: 'Senha de acesso',\n required: true,\n rules: rulesSenha,\n};\n","import { useForm, useWatch } from 'react-hook-form';\nimport type { FormTelaCadastroValues, TelaCadastroProps, FormTelaCadastroSubmitValues } from './telaCadastro.types';\nimport {\n checarSenhaContemLetra,\n checarSenhaContemMinimoDe6Caracteres,\n checarSenhaContemNumero,\n} from './telaCadastroRules';\n\nexport function useTelaCadastro({ defaultValues }: TelaCadastroProps) {\n const form = useForm<FormTelaCadastroValues, any, FormTelaCadastroSubmitValues>({ defaultValues, mode: 'all' });\n\n const senha = useWatch({\n control: form.control,\n name: 'senha',\n });\n\n const senhaContemLetra = checarSenhaContemLetra(senha);\n const senhaContemNumero = checarSenhaContemNumero(senha);\n const senhaContemMinimoDe6Caracteres = checarSenhaContemMinimoDe6Caracteres(senha);\n\n return {\n form,\n senha,\n senhaContemLetra,\n senhaContemNumero,\n senhaContemMinimoDe6Caracteres,\n };\n}\n","import { memo, useMemo } from 'react';\n\nimport { LIcon } from '@s_mart/core';\nimport { Checkbox, TextField } from '@s_mart/form';\nimport { lineCheck } from '@s_mart/regular-icons';\nimport { required } from '@s_mart/rules';\n\nimport { Button, Link, Typography } from '@mui/material';\nimport { FormProvider } from 'react-hook-form';\n\nimport { TemplateTelaBase } from '../../components/templateTelaBase';\nimport {\n CardRequisitoSenha,\n ContentContainer,\n FormContainer,\n HeaderContainer,\n RequisitosContainer,\n SenhasContainer,\n} from './telaCadastro.styles';\nimport type { TelaCadastroProps } from './telaCadastro.types';\nimport { rulesConfirmarSenha } from './telaCadastroRules';\nimport {\n defaultSlots,\n textFieldEmailSlotProps,\n textFieldNomeSlotProps,\n textFieldSenhaSlotProps,\n} from './telaCadastroSlots';\nimport { useTelaCadastro } from './useTelaCadastro';\n\nexport const TelaCadastro = memo((props: TelaCadastroProps) => {\n const { form, senha, senhaContemLetra, senhaContemMinimoDe6Caracteres, senhaContemNumero } =\n useTelaCadastro(props);\n\n const logo = props.logo;\n const slots = props.slots;\n\n const logoSistema = useMemo(() => {\n if (typeof logo === 'string') {\n return <img src={logo} alt='Logo do sistema' />;\n }\n\n return logo;\n }, [logo]);\n\n const TextFieldNome = slots?.textFieldNome ?? defaultSlots.textFieldNome;\n const TextFieldEmail = slots?.textFieldEmail ?? defaultSlots.textFieldEmail;\n const TextFieldSenha = slots?.textFieldSenha ?? defaultSlots.textFieldSenha;\n\n return (\n <TemplateTelaBase {...props}>\n <ContentContainer>\n <HeaderContainer>\n {logo && <div>{logoSistema}</div>}\n <Typography variant='titleSM'>\n Vamos cadastrar uma senha de acesso ao {props.nomeSistema}.\n </Typography>\n </HeaderContainer>\n <FormProvider {...form}>\n <form onSubmit={form.handleSubmit(props.onSubmit)}>\n <FormContainer>\n <TextFieldEmail {...textFieldEmailSlotProps} />\n <TextFieldNome {...textFieldNomeSlotProps} />\n <SenhasContainer>\n <div>\n <TextFieldSenha {...textFieldSenhaSlotProps} />\n <TextField\n type='password'\n name='confirmarSenha'\n label='Confirme sua senha'\n required\n rules={rulesConfirmarSenha(senha)}\n />\n </div>\n <div>\n <Typography variant='bodyXS'>Sua senha precisa conter:</Typography>\n <RequisitosContainer>\n <CardRequisitoSenha data-checked={Boolean(senhaContemLetra)}>\n {senhaContemLetra && <LIcon icon={lineCheck} size='16px' removeMargin />}\n <Typography variant='bodyXS'>Uma letra</Typography>\n </CardRequisitoSenha>\n <CardRequisitoSenha data-checked={Boolean(senhaContemNumero)}>\n {senhaContemNumero && <LIcon icon={lineCheck} size='16px' removeMargin />}\n <Typography variant='bodyXS'>Um número</Typography>\n </CardRequisitoSenha>\n <CardRequisitoSenha data-checked={Boolean(senhaContemMinimoDe6Caracteres)}>\n {senhaContemMinimoDe6Caracteres && (\n <LIcon icon={lineCheck} size='16px' removeMargin />\n )}\n <Typography variant='bodyXS'>Mínimo de 6 caracteres</Typography>\n </CardRequisitoSenha>\n </RequisitosContainer>\n </div>\n </SenhasContainer>\n\n <div>\n <Checkbox\n rules={required}\n name='termosDeUso'\n label={\n <div style={{ display: 'flex', gap: 4 }}>\n <span>Li e aceito os</span>\n\n <Link\n href={props.linkTermosDeUso}\n target='_blank'\n sx={(theme) => ({ color: theme.palette.primary.main })}\n rel='noreferrer'\n >\n termos de uso\n </Link>\n </div>\n }\n />\n </div>\n <div>\n <Button type='submit' fullWidth>\n Concluir meu cadastro\n </Button>\n </div>\n </FormContainer>\n </form>\n </FormProvider>\n </ContentContainer>\n </TemplateTelaBase>\n );\n});\n\nTelaCadastro.displayName = 'TelaCadastro';\n","import { styled } from '@mui/material';\nimport { toRem } from '@s_mart/utils';\n\nexport const ContentContainer = styled('div')`\n display: grid;\n gap: ${toRem(32)};\n`;\n\nexport const HeaderContainer = styled('header')`\n display: grid;\n text-align: center;\n gap: ${toRem(16)};\n`;\n\nexport const FormContainer = styled('div')`\n display: grid;\n gap: ${toRem(16)};\n\n > div {\n display: grid;\n gap: ${toRem(16)};\n }\n\n > div:last-of-type {\n gap: ${toRem(8)};\n }\n`;\n","import { useMemo } from 'react';\n\nimport { Indicator } from '@s_mart/core';\nimport { Checkbox, Form, TextField } from '@s_mart/form';\nimport { useCapsLock } from '@s_mart/hooks';\nimport { composeValidators, email, required } from '@s_mart/rules';\nimport { colorPalette } from '@s_mart/tokens';\n\nimport { Button, Typography, useMediaQuery } from '@mui/material';\n\nimport { TemplateTelaBase } from '../../components/templateTelaBase';\nimport { ContentContainer, FormContainer, HeaderContainer } from './telaLogin.styles';\nimport type { TelaLoginProps } from './telaLogin.types';\n\nexport function TelaLogin({\n logo,\n initialValues,\n onSubmit,\n onEsqueciMinhaSenha,\n errorLabel,\n ...rest\n}: TelaLoginProps) {\n const _logoSistema = typeof logo === 'string' ? <img src={logo} alt='Logo do sistema' /> : logo;\n\n const _capslock = useCapsLock();\n const telaMenorQue500 = useMediaQuery('(max-width: 500px)');\n\n const defaultValues = useMemo(\n () => ({ manterConectado: false, ...initialValues }),\n [initialValues],\n );\n\n return (\n <TemplateTelaBase\n {...rest}\n paperStyle={{\n minWidth: !telaMenorQue500 ? 456 : undefined,\n width: !telaMenorQue500 ? undefined : '90%',\n }}\n >\n <ContentContainer>\n <HeaderContainer>{logo && <div>{_logoSistema}</div>}</HeaderContainer>\n <Form onSubmit={onSubmit} defaultValues={defaultValues}>\n <FormContainer>\n <div>\n <TextField\n name='email'\n label='E-mail de acesso'\n required\n rules={composeValidators([required, email])}\n autoComplete='email'\n type='email'\n />\n\n <div>\n <TextField\n name='senha'\n label='Senha de acesso'\n type='password'\n required\n rules={required}\n />\n {_capslock && <Indicator severity='warning'>Capslock ativado</Indicator>}\n {!!errorLabel && (\n <Typography variant='titleXXS' color={colorPalette.red[300]}>\n {errorLabel}\n </Typography>\n )}\n </div>\n </div>\n <Checkbox name='manterConectado' label='Manter conectado' />\n <div>\n <Button type='submit' fullWidth>\n Entrar\n </Button>\n {onEsqueciMinhaSenha && (\n <Button type='button' fullWidth variant='text' onClick={onEsqueciMinhaSenha}>\n Esqueci minha senha\n </Button>\n )}\n </div>\n </FormContainer>\n </Form>\n </ContentContainer>\n </TemplateTelaBase>\n );\n}\n","import { styled } from '@mui/material';\n\nimport { toRem } from '@s_mart/utils';\n\nexport const ContentContainer = styled('div')`\n display: grid;\n gap: ${toRem(32)};\n\n > div {\n display: grid;\n gap: ${toRem(8)};\n }\n`;\n\nexport const HeaderContainer = styled('header')`\n display: grid;\n text-align: center;\n gap: ${toRem(16)};\n`;\n","import { LIcon } from '@s_mart/core';\nimport { lineWhatsApp } from '@s_mart/regular-icons';\nimport { colorPalette } from '@s_mart/tokens';\n\nimport { Button, Typography, useMediaQuery } from '@mui/material';\n\nimport { TemplateTelaBase } from '../../components/templateTelaBase';\nimport { ContentContainer, HeaderContainer } from './telaConviteExpirado.styles';\nimport type { TelaConviteExpiradoProps } from './telaConviteExpirado.types';\n\nexport function TelaConviteExpirado({\n logo,\n onPrecisoDeAjuda,\n onRealizarAcesso,\n ...rest\n}: TelaConviteExpiradoProps) {\n const _logoSistema = typeof logo === 'string' ? <img src={logo} alt='Logo do sistema' /> : logo;\n const telaMenorQue500 = useMediaQuery('(max-width: 500px)');\n\n return (\n <TemplateTelaBase\n {...rest}\n paperStyle={{\n minWidth: !telaMenorQue500 ? 456 : undefined,\n width: !telaMenorQue500 ? undefined : '90%',\n }}\n >\n <ContentContainer>\n <div>\n <HeaderContainer>{logo && <div>{_logoSistema}</div>}</HeaderContainer>\n <div\n style={{\n display: 'flex',\n flexDirection: 'column',\n textAlign: 'center',\n gap: 8,\n color: colorPalette.neutral[800],\n }}\n >\n <Typography variant='bodyMD'>\n Parece que este convite já foi usado ou expirou.\n </Typography>\n <Typography variant='bodyMD'>Já se cadastrou? Realize o login.</Typography>\n </div>\n </div>\n <div>\n <Button fullWidth onClick={onRealizarAcesso}>\n Realizar login\n </Button>\n\n <Button\n fullWidth\n variant='text'\n onClick={onPrecisoDeAjuda}\n style={{\n display: 'flex',\n gap: 4,\n color: colorPalette.neutral[900],\n }}\n >\n <LIcon icon={lineWhatsApp} size='20px' removeMargin color={colorPalette.neutral[900]} />\n Preciso de outro convite\n </Button>\n </div>\n </ContentContainer>\n </TemplateTelaBase>\n );\n}\n","import { styled } from '@mui/material';\n\nimport { toRem } from '@s_mart/utils';\n\nexport const ContentContainer = styled('div')`\n display: grid;\n gap: ${toRem(32)};\n\n > div {\n display: grid;\n gap: ${toRem(16)};\n }\n`;\n\nexport const HeaderContainer = styled('header')`\n display: grid;\n text-align: center;\n gap: ${toRem(16)};\n`;\n","import { Button, Typography, useMediaQuery } from '@mui/material';\n\nimport { TemplateTelaBase } from '../../components/templateTelaBase';\nimport { ContentContainer, HeaderContainer } from './telaInstrucoesEnviadas.styles';\nimport type { TelaInstrucoesEnviadasProps } from './telaInstrucoesEnviadas.types';\n\nexport function TelaInstrucoesEnviadas({\n logo,\n onVoltarParaLogin,\n ...rest\n}: TelaInstrucoesEnviadasProps) {\n const _logoSistema = typeof logo === 'string' ? <img src={logo} alt='Logo do sistema' /> : logo;\n const telaMenorQue500 = useMediaQuery('(max-width: 500px)');\n\n return (\n <TemplateTelaBase\n {...rest}\n paperStyle={{\n maxWidth: !telaMenorQue500 ? 456 : undefined,\n width: !telaMenorQue500 ? undefined : '90%',\n }}\n >\n <ContentContainer>\n <div style={{ display: 'flex', flexDirection: 'column', gap: 24 }}>\n <HeaderContainer>{logo && <div>{_logoSistema}</div>}</HeaderContainer>\n <Typography variant='titleMD' sx={{\n textAlign: 'center'\n }}>\n Instruções enviadas\n </Typography>\n <Typography variant='bodySM' sx={{\n textAlign: 'center'\n }}>\n Enviamos ao seu e-mail de acesso as instruções para criar uma nova senha. Verifique sua\n caixa de entrada e de Spam.\n </Typography>\n </div>\n <Button fullWidth onClick={onVoltarParaLogin}>\n Voltar para login\n </Button>\n </ContentContainer>\n </TemplateTelaBase>\n );\n}\n","export const senhaContemLetra = (senha: string) => {\n if (!senha) return false;\n\n return senha.match(/[a-z]/i);\n};\n\nexport const senhaContemNumero = (senha: string) => {\n if (!senha) return false;\n\n return senha.match(/[0-9]/i);\n};\n\nexport const senhaContemMinimoDe6Caracteres = (senha: string) => {\n if (!senha) return false;\n\n return senha.length >= 6;\n};\n","import { styled } from '@mui/material';\nimport { colorPalette } from '@s_mart/tokens';\nimport { toRem } from '@s_mart/utils';\n\nexport const ContentContainer = styled('div')`\n display: grid;\n gap: ${toRem(32)};\n`;\n\nexport const HeaderContainer = styled('header')`\n display: grid;\n text-align: center;\n gap: ${toRem(16)};\n`;\n\nexport const FormContainer = styled('div')`\n display: grid;\n gap: ${toRem(32)};\n`;\n\nexport const SenhasContainer = styled('div')`\n display: grid;\n gap: ${toRem(4)};\n\n > div:first-of-type {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: ${toRem(16)};\n\n @media (max-width: 768px) {\n grid-template-columns: 1fr;\n gap: ${toRem(8)};\n }\n }\n\n > div:last-of-type {\n display: grid;\n gap: ${toRem(4)};\n }\n`;\n\nexport const RequisitosContainer = styled('div')`\n display: flex;\n flex-wrap: wrap;\n gap: ${toRem(8)};\n`;\n\nexport const CardRequisitoSenha = styled('div')<{ checked?: boolean }>`\n display: flex;\n align-items: center;\n gap: ${toRem(4)};\n\n color: ${colorPalette.neutral[600]};\n border: 1px solid ${colorPalette.neutral[600]};\n border-radius: ${toRem(4)};\n padding: ${toRem(3)} ${toRem(4)};\n\n line-height: 1em;\n vertical-align: middle;\n\n ${({ checked }) => {\n if (checked) {\n return `\n color: ${colorPalette.green[300]};\n border-color: ${colorPalette.green[300]};\n `;\n }\n }}\n`;\n","import { LIcon } from '@s_mart/core';\nimport { TextField } from '@s_mart/form';\nimport { lineCheck } from '@s_mart/regular-icons';\nimport { required } from '@s_mart/rules';\n\nimport { Button, Typography } from '@mui/material';\nimport { FormProvider, useForm, useWatch } from 'react-hook-form';\n\nimport { TemplateTelaBase } from '../../components/templateTelaBase';\nimport {\n senhaContemLetra,\n senhaContemMinimoDe6Caracteres,\n senhaContemNumero,\n} from './telaNovaSenha.helpers';\nimport {\n CardRequisitoSenha,\n ContentContainer,\n FormContainer,\n HeaderContainer,\n RequisitosContainer,\n SenhasContainer,\n} from './telaNovaSenha.styles';\nimport type {\n TelaNovaSenhaFormValues,\n TelaNovaSenhaFormValuesSubmit,\n TelaNovaSenhaProps,\n} from './telaNovaSenha.types';\n\nexport function TelaNovaSenha({ logo, onTrocarMinhaSenha, ...rest }: TelaNovaSenhaProps) {\n const form = useForm<TelaNovaSenhaFormValues, any, TelaNovaSenhaFormValuesSubmit>();\n\n const senha = useWatch({\n control: form.control,\n name: 'senha',\n });\n\n const _logoSistema = typeof logo === 'string' ? <img src={logo} alt='Logo do sistema' /> : logo;\n const _senhaContemLetra = senhaContemLetra(senha);\n const _senhaContemNumero = senhaContemNumero(senha);\n const _senhaContemMinimoDe6Caracteres = senhaContemMinimoDe6Caracteres(senha);\n\n return (\n <TemplateTelaBase {...rest}>\n <ContentContainer>\n <HeaderContainer>\n {logo && <div>{_logoSistema}</div>}\n <Typography variant='titleSM'>Vamos cadastrar uma nova senha de acesso.</Typography>\n </HeaderContainer>\n <FormProvider {...form}>\n <form\n onSubmit={(e) => {\n e.preventDefault();\n e.stopPropagation();\n form.handleSubmit(onTrocarMinhaSenha)(e);\n }}\n >\n <FormContainer>\n <SenhasContainer>\n <div>\n <TextField\n type='password'\n name='senha'\n label='Senha de acesso'\n required\n rules={required}\n />\n <TextField\n type='password'\n name='confirmarSenha'\n label='Confirme sua senha'\n required\n rules={{\n validate: (value) => {\n if (!value) return 'Campo obrigatório';\n if (value !== senha) return 'As senhas devem ser iguais';\n },\n }}\n />\n </div>\n <div>\n <Typography variant='bodyXS'>Sua senha precisa conter:</Typography>\n <RequisitosContainer>\n <CardRequisitoSenha checked={Boolean(_senhaContemLetra)}>\n {_senhaContemLetra && <LIcon icon={lineCheck} size='16px' removeMargin />}\n <Typography variant='bodyXS'>Uma letra</Typography>\n </CardRequisitoSenha>\n <CardRequisitoSenha checked={Boolean(_senhaContemNumero)}>\n {_senhaContemNumero && <LIcon icon={lineCheck} size='16px' removeMargin />}\n <Typography variant='bodyXS'>Um número</Typography>\n </CardRequisitoSenha>\n <CardRequisitoSenha checked={Boolean(_senhaContemMinimoDe6Caracteres)}>\n {_senhaContemMinimoDe6Caracteres && (\n <LIcon icon={lineCheck} size='16px' removeMargin />\n )}\n <Typography variant='bodyXS'>Mínimo de 6 caracteres</Typography>\n </CardRequisitoSenha>\n </RequisitosContainer>\n </div>\n </SenhasContainer>\n\n <Button type='submit' fullWidth>\n Trocar minha senha\n </Button>\n </FormContainer>\n </form>\n </FormProvider>\n </ContentContainer>\n </TemplateTelaBase>\n );\n}\n","import { styled } from '@mui/material';\n\nimport { toRem } from '@s_mart/utils';\n\nexport const ContentContainer = styled('div')`\n display: grid;\n gap: ${toRem(32)};\n\n > div {\n display: grid;\n gap: ${toRem(16)};\n }\n`;\n\nexport const HeaderContainer = styled('header')`\n display: grid;\n text-align: center;\n gap: ${toRem(16)};\n`;\n\nexport const FormContainer = styled('div')`\n display: grid;\n gap: ${toRem(32)};\n\n > div:last-of-type {\n display: grid;\n gap: ${toRem(16)};\n }\n`;\n","import { Form, TextField } from '@s_mart/form';\nimport { composeValidators, email, required } from '@s_mart/rules';\n\nimport { Button, Typography, useMediaQuery } from '@mui/material';\n\nimport { TemplateTelaBase } from '../../components/templateTelaBase';\nimport { ContentContainer, FormContainer, HeaderContainer } from './telaEsqueceuSenha.styles';\nimport type { TelaEsqueceuSenhaProps } from './telaEsqueceuSenha.types';\n\nexport function TelaEsqueceuSenha({\n logo,\n onVoltarParaLogin,\n onConfirmar,\n ...rest\n}: TelaEsqueceuSenhaProps) {\n const _logoSistema = typeof logo === 'string' ? <img src={logo} alt='Logo do sistema' /> : logo;\n const telaMenorQue500 = useMediaQuery('(max-width: 500px)');\n\n return (\n <TemplateTelaBase\n {...rest}\n paperStyle={{\n minWidth: !telaMenorQue500 ? 456 : undefined,\n width: !telaMenorQue500 ? undefined : '90%',\n }}\n >\n <ContentContainer>\n <div style={{ display: 'flex', flexDirection: 'column', gap: 24 }}>\n <HeaderContainer>{logo && <div>{_logoSistema}</div>}</HeaderContainer>\n <Typography variant='titleMD' sx={{\n textAlign: 'center'\n }}>\n Esqueceu a senha?\n </Typography>\n <Typography variant='bodySM' sx={{\n textAlign: 'center'\n }}>\n Informe seu e-mail de acesso para receber instruções e criar uma nova senha.\n </Typography>\n </div>\n <Form onSubmit={onConfirmar}>\n <FormContainer>\n <div>\n <TextField\n name='email'\n label='E-mail de acesso'\n required\n rules={composeValidators([required, email])}\n type='email'\n />\n </div>\n <div>\n <Button fullWidth type='submit'>\n Confirmar\n </Button>\n <Button fullWidth onClick={onVoltarParaLogin} variant='neutral'>\n Voltar para login\n </Button>\n </div>\n </FormContainer>\n </Form>\n </ContentContainer>\n </TemplateTelaBase>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAIA,IAAa,KAA4B,EAAO,KAAK,CAAC;;;;;;;;;;uBAU/B,EAAE,eAAY,EAAM,QAAQ,QAAQ,KAAK;;;;yBAIvC,EAAE,eAAY,EAAM,QAAQ,OAAO,MAAM;;;;;;GA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A;IAAU,SAAS;IAAmB,SAAQ;IAAU,UAAA;GAExD,CAAA,CACL,EAAA,CAAA,CACQ,EAAA,CAAA;EACX,CAAA,CACU,EAAA,CAAA;CACF,CAAA;AAEtB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const ContentContainer: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
2
|
+
export declare const HeaderContainer: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
3
|
+
export declare const FormContainer: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
4
|
+
export declare const SenhasContainer: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
5
|
+
export declare const RequisitosContainer: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
+
export declare const CardRequisitoSenha: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & {
|
|
7
|
+
'data-checked'?: boolean;
|
|
8
|
+
}, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { TemplateTelaBaseProps } from '../../components/templateTelaBase.types';
|
|
2
|
+
import { TextFieldProps } from '@s_mart/form';
|
|
3
|
+
export interface TelaCadastroProps extends Omit<TemplateTelaBaseProps, 'children'> {
|
|
4
|
+
/**
|
|
5
|
+
* Valores iniciais do formulário
|
|
6
|
+
*/
|
|
7
|
+
defaultValues: Pick<FormTelaCadastroValues, 'nome' | 'email'>;
|
|
8
|
+
/**
|
|
9
|
+
* Nome do sistema que irá ser exibido em uma frase no topo do paper de cadastro
|
|
10
|
+
*/
|
|
11
|
+
nomeSistema: string;
|
|
12
|
+
/**
|
|
13
|
+
* Logo do sistema que será exibido do topo do paper de cadastro
|
|
14
|
+
* @default undefined
|
|
15
|
+
*/
|
|
16
|
+
logo?: React.ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Função que será executada quando o formulário for submetido
|
|
19
|
+
*/
|
|
20
|
+
onSubmit: (data: FormTelaCadastroSubmitValues) => void;
|
|
21
|
+
/**
|
|
22
|
+
* Link dos termos de uso do sistema - será exibido no checkbox de aceite dos termos de uso
|
|
23
|
+
* @default undefined
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* <TelaCadastro linkTermosDeUso="https://www.google.com" />
|
|
27
|
+
*/
|
|
28
|
+
linkTermosDeUso?: string;
|
|
29
|
+
slots?: TelaCadastroSlots;
|
|
30
|
+
}
|
|
31
|
+
export type TelaCadastroSlots = {
|
|
32
|
+
textFieldEmail?: (props: TextFieldProps) => React.ReactNode;
|
|
33
|
+
textFieldNome?: (props: TextFieldProps) => React.ReactNode;
|
|
34
|
+
textFieldSenha?: (props: TextFieldProps) => React.ReactNode;
|
|
35
|
+
};
|
|
36
|
+
export type FormTelaCadastroValues = {
|
|
37
|
+
nome?: string;
|
|
38
|
+
email: string;
|
|
39
|
+
termosDeUso: boolean;
|
|
40
|
+
senha: string;
|
|
41
|
+
confirmarSenha: string;
|
|
42
|
+
};
|
|
43
|
+
export type FormTelaCadastroSubmitValues = FormTelaCadastroValues;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const checarSenhaContemLetra: (senha: string) => false | RegExpMatchArray | null;
|
|
2
|
+
export declare const checarSenhaContemNumero: (senha: string) => false | RegExpMatchArray | null;
|
|
3
|
+
export declare const checarSenhaContemMinimoDe6Caracteres: (senha: string) => boolean;
|
|
4
|
+
export declare const rulesSenha: {
|
|
5
|
+
validate: (senha: string) => "Obrigatório" | "Deve ter pelo menos uma letra" | "Deve ter pelo menos um número" | "Deve ter pelo menos 6 caracteres" | undefined;
|
|
6
|
+
};
|
|
7
|
+
export declare const rulesConfirmarSenha: (senha: string) => {
|
|
8
|
+
validate: (senhaConfirmacao: string) => "Obrigatório" | "As senhas devem ser iguais" | undefined;
|
|
9
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TextFieldProps } from '@s_mart/form';
|
|
2
|
+
import { TelaCadastroSlots } from './telaCadastro.types';
|
|
3
|
+
export declare const defaultSlots: Required<TelaCadastroSlots>;
|
|
4
|
+
export declare const textFieldNomeSlotProps: TextFieldProps;
|
|
5
|
+
export declare const textFieldEmailSlotProps: TextFieldProps;
|
|
6
|
+
export declare const textFieldSenhaSlotProps: TextFieldProps;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FormTelaCadastroValues, TelaCadastroProps } from './telaCadastro.types';
|
|
2
|
+
export declare function useTelaCadastro({ defaultValues }: TelaCadastroProps): {
|
|
3
|
+
form: import('react-hook-form').UseFormReturn<FormTelaCadastroValues, any, FormTelaCadastroValues>;
|
|
4
|
+
senha: string;
|
|
5
|
+
senhaContemLetra: boolean | RegExpMatchArray | null;
|
|
6
|
+
senhaContemNumero: boolean | RegExpMatchArray | null;
|
|
7
|
+
senhaContemMinimoDe6Caracteres: boolean;
|
|
8
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const ContentContainer: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
2
|
+
export declare const HeaderContainer: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TemplateTelaBaseProps } from '../../components/templateTelaBase.types';
|
|
2
|
+
export interface TelaConviteExpiradoProps extends Omit<TemplateTelaBaseProps, 'children' | 'whatsapp'> {
|
|
3
|
+
/**
|
|
4
|
+
* Logo do sistema que será exibido do topo do paper de cadastro
|
|
5
|
+
* @default undefined
|
|
6
|
+
*/
|
|
7
|
+
logo?: React.ImgHTMLAttributes<HTMLImageElement>['src'] | React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Função que será executado quando o usuário clicar no botão de realizar acesso
|
|
10
|
+
*/
|
|
11
|
+
onRealizarAcesso: () => void;
|
|
12
|
+
/**
|
|
13
|
+
* Função que será executada quando o usuário clicar no botão de preciso de ajuda
|
|
14
|
+
*/
|
|
15
|
+
onPrecisoDeAjuda: () => void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const ContentContainer: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
2
|
+
export declare const HeaderContainer: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
3
|
+
export declare const FormContainer: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TemplateTelaBaseProps } from '../../components/templateTelaBase.types';
|
|
2
|
+
interface EsqueceuSenhaFormValues {
|
|
3
|
+
email: string;
|
|
4
|
+
}
|
|
5
|
+
export interface TelaEsqueceuSenhaProps extends Omit<TemplateTelaBaseProps, 'children'> {
|
|
6
|
+
/**
|
|
7
|
+
* Logo do sistema que será exibido do topo do paper de cadastro
|
|
8
|
+
* @default undefined
|
|
9
|
+
*/
|
|
10
|
+
logo?: React.ImgHTMLAttributes<HTMLImageElement>['src'] | React.ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Função que será executada quando o usuário clicar no botão de confirmar
|
|
13
|
+
**/
|
|
14
|
+
onConfirmar: (values: EsqueceuSenhaFormValues) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Função que será executada quando o usuário clicar no botão de voltar para o login
|
|
17
|
+
*/
|
|
18
|
+
onVoltarParaLogin: () => void;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const ContentContainer: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
2
|
+
export declare const HeaderContainer: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TemplateTelaBaseProps } from '../../components/templateTelaBase.types';
|
|
2
|
+
export interface TelaInstrucoesEnviadasProps extends Omit<TemplateTelaBaseProps, 'children'> {
|
|
3
|
+
/**
|
|
4
|
+
* Logo do sistema que será exibido do topo do paper de cadastro
|
|
5
|
+
* @default undefined
|
|
6
|
+
*/
|
|
7
|
+
logo?: React.ImgHTMLAttributes<HTMLImageElement>['src'] | React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Função que será executada quando o usuário clicar no botão de voltar para o login
|
|
10
|
+
*/
|
|
11
|
+
onVoltarParaLogin: () => void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const ContentContainer: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
2
|
+
export declare const HeaderContainer: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
3
|
+
export declare const FormContainer: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { UseFormReturn, FieldValues } from 'react-hook-form';
|
|
2
|
+
import { TemplateTelaBaseProps } from '../../components/templateTelaBase.types';
|
|
3
|
+
export interface TelaLoginFormValues {
|
|
4
|
+
email: string;
|
|
5
|
+
senha: string;
|
|
6
|
+
manterConectado: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface TelaLoginProps extends Omit<TemplateTelaBaseProps, 'children'> {
|
|
9
|
+
/**
|
|
10
|
+
* Texto que vai abaixo do campo de senha (quando passado), usado para indicar erros
|
|
11
|
+
* @default undefined
|
|
12
|
+
*/
|
|
13
|
+
errorLabel?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Valores iniciais do formulário de cadastro
|
|
16
|
+
* @default undefined
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* <TelaLogin initialValues={{ email: 'raniellimontagna@hotmail.com' }} />
|
|
20
|
+
*/
|
|
21
|
+
initialValues?: Partial<TelaLoginFormValues>;
|
|
22
|
+
/**
|
|
23
|
+
* Logo do sistema que será exibido do topo do paper de cadastro
|
|
24
|
+
* @default undefined
|
|
25
|
+
*/
|
|
26
|
+
logo?: React.ImgHTMLAttributes<HTMLImageElement>['src'] | React.ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* Função que será executada quando o formulário for submetido
|
|
29
|
+
*/
|
|
30
|
+
onSubmit: (data: any, methods: UseFormReturn<FieldValues, any>) => void;
|
|
31
|
+
/**
|
|
32
|
+
* Função que será executada quando o usuário clicar no botão de esqueci minha senha
|
|
33
|
+
* @default undefined
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* <TelaLogin onEsqueciMinhaSenha={() => alert('Esqueci minha senha')} />
|
|
37
|
+
*/
|
|
38
|
+
onEsqueciMinhaSenha?: () => void;
|
|
39
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const ContentContainer: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
2
|
+
export declare const HeaderContainer: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
3
|
+
export declare const FormContainer: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
4
|
+
export declare const SenhasContainer: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
5
|
+
export declare const RequisitosContainer: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme>, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
+
export declare const CardRequisitoSenha: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & {
|
|
7
|
+
checked?: boolean;
|
|
8
|
+
}, import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ImgHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { TemplateTelaBaseProps } from '../../components/templateTelaBase.types';
|
|
3
|
+
export interface TelaNovaSenhaFormValues {
|
|
4
|
+
senha: string;
|
|
5
|
+
confirmarSenha: string;
|
|
6
|
+
termosDeUso: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface TelaNovaSenhaFormValuesSubmit extends TelaNovaSenhaFormValues {
|
|
9
|
+
}
|
|
10
|
+
export interface TelaNovaSenhaProps extends Omit<TemplateTelaBaseProps, 'children'> {
|
|
11
|
+
/**
|
|
12
|
+
* Logo do sistema que será exibido do topo do paper de cadastro
|
|
13
|
+
* @default undefined
|
|
14
|
+
*/
|
|
15
|
+
logo?: ImgHTMLAttributes<HTMLImageElement>['src'] | ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Função que será executado ao clicar no botão trocar minha senha
|
|
18
|
+
*/
|
|
19
|
+
onTrocarMinhaSenha: (data: TelaNovaSenhaFormValuesSubmit) => void;
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -1,63 +1,55 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@s_mart/telas-de-acesso",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "16.0.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"type": "module",
|
|
4
6
|
"main": "./dist/index.mjs",
|
|
5
7
|
"module": "./dist/index.mjs",
|
|
6
|
-
"types": "./dist/index.d.
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
7
9
|
"sideEffects": false,
|
|
8
|
-
"license": "MIT",
|
|
9
10
|
"files": [
|
|
10
11
|
"dist/**"
|
|
11
12
|
],
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"@
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@emotion/styled": "^11.14.1",
|
|
15
|
+
"@mui/material": "^9.3.1",
|
|
16
|
+
"@mui/system": "^9.3.0",
|
|
17
|
+
"@s_mart/core": "16.0.0",
|
|
18
|
+
"@s_mart/form": "16.0.0",
|
|
19
|
+
"@s_mart/hooks": "16.0.0",
|
|
20
|
+
"@s_mart/masks": "16.0.0",
|
|
21
|
+
"@s_mart/regular-icons": "16.0.0",
|
|
22
|
+
"@s_mart/rules": "16.0.0",
|
|
23
|
+
"@s_mart/tokens": "16.0.0",
|
|
24
|
+
"@s_mart/utils": "16.0.0",
|
|
25
|
+
"@types/react": "^19.2.18",
|
|
26
|
+
"@types/react-dom": "^19.2.5",
|
|
27
|
+
"react": "^19.2.8",
|
|
28
|
+
"react-dom": "^19.2.8",
|
|
29
|
+
"typescript": "^7.0.2"
|
|
16
30
|
},
|
|
17
31
|
"peerDependencies": {
|
|
18
32
|
"@emotion/react": "^11.11.4",
|
|
19
33
|
"@emotion/styled": "^11.13.0",
|
|
20
|
-
"@mui/material": "^
|
|
21
|
-
"@mui/system": "^
|
|
22
|
-
"@
|
|
23
|
-
"@
|
|
24
|
-
"@
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"@s_mart/
|
|
30
|
-
"@
|
|
31
|
-
"@
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
},
|
|
37
|
-
"publishConfig": {
|
|
38
|
-
"access": "public"
|
|
39
|
-
},
|
|
40
|
-
"devDependencies": {
|
|
41
|
-
"@emotion/styled": "^11.13.0",
|
|
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",
|
|
47
|
-
"typescript": ">=5.4.2",
|
|
48
|
-
"@s_mart/core": "10.0.4",
|
|
49
|
-
"@s_mart/form": "10.1.0",
|
|
50
|
-
"@s_mart/hooks": "8.1.1",
|
|
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.3.4"
|
|
55
|
-
},
|
|
56
|
-
"overrides": {
|
|
57
|
-
"react-is": "^18.3.1"
|
|
34
|
+
"@mui/material": "^9.0.0",
|
|
35
|
+
"@mui/system": "^9.0.0",
|
|
36
|
+
"@s_mart/core": "16.0.0",
|
|
37
|
+
"@s_mart/form": "16.0.0",
|
|
38
|
+
"@s_mart/hooks": "16.0.0",
|
|
39
|
+
"@s_mart/masks": "16.0.0",
|
|
40
|
+
"@s_mart/regular-icons": "16.0.0",
|
|
41
|
+
"@s_mart/rules": "16.0.0",
|
|
42
|
+
"@s_mart/tokens": "16.0.0",
|
|
43
|
+
"@s_mart/utils": "16.0.0",
|
|
44
|
+
"@types/react": ">=18.3.12",
|
|
45
|
+
"@types/react-dom": ">=18.3.1",
|
|
46
|
+
"react": ">=18.3.1",
|
|
47
|
+
"react-dom": ">=18.3.1",
|
|
48
|
+
"react-hook-form": "^7.85.0",
|
|
49
|
+
"typescript": ">=7.0.2"
|
|
58
50
|
},
|
|
59
51
|
"scripts": {
|
|
60
|
-
"build": "
|
|
61
|
-
"
|
|
52
|
+
"build": "pnpm run typecheck && vite build",
|
|
53
|
+
"typecheck": "tsc --noEmit"
|
|
62
54
|
}
|
|
63
55
|
}
|