mitre-form-component 0.1.3 → 2.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/README.md +151 -19
- package/dist/index.cjs +582 -190
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +48 -5
- package/dist/index.d.ts +48 -5
- package/dist/index.js +566 -175
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/components/Form/index.tsx","../src/components/hooks/useError.ts","../src/utils/utm.ts","../src/components/styles/utils.ts","../src/components/Form/styles.ts","../src/components/styles/theme.ts","../src/components/styles/FontLoader.tsx","../src/components/Input/index.tsx","../src/components/Input/masks.ts","../src/components/Input/styles.ts","../src/components/Button/styles.ts","../src/components/Button/index.tsx","../src/components/Alert/index.tsx","../src/components/Alert/styles.ts","../src/components/PhoneInput/index.tsx","../src/components/PhoneInput/styles.ts","../src/components/ProductSelect/index.tsx","../src/components/ProductSelect/styles.ts"],"sourcesContent":["export { default as MitreFormComponent } from \"./components/Form\";\nexport type { MitreFormComponentProps, RequestBody } from \"./components/Form\";\n","import React, { useState } from \"react\";\nimport { useError } from \"../hooks/useError\";\nimport { useForm, SubmitHandler, Controller } from \"react-hook-form\";\nimport { yupResolver } from \"@hookform/resolvers/yup\";\nimport * as yup from \"yup\";\n\nimport { UTM, isBrowser, resolveUtmWithPriority } from '../../utils/utm';\nimport { Product } from '../../domain/Product';\n\nimport { PhoneNumberUtil } from 'google-libphonenumber';\nconst phoneUtil = PhoneNumberUtil.getInstance();\n\nimport {\n FormContainer,\n HeaderContainer,\n ButtonContainer,\n Form,\n Title,\n Subtitle\n} from \"./styles\";\nimport { theme } from \"../styles/theme\";\nimport { useMontserratFont } from \"../styles/FontLoader\";\n\nimport { Input } from \"../Input\";\nimport { Button } from \"../Button\";\nimport { Alert } from \"../Alert\";\nimport { PhoneInput } from \"../PhoneInput\";\nimport { ProductSelect } from \"../ProductSelect\";\n\nexport interface MitreFormComponentProps {\n products: Product[];\n apiUrl: string;\n apiToken: string;\n showHeader?: boolean;\n title?: string;\n subtitle?: string;\n backgroundColor?: string;\n buttonBackgroundColor?: string;\n buttonTextColor?: string;\n textColor?: string;\n innerPadding?: string;\n inputBackgroundColor?: string;\n inputFocusBorderColor?: string;\n inputBorderColor?: string;\n inputTextColor?: string;\n inputPlaceholderColor?: string;\n onSuccess?: (requestBody: RequestBody, leadId: string) => void;\n onError?: (error: Error) => void;\n}\n\nexport interface RequestBody {\n name: string;\n email: string;\n phone: string;\n message: string;\n productId: string;\n utm_source: string;\n utm_medium?: string;\n utm_campaign?: string;\n utm_term?: string;\n}\n\nconst isPhoneValid = (phone: string) => {\n try {\n return phoneUtil.isValidNumber(phoneUtil.parseAndKeepRawInput(phone));\n } catch (error) {\n console.log('erro ao validar telefone = ' + error)\n return false;\n }\n};\n\n// Schema base sem productId\nconst baseSchema = {\n name: yup.string().required(\"Nome é obrigatório\"),\n email: yup.string().required(\"Email é obrigatório\").email(\"Email inválido\"),\n phone: yup.object().shape({\n phone: yup.string().required(\"Telefone é obrigatório!\")\n .test(\n 'is-valid-phone',\n 'Número de telefone inválido!',\n function (value) {\n const digitsOnly = value?.replace(/\\D/g, '') || '';\n return digitsOnly.length >= 8 && isPhoneValid(value)\n }),\n inputValue: yup.string().required(\"Telefone é obrigatório!\"),\n dialCode: yup.string().required(\"Código de país é obrigatório\")\n }),\n};\n\n// Schema com productId quando necessário\nconst schemaWithProduct = yup.object().shape({\n ...baseSchema,\n productId: yup.string().required(\"Produto é obrigatório\"),\n});\n\nconst schema = yup.object().shape(baseSchema);\n\nconst MitreFormComponent = React.forwardRef<HTMLDivElement, MitreFormComponentProps>(({\n products,\n apiUrl,\n apiToken,\n showHeader = true,\n title = \"Atendimento por mensagem\",\n subtitle = \"Informe seus dados e retornaremos a mensagem.\",\n backgroundColor = theme.colors.gray180,\n textColor = theme.colors.black,\n buttonBackgroundColor = theme.colors.yellow500,\n buttonTextColor = theme.colors.black,\n innerPadding = \"1rem\",\n inputBackgroundColor = theme.colors.white,\n inputBorderColor = theme.colors.transparent,\n inputFocusBorderColor = theme.colors.yellow500,\n inputPlaceholderColor = theme.colors.gray100,\n inputTextColor = theme.colors.black,\n onSuccess,\n onError,\n}, ref) => {\n // Carregar fonte Montserrat automaticamente\n useMontserratFont();\n\n const [loading, setIsLoading] = useState(false);\n const { error, handleError, clearError } = useError();\n const [successMessage, setSuccessMessage] = useState('');\n const [formKey, setFormKey] = useState(0);\n const [selectedProductId, setSelectedProductId] = useState<number | null>(null);\n\n // Validação do array de produtos\n const validateProducts = (): string | null => {\n if (!products) {\n return \"Lista de produtos não foi fornecida\";\n }\n\n if (!Array.isArray(products)) {\n return \"Lista de produtos deve ser um array\";\n }\n\n if (products.length === 0) {\n return \"Lista de produtos não pode estar vazia\";\n }\n\n // Validar cada produto no array\n for (let i = 0; i < products.length; i++) {\n const product = products[i];\n\n if (!product) {\n return `Produto na posição ${i} é inválido (nulo/undefined)`;\n }\n\n if (typeof product.id !== 'number' || product.id <= 0) {\n return `Produto na posição ${i} possui ID inválido (deve ser um número positivo)`;\n }\n\n if (typeof product.name !== 'string' || product.name.trim().length === 0) {\n return `Produto na posição ${i} possui nome inválido (deve ser uma string não vazia)`;\n }\n }\n\n return null;\n };\n\n const productsValidationError = validateProducts();\n\n // UTM resolved inside the component (URL > localStorage (7d TTL) > referrer)\n const [utm, setUtm] = useState<UTM>({ utm_source: 'direto', createdAt: new Date().toISOString() });\n\n // Usar schema com productId se houver mais de 1 produto\n const formSchema = products && products.length > 1 ? schemaWithProduct : schema;\n\n const { control, register, handleSubmit, formState: { errors }, reset, clearErrors } = useForm<{\n name: string;\n email: string;\n phone: { phone: string; inputValue: string; dialCode: string; };\n productId?: string;\n }>({\n resolver: yupResolver(formSchema),\n mode: 'onSubmit',\n });\n\n React.useEffect(() => {\n if (!isBrowser()) return;\n const { data } = resolveUtmWithPriority(new Date());\n setUtm(data);\n }, []);\n\n const resetForm = () => {\n const resetData: any = {\n name: \"\",\n email: \"\",\n phone: { phone: \"\", inputValue: \"\", dialCode: \"\" },\n };\n\n // Incluir productId no reset se houver mais de 1 produto\n if (products && products.length > 1) {\n resetData.productId = \"\";\n setSelectedProductId(null);\n }\n\n reset(resetData, {\n keepErrors: false,\n keepDirty: false,\n keepTouched: false,\n keepIsSubmitted: false,\n keepSubmitCount: false,\n keepValues: false,\n keepDefaultValues: false,\n });\n clearErrors();\n setFormKey(k => k + 1); // Force remount\n };\n\n const sendMessage: SubmitHandler<{\n name: string;\n email: string;\n phone: { phone: string; inputValue: string; dialCode: string; };\n productId?: string;\n }> = async (data) => {\n const { name, email, phone, productId } = data;\n\n const phoneValue = phone.inputValue;\n const phoneDigitsOnly = phoneValue?.replace(/\\D/g, '') || '';\n\n const message = \"Gostaria de mais informações sobre o produto\";\n\n try {\n setIsLoading(true);\n\n if (!products || products.length === 0 || !apiToken) {\n throw new Error(\"Parâmetros obrigatórios não informados\");\n }\n\n // Determinar qual produto usar\n let selectedProduct: Product;\n\n if (products.length === 1) {\n // Se há apenas 1 produto, usar ele\n selectedProduct = products[0];\n } else {\n // Se há múltiplos produtos, usar o selecionado\n if (!productId) {\n throw new Error(\"Produto deve ser selecionado\");\n }\n const foundProduct = products.find(p => p.id.toString() === productId);\n if (!foundProduct) {\n throw new Error(\"Produto selecionado não encontrado\");\n }\n selectedProduct = foundProduct;\n }\n\n const requestBody: RequestBody = {\n name,\n email,\n phone: phoneDigitsOnly,\n message,\n productId: selectedProduct.id.toString(),\n utm_source: utm.utm_source,\n utm_campaign: utm.utm_campaign,\n utm_medium: utm.utm_medium,\n utm_term: utm.utm_term,\n };\n\n const response = await fetch(`${apiUrl}/leads`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n Authorization: `Basic ${apiToken}`,\n },\n body: JSON.stringify(requestBody),\n });\n\n if (!response.ok) {\n throw new Error(\"Falha ao enviar a mensagem!\");\n }\n\n const responseData = await response.json();\n const leadId = responseData.leadId || responseData.id || '';\n\n setSuccessMessage(\"Mensagem enviada com sucesso!\");\n resetForm();\n onSuccess?.(requestBody, leadId);\n } catch (err) {\n const error = err instanceof Error ? err : new Error(\"Erro desconhecido\");\n handleError(err);\n onError?.(error);\n } finally {\n setIsLoading(false);\n }\n };\n\n // Se houver erro na validação dos produtos, renderizar erro no lugar do formulário\n if (productsValidationError) {\n // Logar o erro específico no console para debug\n console.error('Erro na validação dos produtos:', productsValidationError);\n\n return (\n <FormContainer $backgroundColor={backgroundColor} $innerPadding={innerPadding} ref={ref}>\n <HeaderContainer>\n <Title $textColor={textColor}>Erro no carregamento do formulário!</Title>\n <Subtitle $textColor={textColor}>\n Não foi possível carregar o formulário. Tente novamente mais tarde.\n </Subtitle>\n </HeaderContainer>\n </FormContainer>\n );\n }\n\n return (\n <>\n {error && (\n <Alert\n type=\"error\"\n dismissible\n onDismiss={clearError}\n autoDismiss={5000}\n >\n {error!.message}\n </Alert>\n )}\n\n {successMessage && (\n <Alert\n type=\"success\"\n dismissible\n onDismiss={() => setSuccessMessage('')}\n autoDismiss={5000}\n >\n {successMessage}\n </Alert>\n )}\n\n <FormContainer $backgroundColor={backgroundColor} $innerPadding={innerPadding} ref={ref} >\n {showHeader &&\n <HeaderContainer>\n <Title $textColor={textColor}>{title}</Title>\n\n <Subtitle $textColor={textColor}>{subtitle}</Subtitle>\n </HeaderContainer>\n }\n\n <Form $textColor={textColor} onSubmit={handleSubmit(sendMessage)} noValidate>\n {products.length > 1 && (\n <ProductSelect\n id=\"productId\"\n label=\"Produto de interesse *\"\n placeholder=\"Selecione um produto\"\n {...register(\"productId\")}\n error={errors.productId?.message}\n products={products}\n required\n labelTextColor={textColor}\n backgroundColor={inputBackgroundColor}\n borderColor={inputBorderColor}\n focusBorderColor={inputFocusBorderColor}\n textColor={inputTextColor}\n />\n )}\n\n <Input\n id=\"name\"\n label=\"Nome *\"\n placeholder=\"Digite seu nome\"\n {...register(\"name\")}\n error={errors.name?.message}\n autoComplete=\"name\"\n required\n labelTextColor={textColor}\n backgroundColor={inputBackgroundColor}\n borderColor={inputBorderColor}\n focusBorderColor={inputFocusBorderColor}\n inputPlaceholderColor={inputPlaceholderColor}\n inputTextColor={inputTextColor}\n />\n\n <Input\n id=\"email\"\n label=\"Email *\"\n type=\"email\"\n placeholder=\"exemplo@email.com\"\n {...register(\"email\")}\n error={errors.email?.message}\n autoComplete=\"email\"\n required\n labelTextColor={textColor}\n backgroundColor={inputBackgroundColor}\n borderColor={inputBorderColor}\n focusBorderColor={inputFocusBorderColor}\n inputPlaceholderColor={inputPlaceholderColor}\n inputTextColor={inputTextColor}\n />\n\n <Controller\n key={formKey}\n name=\"phone\"\n control={control}\n defaultValue={{ phone: \"\", inputValue: \"\", dialCode: \"\" }}\n shouldUnregister={true}\n render={({ field }) => {\n const errorMsg =\n errors.phone?.inputValue?.message ||\n errors.phone?.phone?.message ||\n errors.phone?.message;\n\n return (\n <PhoneInput\n id=\"phone\"\n label=\"Telefone *\"\n placeholder=\"(11) 00000-0000\"\n error={errorMsg}\n required\n value={field.value.phone}\n onChange={field.onChange}\n name={field.name}\n labelTextColor={textColor}\n backgroundColor={inputBackgroundColor}\n borderColor={inputBorderColor}\n focusBorderColor={inputFocusBorderColor}\n inputPlaceholderColor={inputPlaceholderColor}\n inputTextColor={inputTextColor}\n />\n );\n }}\n />\n\n <h6>* Campos de preenchimento obrigatório.</h6>\n\n <ButtonContainer>\n <Button bgColor={buttonBackgroundColor} color={buttonTextColor} type=\"submit\" isSubmitting={loading}>\n Enviar mensagem\n </Button>\n </ButtonContainer>\n\n <p>A Mitre Realty respeita a sua privacidade e utiliza os seus dados pessoais para contatá-lo por e-mail ou telefone aqui registrados. Para saber mais, acesse a nossa{' '}\n <a\n href=\"https://www.mitrerealty.com.br/politica-de-privacidade\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Política de Privacidade\n </a>. Ao clicar em {'\"'}enviar{'\"'}, você concorda em permitir que a Mitre Realty, armazene e processe os dados pessoais fornecidos por você para finalidade informada</p>\n\n </Form>\n </FormContainer>\n </>\n );\n});\n\nMitreFormComponent.displayName = \"MitreFormComponent\";\n\nexport default MitreFormComponent;\n","import { useState } from \"react\";\n\nexport function useError() {\n const [error, setError] = useState<Error | null>(null);\n\n const handleError = (err: unknown) => {\n const errorObj = err instanceof Error ? err : new Error(String(err));\n setError(errorObj);\n console.error(errorObj);\n };\n\n const clearError = () => setError(null);\n\n return { error, handleError, clearError };\n}\n","export type UTM = {\n utm_source: string; // default 'direto'\n utm_campaign?: string;\n utm_medium?: string;\n utm_term?: string;\n createdAt: string; // ISO 8601\n };\n \n const UTM_STORAGE_KEY = 'utm_meta';\n const TTL_DAYS = 7;\n \n export const isBrowser = () =>\n typeof window !== 'undefined' && typeof document !== 'undefined';\n \n const daysToMs = (days: number) => days * 24 * 60 * 60 * 1000;\n \n export function readStoredUtm(maxAgeDays = TTL_DAYS): { data: UTM | null; isValid: boolean } {\n if (!isBrowser()) return { data: null, isValid: false };\n try {\n const raw = window.localStorage.getItem(UTM_STORAGE_KEY);\n if (!raw) return { data: null, isValid: false };\n const parsed = JSON.parse(raw) as UTM;\n if (!parsed?.createdAt) return { data: null, isValid: false };\n const age = Date.now() - new Date(parsed.createdAt).getTime();\n const isValid = age <= daysToMs(maxAgeDays);\n return { data: isValid ? parsed : null, isValid };\n } catch {\n return { data: null, isValid: false };\n }\n }\n \n export function saveUtm(data: Partial<UTM>, now = new Date()): UTM | null {\n if (!isBrowser()) return null;\n const payload: UTM = {\n utm_source: data.utm_source || 'direto',\n utm_campaign: data.utm_campaign,\n utm_medium: data.utm_medium,\n utm_term: data.utm_term,\n createdAt: now.toISOString(),\n };\n try {\n window.localStorage.setItem(UTM_STORAGE_KEY, JSON.stringify(payload));\n } catch { /* ignore quota errors */ }\n return payload;\n }\n \n export function parseUrlUtm(loc?: Location): Partial<UTM> {\n if (!isBrowser()) return {};\n const locationObj = loc || window.location;\n const sp = new URL(locationObj.href).searchParams;\n const utm_source = sp.get('utm_source') || undefined;\n const utm_campaign = sp.get('utm_campaign') || undefined;\n const utm_medium = sp.get('utm_medium') || undefined;\n const utm_term = sp.get('utm_term') || undefined;\n return { utm_source, utm_campaign, utm_medium, utm_term };\n }\n \n export function inferSourceFromReferrer(ref?: string): string | undefined {\n if (!isBrowser()) return undefined;\n const href = (ref ?? document.referrer ?? '').toLowerCase();\n if (!href) return 'direto';\n const hostMatch = href.match(/https?:\\/\\/([^/]+)/);\n const host = hostMatch?.[1] ?? href;\n if (/google\\./.test(host) || /^g\\.co$/.test(host) || /^goo\\.gl$/.test(host)) return 'google';\n\n if (\n /(^|\\.)facebook\\.com$/.test(host) ||\n /(^|\\.)m\\.facebook\\.com$/.test(host) ||\n /(^|\\.)fb\\.com$/.test(host) ||\n /(^|\\.)fb\\.me$/.test(host) ||\n /(^|\\.)fb\\.watch$/.test(host) ||\n /(^|\\.)m\\.me$/.test(host)\n ) return 'facebook';\n\n if (\n /(^|\\.)instagram\\.com$/.test(host) ||\n /(^|\\.)l\\.instagram\\.com$/.test(host) ||\n /(^|\\.)instagr\\.am$/.test(host) ||\n /^ig\\.me$/.test(host)\n ) return 'instagram';\n\n if (/(^|\\.)linkedin\\.com$/.test(host) || /^lnkd\\.in$/.test(host)) return 'linkedin';\n\n if (/^t\\.co$/.test(host) || /(^|\\.)twitter\\.com$/.test(host) || /(^|\\.)x\\.com$/.test(host)) return 'twitter';\n\n if (/(^|\\.)youtube\\.com$/.test(host) || /^youtu\\.be$/.test(host)) return 'youtube';\n\n if (/(^|\\.)mail\\.google\\.com$/.test(host)) return 'email';\n\n if (/(^|\\.)outlook\\.live\\.com$/.test(host) || /(^|\\.)outlook\\.office\\.com$/.test(host)) return 'email';\n\n if (/^(wa\\.me)$/.test(host) || /(^|\\.)api\\.whatsapp\\.com$/.test(host) || /(^|\\.)web\\.whatsapp\\.com$/.test(host)) return 'whatsapp';\n\n if (/^t\\.me$/.test(host)) return 'telegram';\n\n if (/(^|\\.)tiktok\\.com$/.test(host)) return 'tiktok';\n return 'direto';\n }\n \n /** Resolve UTM e persiste quando necessário. Prioridade: localStorage (válido) > URL > referrer */\n export function resolveUtmWithPriority(\n now = new Date(),\n propOverride?: Partial<UTM>\n ): { data: UTM; source: 'localStorage' | 'url' | 'referrer' } {\n // 1) Se houver UTM válido no localStorage (<= 7 dias), usar SEM sobrescrever\n const stored = readStoredUtm();\n if (stored.data) {\n const merged = { ...stored.data, ...propOverride } as UTM;\n return { data: merged, source: 'localStorage' };\n }\n \n // 2) Se NÃO houver válido no localStorage, tentar URL. Se houver, salvar e usar\n const fromUrl = parseUrlUtm();\n if (fromUrl.utm_source) {\n const saved = saveUtm(fromUrl, now)!;\n const merged = { ...saved, ...propOverride } as UTM;\n return { data: merged, source: 'url' };\n }\n \n // 3) Fallback: inferir do referrer, apenas ler (não salvar no localStorage)\n const utm_source = inferSourceFromReferrer();\n const payload: UTM = {\n utm_source: utm_source || 'direto',\n utm_campaign: propOverride?.utm_campaign,\n utm_medium: propOverride?.utm_medium,\n utm_term: propOverride?.utm_term,\n createdAt: now.toISOString(),\n };\n return { data: payload, source: 'referrer' };\n }","type directionType = \"column\" | \"row\";\ntype alignItemsType = \"center\" | \"flex-start\";\n\ntype jutifyContentType = \"center\" | \"space-between\";\n\nexport function flex(\n direction: directionType = \"row\",\n alignItems?: alignItemsType,\n justifyContent?: jutifyContentType\n) {\n return `\n align-items:${alignItems || null};\n display:flex;\n flex-direction:${direction};\n justify-content:${justifyContent || null};\n `;\n}\n\nexport const alignX = `\n left:50%;\n transform:translateX(-50%);\n`;\n\nexport const alignXAndY = `\n left:50%;\n top:50%;\n transform:translate(-50%, -50%);\n`;\n\nexport const darkEffect = `\n &:hover {\n cursor:pointer;\n filter:brightness(98%);\n }\n\n &:active {\n filter:brightness(95%);\n }\n`;\n\nexport const opacityEffect = `\n &:hover {\n cursor:pointer;\n opacity:.9;\n }\n\n &:active {\n opacity:.7;\n }\n`;\n\nexport const modalZIndex = 9999;\n\nexport const breakpoints = {\n tablet: \"1024px\",\n};\n","import { flex, opacityEffect } from \"../styles/utils\";\nimport styled from \"styled-components\";\nimport { theme } from \"../styles/theme\";\n\nexport const FormContainer = styled.div<{\n $backgroundColor: string;\n $innerPadding: string;\n}>`\n ${flex(\"column\")}\n align-items: stretch;\n justify-content: flex-start;\n overflow-x: hidden;\n overflow-y: auto;\n\n background: ${(props) => props.$backgroundColor || theme.colors.gray180};\n\n padding: ${(props) => props.$innerPadding || \"1rem\"};\n\n /* Adaptar ao container pai */\n height: 100%;\n width: 100%;\n\n /* Reset CSS isolado */\n * {\n box-sizing: border-box;\n }\n\n /* Fonte aplicada apenas ao componente */\n font-family: ${theme.fonts.primary};\n\n /* Estilos necessários apenas neste escopo */\n button {\n cursor: pointer;\n font-family: ${theme.fonts.primary};\n }\n\n input, textarea, select {\n font-family: ${theme.fonts.primary};\n }\n\n [disabled] {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n /* Hide scrollbars for WebKit browsers */\n ::-webkit-scrollbar {\n display: none;\n }\n\n /* Hide scrollbars for Firefox */\n scrollbar-width: none;\n\n box-sizing: border-box;\n`;\n\nexport const HeaderContainer = styled.div`\n margin-bottom: 1rem;\n`;\n\nexport const ButtonContainer = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-top: 0.75rem;\n\n button {\n ${opacityEffect}\n color: ${theme.colors.black};\n font-weight: 600;\n border: none;\n border-radius: 8px;\n width: 60%;\n margin-top: 10px;\n margin-bottom: 10px;\n }\n`;\n\nexport const Form = styled.form<{ $textColor: string }>`\n label {\n font-weight: 700;\n }\n\n input {\n margin-bottom: 0.75rem;\n }\n\n p {\n font-family: ${theme.fonts.primary};\n font-style: italic;\n font-weight: 200;\n font-size: 0.8rem;\n color: ${(props) => props.$textColor || theme.colors.black};\n text-align: start;\n }\n\n a {\n font-family: ${theme.fonts.primary};\n font-style: italic;\n font-weight: 200;\n font-size: 0.8rem;\n color: ${(props) => props.$textColor || theme.colors.black};\n }\n\n h6 {\n text-align: start;\n margin-left: 10px;\n color: ${(props) => props.$textColor || theme.colors.black};\n font-weight: 600;\n }\n\n & > div {\n margin-bottom: 10px;,\n }\n`;\n\nexport const Title = styled.h2<{ $textColor: string }>`\n font-size: 1.25rem;\n font-weight: 700;\n line-height: 24px;\n letter-spacing: 0em;\n color: ${(props) => props.$textColor || theme.colors.black};\n`;\n\nexport const Subtitle = styled.p<{ $textColor: string }>`\n font-size: 1rem;\n font-weight: 400;\n line-height: 23px;\n letter-spacing: 0em;\n margin-top: 10px;\n color: ${(props) => props.$textColor || theme.colors.black};\n`;\n","/**\n * Sistema de tema isolado para o componente\n * Substitui as variáveis CSS globais para evitar conflitos em projetos host\n */\n\nexport const theme = {\n colors: {\n // Cores principais\n red: '#e52e4d',\n white: '#FFF',\n black: '#2F2F2F',\n black2: '#1E1E1E',\n black3: '#353535',\n alphaBlack: '#000000',\n \n // Amarelos\n yellow400: '#FFD789',\n yellow500: '#F6C76B',\n \n // Cinzas\n gray40: '#F0F0F0',\n gray45: '#767676',\n gray50: '#686A69',\n gray60: '#8F8F8F',\n gray100: '#B6B6B6',\n gray150: '#B9B9B9',\n gray180: '#CECECE',\n gray200: '#D2D2D2',\n gray300: '#EBEBEB',\n gray400: '#ECECEC',\n gray500: '#F4F4F4',\n gray550: '#6F6F6F',\n gray600: '#686868',\n gray700: '#535353',\n gray800: '#9D9D9D',\n \n // Verdes\n green: '#57C06E',\n green2: '#2DCE68',\n \n // Azul\n blue: '#007BFF',\n \n // Transparente\n transparent: 'transparent',\n },\n \n shadows: {\n shadow500: '0px 4px 8px rgba(91, 91, 91, 0.2)',\n },\n \n fonts: {\n primary: '\"Montserrat\", sans-serif',\n },\n} as const;\n\nexport type Theme = typeof theme;\n","import { useEffect } from 'react';\n\n/**\n * Hook para carregar a fonte Montserrat de forma isolada\n * Garante que o componente funcione independentemente do projeto host\n */\nexport const useMontserratFont = () => {\n useEffect(() => {\n // Verificar se já existe um link para a fonte Montserrat adicionado por este componente\n const existingLink = document.querySelector('link[data-mitre-form-font=\"montserrat\"]');\n \n if (!existingLink) {\n // Criar e adicionar o link para a fonte Montserrat\n const link = document.createElement('link');\n link.rel = 'preconnect';\n link.href = 'https://fonts.googleapis.com';\n document.head.appendChild(link);\n\n const link2 = document.createElement('link');\n link2.rel = 'preconnect';\n link2.href = 'https://fonts.gstatic.com';\n link2.crossOrigin = 'anonymous';\n document.head.appendChild(link2);\n\n const link3 = document.createElement('link');\n link3.rel = 'stylesheet';\n link3.href = 'https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap';\n link3.dataset.mitreFormFont = 'montserrat';\n document.head.appendChild(link3);\n }\n\n // Nota: Intencionalmente NÃO removemos a fonte no cleanup\n // Uma vez carregada, ela pode ser usada por múltiplas instâncias do componente\n // e não causa conflitos por estar no head\n }, []);\n};\n","import {\n FormEvent,\n forwardRef,\n ForwardRefRenderFunction,\n InputHTMLAttributes,\n useCallback,\n} from \"react\";\nimport { FieldError } from \"react-hook-form\";\nimport { cep, cpf, currency, date } from \"./masks\";\n\nimport {\n FormControl,\n FormErrorMessage,\n FormLabel,\n Input as FormInput,\n} from \"./styles\";\n\ntype InputType =\n | \"text\"\n | \"email\"\n | \"password\"\n | \"number\"\n | \"tel\"\n | \"url\"\n | \"date\"\n | \"time\"\n | \"datetime-local\";\n\ninterface InputProps extends InputHTMLAttributes<HTMLInputElement> {\n id: string;\n label?: string;\n error?: string | FieldError;\n showErrorMessage?: boolean;\n labelTextColor?: string;\n backgroundColor?: string;\n borderColor?: string;\n focusBorderColor?: string;\n inputTextColor?: string;\n inputPlaceholderColor?: string;\n mask?: \"cep\" | \"currency\" | \"cpf\" | \"phone\" | \"date\";\n type?: InputType;\n}\n\nconst InputBase: ForwardRefRenderFunction<HTMLInputElement, InputProps> = (\n { id,\n label,\n error,\n showErrorMessage = true,\n labelTextColor,\n backgroundColor,\n borderColor,\n focusBorderColor,\n inputPlaceholderColor,\n inputTextColor,\n mask = \"\",\n type = \"text\",\n ...rest\n },\n ref\n) => {\n const handleKeyUp = useCallback(\n (e: FormEvent<HTMLInputElement>) => {\n if (mask === \"cep\") cep(e);\n if (mask === \"currency\") currency(e);\n if (mask === \"cpf\") cpf(e);\n if (mask === \"date\") date(e);\n },\n [mask]\n );\n\n return (\n <FormControl isInvalid={!!error}>\n {!!label && <FormLabel htmlFor={id} $textColor={labelTextColor}>{label}</FormLabel>}\n\n {!mask ? (\n <FormInput\n id={id}\n ref={ref}\n type={type}\n aria-invalid={!!error && showErrorMessage ? \"true\" : \"false\"}\n autoComplete={rest.autoComplete || \"on\"}\n $backgroundColor={backgroundColor}\n $borderColor={borderColor}\n $focusBorderColor={focusBorderColor}\n $placeholderColor={inputPlaceholderColor}\n $textColor={inputTextColor}\n {...rest}\n />\n ) : (\n <FormInput\n id={id}\n ref={ref}\n type={type}\n aria-invalid={!!error && showErrorMessage ? \"true\" : \"false\"}\n autoComplete={rest.autoComplete || \"on\"}\n onKeyUp={handleKeyUp}\n $backgroundColor={backgroundColor}\n $borderColor={borderColor}\n $focusBorderColor={focusBorderColor}\n $placeholderColor={inputPlaceholderColor}\n $textColor={inputTextColor}\n {...rest}\n />\n )}\n\n {!!error && showErrorMessage && (\n <FormErrorMessage data-testid=\"error-message\">\n {typeof error === 'string' ? error : error.message}\n </FormErrorMessage>\n )}\n </FormControl>\n );\n};\n\nexport const Input = forwardRef(InputBase);\n","import { FormEvent } from \"react\";\n\nexport function cep(e: FormEvent<HTMLInputElement>) {\n e.currentTarget.maxLength = 9;\n let value = e.currentTarget.value;\n value = value.replace(/\\D/g, \"\");\n value = value.replace(/^(\\d{5})(\\d)/, \"$1-$2\");\n e.currentTarget.value = value;\n return e;\n}\n\nexport function currency(e: FormEvent<HTMLInputElement>) {\n let value = e.currentTarget.value;\n value = value.replace(/\\D/g, \"\");\n value = value.replace(/(\\d)(\\d{2})$/, \"$1,$2\");\n value = value.replace(/(?=(\\d{3})+(\\D))\\B/g, \".\");\n\n e.currentTarget.value = value;\n return e;\n}\n\nexport function cpf(e: FormEvent<HTMLInputElement>) {\n e.currentTarget.maxLength = 14;\n let value = e.currentTarget.value;\n if (!value.match(/^(\\d{3}).(\\d{3}).(\\d{3})-(\\d{2})$/)) {\n value = value.replace(/\\D/g, \"\");\n value = value.replace(/(\\d{3})(\\d)/, \"$1.$2\");\n value = value.replace(/(\\d{3})(\\d)/, \"$1.$2\");\n value = value.replace(/(\\d{3})(\\d{2})$/, \"$1-$2\");\n\n e.currentTarget.value = value;\n }\n return e;\n}\n\nexport function date(e: FormEvent<HTMLInputElement>) {\n let value = e.currentTarget.value;\n value = value.replace(/\\D/g, \"\");\n value = value.replace(/(\\d{2})(\\d)/, \"$1/$2\");\n value = value.replace(/(\\d{2})(\\d)/, \"$1/$2\");\n e.currentTarget.value = value;\n return e;\n}\n\nexport function phone(e: FormEvent<HTMLInputElement>) {\n let value = e.currentTarget.value;\n value = value.replace(/\\D/g, \"\");\n value = value.replace(/(\\d{2})(\\d)/, \"$1/$2\");\n value = value.replace(/(\\d{2})(\\d)/, \"$1/$2\");\n e.currentTarget.value = value;\n return e;\n}\n","import { InputHTMLAttributes } from \"react\";\nimport styled, { css } from \"styled-components\";\nimport { theme } from \"../styles/theme\";\n\nexport const FormLabel = styled.label<{ $textColor?: string }>`\n font-family: ${theme.fonts.primary};\n font-style: normal;\n font-weight: 500;\n font-size: 1rem;\n color: ${(props) => props.$textColor || theme.colors.black};\n display: block;\n margin-bottom: 0.5rem;\n text-align: left;\n`;\n\nexport const Input = styled.input<\n InputHTMLAttributes<HTMLInputElement> & { \n $backgroundColor?: string, \n $borderColor?: string, \n $focusBorderColor?: string, \n $placeholderColor?: string\n $textColor?: string,\n }\n>`\n font-family: ${theme.fonts.primary};\n font-style: normal;\n font-weight: 500;\n font-size: 1rem;\n line-height: 1.5rem;\n background: ${(props) => props.$backgroundColor || theme.colors.white};\n color: ${(props) => props.$textColor || theme.colors.black};\n padding: 0.5rem;\n border-radius: 0.125rem;\n border: 1px solid ${(props) => props.$borderColor || theme.colors.transparent};\n display: block;\n height: 3.125rem;\n width: 100%;\n\n &:focus {\n border-radius: 0.125rem;\n border: 2px solid ${(props) => props.$focusBorderColor || theme.colors.yellow500};\n outline: none;\n }\n\n &::placeholder {\n font-size: 1rem;\n line-height: 1.5rem;\n color: ${(props) => props.$placeholderColor || theme.colors.gray100};\n font-weight: 700;\n }\n\n /* Autofill styles */\n &:-webkit-autofill {\n background: ${(props) => props.$backgroundColor || theme.colors.white} !important;\n color: ${(props) => props.$textColor || theme.colors.black} !important;\n -webkit-text-fill-color: ${(props) => props.$textColor || theme.colors.black} !important;\n transition: background-color 5000s ease-in-out 0s; /* Prevent flashing */\n }\n\n &:-webkit-autofill::first-line {\n font-family: ${theme.fonts.primary};\n font-size: 1rem;\n font-weight: 500;\n }\n`;\n\nexport const FormErrorMessage = styled.small`\n font-size: 0.75rem;\n line-height: 1.125rem;\n color: ${theme.colors.red};\n margin-top: 0.25rem;\n display: block;\n`;\n\nexport const FormControl = styled.div.withConfig({\n shouldForwardProp: (prop) => ![\"isInvalid\"].includes(prop),\n})<{ isInvalid?: boolean }>`\n ${FormLabel} {\n ${(props) =>\n props.isInvalid &&\n css`\n color: ${theme.colors.red};\n `};\n }\n\n ${Input} {\n ${(props) =>\n props.isInvalid &&\n css`\n border: 1px solid ${theme.colors.red};\n\n &:not(:focus)::placeholder {\n color: ${theme.colors.red};\n font-weight: 600;\n }\n `};\n\n &:focus {\n ${(props) =>\n props.isInvalid &&\n css`\n border: 1px solid ${theme.colors.red};\n `};\n }\n }\n`;\n","import { darken } from \"polished\";\nimport styled, { css } from \"styled-components\";\nimport { theme } from \"../styles/theme\";\n\ntype ButtonProps = {\n hasIcon?: boolean;\n isSubmitting?: boolean;\n hasSubmittingMessage?: boolean;\n bgColor?: string;\n bordercolor?: string;\n color?: string;\n height?: string;\n};\n\nexport const Icon = styled.span`\n font-size: 0;\n line-height: 0;\n transition: all 0.25s ease;\n\n transform: translate3d(-30px, 0px, 0px);\n visibility: hidden;\n opacity: 0;\n margin-right: 0.625rem;\n`;\n\nexport const Text = styled.span`\n font-family: ${theme.fonts.primary};\n font-size: 1rem;\n line-height: 1.5rem;\n margin-bottom: -2px;\n\n transition: all 0.25s ease;\n`;\n\nexport const TextSubmitting = styled.span`\n font-family: ${theme.fonts.primary};\n font-weight: 400;\n font-size: 1rem;\n\n transition: all 0.25s ease;\n`;\n\nexport const LoadingIcon = styled.span.withConfig({\n shouldForwardProp: (prop) => prop !== \"hasText\",\n})<{ hasText?: boolean }>`\n display: block;\n\n width: 1rem;\n height: 1rem;\n border: 0.125rem solid ${theme.colors.white};\n border-radius: 50%;\n animation: loadingAnimation 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: ${theme.colors.white} transparent transparent transparent;\n\n margin-right: ${(props) => (props.hasText ? \"0.625rem\" : \"0\")};\n\n @keyframes loadingAnimation {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n`;\n\nexport const Button = styled.button.withConfig({\n shouldForwardProp: (prop) =>\n ![\n \"hasIcon\",\n \"isSubmitting\",\n \"hasSubmittingMessage\",\n \"bgColor\",\n \"bordercolor\",\n \"color\",\n \"height\",\n ].includes(prop),\n})<ButtonProps>`\n background: ${(props) => darken(0.1, props?.bgColor || \"#F6C76B\")};\n color: ${(props) => props?.color || \"#2F2F2F\"};\n border: 1px solid ${(props) => darken(0.1, props?.bordercolor || \"#F6C76B\")};\n border-radius: 2px;\n\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0 0.75rem;\n height: ${(props) => props?.height || \"3.125rem\"};\n position: relative;\n font-size: 0;\n line-height: 0;\n\n transition: all 0.25s;\n\n ${Icon} {\n display: ${(props) => (props?.hasIcon ? \"block\" : \"\")};\n }\n\n ${Text} {\n transform: ${(props) =>\n props?.hasIcon ? \"translate3d(-4.5px, 0px, 0px)\" : \"unset\"};\n\n @media print, screen and (min-width: 40em) {\n transform: ${(props) =>\n props?.hasIcon ? \"translate3d(-14.5px, 0px, 0px)\" : \"unset\"};\n }\n\n color: ${(props) => props?.color || \"#2F2F2F\"};\n }\n\n &:hover {\n background: ${(props) => darken(0.2, props?.bgColor || \"#F6C76B\")};\n border-color: ${(props) => darken(0.2, props?.bordercolor || \"#F6C76B\")};\n\n ${Icon} {\n opacity: 1;\n visibility: visible;\n transform: translate3d(0px, 0px, 0px);\n }\n\n ${Text} {\n transform: ${(props) =>\n props?.hasIcon ? \"translate3d(-5px, 0px, 0px)\" : \"unset\"};\n }\n }\n\n ${Text} {\n ${(props) =>\n props.isSubmitting &&\n !props.hasSubmittingMessage &&\n css`\n transform: unset;\n opacity: 0;\n `}\n }\n\n ${LoadingIcon} {\n ${(props) =>\n props.isSubmitting &&\n !props.hasSubmittingMessage &&\n css`\n display: flex;\n -webkit-box-align: center;\n align-items: center;\n position: absolute;\n `}\n }\n`;\n","import { ButtonHTMLAttributes, ReactElement, ReactNode } from \"react\";\n\nimport {\n Button as ButtonComponent,\n Icon,\n LoadingIcon,\n Text,\n TextSubmitting,\n} from \"./styles\";\n\ntype ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {\n children: ReactNode;\n icon?: ReactElement;\n isSubmitting?: boolean;\n submittingMessage?: string;\n bgColor?: string;\n bordercolor?: string;\n color?: string;\n height?: string;\n};\n\nexport function Button({\n children,\n icon,\n isSubmitting = false,\n submittingMessage = \"\",\n disabled = false,\n color = \"#2F2F2F\",\n ...rest\n}: ButtonProps) {\n return (\n <ButtonComponent\n isSubmitting={isSubmitting}\n hasSubmittingMessage={submittingMessage.length > 0}\n disabled={isSubmitting || disabled}\n aria-disabled={isSubmitting || disabled}\n hasIcon={!!icon}\n color={color}\n {...rest}\n >\n {icon && !isSubmitting && <Icon data-testid=\"button-icon\">{icon}</Icon>}\n {isSubmitting && <LoadingIcon hasText={submittingMessage.length > 0} />}\n {(!isSubmitting || submittingMessage.length === 0) && (\n <Text className=\"text\">{children}</Text>\n )}\n {isSubmitting && submittingMessage.length > 0 && (\n <TextSubmitting>{submittingMessage}</TextSubmitting>\n )}\n </ButtonComponent>\n );\n}\n","import React, { useEffect, useState, useCallback } from 'react';\nimport { AlertContainer, DismissButton } from './styles';\nimport { AlertType } from './styles';\n\nimport { HiX } from 'react-icons/hi';\n\ninterface AlertProps {\n type?: AlertType;\n children: React.ReactNode;\n className?: string;\n dismissible?: boolean;\n onDismiss?: () => void;\n autoDismiss?: number;\n}\n\nexport const Alert = ({\n type = 'info',\n children,\n className,\n dismissible = false,\n onDismiss,\n autoDismiss\n}: AlertProps) => {\n const [isClosing, setIsClosing] = useState(false);\n\n const handleDismiss = useCallback(() => {\n setIsClosing(true);\n setTimeout(() => onDismiss?.(), 300);\n }, [onDismiss]);\n\n useEffect(() => {\n if (autoDismiss) {\n const timer = setTimeout(handleDismiss, autoDismiss);\n return () => clearTimeout(timer);\n }\n }, [autoDismiss, handleDismiss]);\n\n return (\n <AlertContainer\n $type={type}\n $dismissible={dismissible}\n $isClosing={isClosing}\n className={className}\n role=\"alert\"\n >\n {children}\n {dismissible && (\n <DismissButton \n onClick={handleDismiss} \n aria-label=\"Dismiss alert\"\n >\n <HiX /> \n </DismissButton>\n )}\n </AlertContainer>\n );\n};","import styled, { css, keyframes } from \"styled-components\";\nimport { theme } from \"../styles/theme\";\n\nexport type AlertType = \"error\" | \"warning\" | \"info\" | \"success\";\n\nconst fadeIn = keyframes`\n from { opacity: 0; transform: translateY(-10px); }\n to { opacity: 1; transform: translateY(0); }\n`;\n\nconst fadeOut = keyframes`\n from { opacity: 1; transform: translateY(0); }\n to { opacity: 0; transform: translateY(-10px); }\n`;\n\ninterface AlertContainerProps {\n $type: AlertType;\n $dismissible?: boolean;\n $isClosing: boolean;\n}\n\nconst typeStyles = {\n error: css`\n background-color: ${theme.colors.red};\n border: 1px solid ${theme.colors.red};\n color: ${theme.colors.white};\n svg {\n color: ${theme.colors.white};\n }\n `,\n warning: css`\n background-color: ${theme.colors.yellow500};\n border: 1px solid ${theme.colors.yellow400};\n color: ${theme.colors.black};\n svg {\n color: ${theme.colors.black};\n }\n `,\n info: css`\n background-color: ${theme.colors.blue};\n border: 1px solid ${theme.colors.blue};\n color: ${theme.colors.white};\n svg {\n color: ${theme.colors.white};\n }\n `,\n success: css`\n background-color: ${theme.colors.green};\n border: 1px solid ${theme.colors.green2};\n color: ${theme.colors.white};\n svg {\n color: ${theme.colors.white};\n }\n `,\n};\n\nexport const AlertContainer = styled.div<AlertContainerProps>`\n position: fixed;\n width: 500px;\n top: 15px;\n right: 15px;\n padding: 1rem ${({ $dismissible }) => ($dismissible ? \"2.5rem\" : \"1rem\")} 1rem\n 1rem;\n margin-bottom: 1rem;\n animation: ${({ $isClosing }) => ($isClosing ? fadeOut : fadeIn)} 0.3s\n ease-out;\n animation-fill-mode: forwards;\n align-items: center;\n gap: 0.5rem;\n box-shadow: ${theme.shadows.shadow500};\n border-radius: 0.5rem;\n font-size: 1rem;\n font-weight: 500;\n\n ${({ $type }) => typeStyles[$type]}\n`;\n\nexport const DismissButton = styled.button`\n position: absolute;\n background: transparent;\n right: 10px;\n border: none;\n cursor: pointer;\n color: inherit;\n opacity: 1;\n transition: opacity 0.2s;\n\n &:hover {\n opacity: 0.7;\n }\n\n svg {\n width: 1rem;\n height: 1rem;\n }\n`;\n","import {\n forwardRef,\n ForwardRefRenderFunction,\n InputHTMLAttributes,\n} from \"react\";\nimport { FieldError } from \"react-hook-form\";\nimport { StyledPhoneInput, FormControl, FormLabel, FormErrorMessage } from \"./styles\";\nimport { PhoneInputRefType, ParsedCountry } from \"react-international-phone\";\n\ninterface PhoneInputChange {\n phone: string;\n dialCode: string;\n inputValue: string;\n}\n\ninterface PhoneInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value'> {\n id: string;\n label?: string;\n error?: string | FieldError;\n showErrorMessage?: boolean;\n value: string;\n onChange?: (value: PhoneInputChange) => void;\n labelTextColor?: string;\n backgroundColor?: string;\n borderColor?: string;\n focusBorderColor: string;\n inputPlaceholderColor?: string;\n inputTextColor?: string;\n}\n\nconst PhoneInputBase: ForwardRefRenderFunction<PhoneInputRefType, PhoneInputProps> = (\n { id,\n label,\n error,\n showErrorMessage = true,\n labelTextColor,\n backgroundColor,\n borderColor,\n focusBorderColor,\n inputPlaceholderColor,\n inputTextColor,\n value,\n ...rest\n },\n ref\n) => {\n return (\n <FormControl isInvalid={!!error} >\n {!!label && <FormLabel htmlFor={id} $textColor={labelTextColor}>{label}</FormLabel>}\n <StyledPhoneInput\n ref={ref}\n defaultCountry=\"br\"\n disableCountryGuess={true}\n disableDialCodeAndPrefix={true}\n showDisabledDialCodeAndPrefix={false}\n placeholder={rest.placeholder}\n aria-invalid={!!error && showErrorMessage ? \"true\" : \"false\"}\n value={String(value)}\n onChange={(phone: string, meta: { country: ParsedCountry; inputValue: string }) => {\n if (typeof rest.onChange === \"function\") {\n rest.onChange({\n phone,\n dialCode: meta.country.dialCode,\n inputValue: meta.inputValue,\n });\n }\n }}\n inputProps={{\n id,\n name: rest.name || 'phone',\n required: rest.required,\n autoFocus: rest.autoFocus,\n autoComplete: rest.autoComplete || \"tel\",\n }}\n $backgroundColor={backgroundColor}\n $borderColor={borderColor}\n $focusBorderColor={focusBorderColor}\n $placeholderColor={inputPlaceholderColor}\n $textColor={inputTextColor}\n />\n {!!error && showErrorMessage && (\n <FormErrorMessage data-testid=\"error-message\">\n {typeof error === 'string' ? error : error?.message}\n </FormErrorMessage>\n )}\n </FormControl>\n );\n};\n\nexport const PhoneInput = forwardRef(PhoneInputBase);\n","import styled, { css } from \"styled-components\";\nimport { PhoneInput } from \"react-international-phone\";\nimport \"react-international-phone/style.css\";\nimport { theme } from \"../styles/theme\";\n\nexport const FormLabel = styled.label<{ $textColor?: string }>`\n font-family: ${theme.fonts.primary};\n font-style: normal;\n font-weight: 500;\n font-size: 1rem;\n color: ${(props) => props.$textColor || theme.colors.black};\n display: block;\n margin-bottom: 0.5rem;\n text-align: left;\n`;\n\nexport const StyledPhoneInput = styled(PhoneInput)<{ \n $backgroundColor?: string, \n $borderColor?: string, \n $focusBorderColor?: string, \n $placeholderColor?: string\n $textColor?: string,\n}>`\n width: 100%;\n height: 3.125rem;\n background: ${(props) => props.$backgroundColor || theme.colors.white};\n font-family: ${theme.fonts.primary};\n border: 1px solid ${(props) => props.$borderColor || theme.colors.transparent};\n border-radius: 0.125rem;\n\n &:focus-within {\n border-radius: 0.125rem;\n border: 2px solid ${(props) => props.$focusBorderColor || theme.colors.yellow500};\n outline: none;\n\n .react-international-phone-country-selector-button {\n border-right: 1px solid ${(props) => props.$focusBorderColor || theme.colors.yellow500};\n }\n }\n\n /* Style for the inner phone input container */\n .react-international-phone-input-container {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n overflow: hidden;\n font-family: ${theme.fonts.primary};\n font-size: 1rem;\n font-weight: 500;\n color: ${(props) => props.$textColor || theme.colors.black};\n background: ${(props) => props.$backgroundColor || theme.colors.white};\n }\n\n /* Style for the country selector button */\n .react-international-phone-country-selector-button {\n height: 100%;\n background: ${(props) => props.$backgroundColor || theme.colors.white};\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: ${theme.fonts.primary};\n font-size: 1rem;\n font-weight: 500;\n cursor: pointer;\n outline: none;\n border: none;\n border-right: 1px solid ${(props) => props.$borderColor || theme.colors.transparent};\n padding-left: 10px;\n }\n\n .react-international-phone-input:focus,\n .react-international-phone-input:focus-visible {\n outline: none !important; /* Removes the default blue/browser outline */\n border-color: initial; /* Or set to your desired default border color */\n box-shadow: none !important; /* Remove any default box shadow on focus */\n }\n\n /* Remove apenas o outline azul do botão e dropdown sem alterar outros estilos */\n .react-international-phone-country-selector-button:focus,\n .react-international-phone-country-selector-button:focus-visible {\n outline: none !important;\n }\n\n .react-international-phone-country-selector-dropdown {\n outline: none !important;\n padding: 10px !important;\n }\n\n .react-international-phone-country-selector-dropdown__list-item {\n padding-top: 5px !important;\n padding-bottom: 5px !important;\n }\n\n .react-international-phone-country-selector-dropdown__list-item:focus,\n .react-international-phone-country-selector-dropdown__list-item:focus-visible {\n outline: none !important;\n }\n\n /* Style for the input itself */\n input.react-international-phone-input {\n flex: 1;\n height: 100%;\n padding: 0 0.5rem;\n margin: 0;\n background: ${(props) => props.$backgroundColor || theme.colors.white};\n font-family: ${theme.fonts.primary};\n font-style: normal;\n font-weight: 500;\n font-size: 1rem;\n line-height: 1.5rem;\n color: ${(props) => props.$textColor || theme.colors.black};\n outline: none;\n border: none;\n border-radius: 0.125rem;\n\n &::placeholder {\n font-size: 1rem;\n line-height: 1.5rem;\n color: ${(props) => props.$placeholderColor || theme.colors.gray100};\n font-weight: 700;\n }\n\n &:-webkit-autofill {\n background: ${(props) => props.$backgroundColor || theme.colors.white} !important;\n -webkit-text-fill-color: ${(props) => props.$textColor || theme.colors.black} !important;\n transition: background-color 5000s ease-in-out 0s;\n }\n\n &:-webkit-autofill::first-line {\n font-family: ${theme.fonts.primary};\n font-size: 1rem;\n font-weight: 500;\n }\n }\n`;\n\nexport const FormErrorMessage = styled.small`\n font-size: 0.75rem;\n line-height: 1.125rem;\n color: ${theme.colors.red};\n margin-top: 0.25rem;\n display: block;\n`;\n\nexport const FormControl = styled.div.withConfig({\n shouldForwardProp: (prop) => ![\"isInvalid\"].includes(prop),\n})<{ isInvalid?: boolean }>`\n ${FormLabel} {\n ${(props) =>\n props.isInvalid &&\n css`\n color: ${theme.colors.red};\n `};\n }\n\n ${StyledPhoneInput} {\n ${(props) =>\n props.isInvalid &&\n css`\n border: 1px solid ${theme.colors.red};\n\n &:not(:focus)::placeholder {\n color: ${theme.colors.red};\n font-weight: 600;\n }\n `};\n\n .react-international-phone-input-container {\n ${(props) =>\n props.isInvalid &&\n css`\n border: 1px solid ${theme.colors.red};\n\n &:not(:focus)::placeholder {\n color: ${theme.colors.red};\n font-weight: 600;\n }\n `};\n }\n\n .react-international-phone-country-selector-button {\n ${(props) =>\n props.isInvalid &&\n css`\n border-right: 1px solid ${theme.colors.red};\n `};\n }\n }\n`;\n","import {\n forwardRef,\n ForwardRefRenderFunction,\n SelectHTMLAttributes,\n} from \"react\";\nimport { FieldError } from \"react-hook-form\";\nimport { Product } from \"../../domain/Product\";\n\nimport {\n FormControl,\n FormErrorMessage,\n FormLabel,\n Select as FormSelect,\n} from \"./styles\";\n\ninterface ProductSelectProps extends SelectHTMLAttributes<HTMLSelectElement> {\n id: string;\n label?: string;\n error?: string | FieldError;\n showErrorMessage?: boolean;\n labelTextColor?: string;\n backgroundColor?: string;\n borderColor?: string;\n focusBorderColor?: string;\n textColor?: string;\n products: Product[];\n placeholder?: string;\n}\n\nconst ProductSelectBase: ForwardRefRenderFunction<HTMLSelectElement, ProductSelectProps> = (\n {\n id,\n label,\n error,\n showErrorMessage = true,\n labelTextColor,\n backgroundColor,\n borderColor,\n focusBorderColor,\n textColor,\n products,\n placeholder = \"Selecione um produto\",\n ...rest\n },\n ref\n) => {\n return (\n <FormControl isInvalid={!!error}>\n {!!label && <FormLabel htmlFor={id} $textColor={labelTextColor}>{label}</FormLabel>}\n\n <FormSelect\n id={id}\n ref={ref}\n aria-invalid={!!error && showErrorMessage ? \"true\" : \"false\"}\n $backgroundColor={backgroundColor}\n $borderColor={borderColor}\n $focusBorderColor={focusBorderColor}\n $textColor={textColor}\n {...rest}\n >\n <option value=\"\" disabled>\n {placeholder}\n </option>\n {products.map((product) => (\n <option key={product.id} value={product.id}>\n {product.name}\n </option>\n ))}\n </FormSelect>\n\n {!!error && showErrorMessage && (\n <FormErrorMessage data-testid=\"error-message\">\n {typeof error === 'string' ? error : error.message}\n </FormErrorMessage>\n )}\n </FormControl>\n );\n};\n\nexport const ProductSelect = forwardRef(ProductSelectBase);\n","import { SelectHTMLAttributes } from \"react\";\nimport styled, { css } from \"styled-components\";\nimport { theme } from \"../styles/theme\";\n\nexport const FormLabel = styled.label<{ $textColor?: string }>`\n font-family: ${theme.fonts.primary};\n font-style: normal;\n font-weight: 500;\n font-size: 1rem;\n color: ${(props) => props.$textColor || theme.colors.black};\n display: block;\n margin-bottom: 0.5rem;\n text-align: left;\n`;\n\nexport const Select = styled.select<\n SelectHTMLAttributes<HTMLSelectElement> & { \n $backgroundColor?: string, \n $borderColor?: string, \n $focusBorderColor?: string, \n $textColor?: string,\n }\n>`\n font-family: ${theme.fonts.primary};\n font-style: normal;\n font-weight: 500;\n font-size: 1rem;\n line-height: 1.5rem;\n background: ${(props) => props.$backgroundColor || theme.colors.white};\n color: ${(props) => props.$textColor || theme.colors.black};\n padding: 0.5rem 3rem 0.5rem 0.5rem; /* Aumentado padding-right para 3rem */\n border-radius: 0.125rem;\n border: 1px solid ${(props) => props.$borderColor || theme.colors.transparent};\n display: block;\n height: 3.125rem;\n width: 100%;\n cursor: pointer;\n \n /* Remover a seta padrão do navegador */\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n \n /* Adicionar seta personalizada maior */\n background-image: url(\"data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e\");\n background-repeat: no-repeat;\n background-position: right 1rem center; /* Posicionado a 1rem da direita */\n background-size: 1.25rem; /* Tamanho da seta aumentado para 1.25rem */\n\n &:focus {\n border-radius: 0.125rem;\n border: 2px solid ${(props) => props.$focusBorderColor || theme.colors.yellow500};\n outline: none;\n }\n\n /* Estilo para option disabled (placeholder) */\n option:disabled {\n color: ${theme.colors.gray100};\n font-weight: 800;\n }\n\n /* Estilo para options normais */\n option:not(:disabled) {\n color: ${(props) => props.$textColor || theme.colors.black};\n font-weight: 500;\n }\n`;\n\nexport const FormErrorMessage = styled.small`\n font-size: 0.75rem;\n line-height: 1.125rem;\n color: ${theme.colors.red};\n margin-top: 0.25rem;\n display: block;\n`;\n\nexport const FormControl = styled.div.withConfig({\n shouldForwardProp: (prop) => ![\"isInvalid\"].includes(prop),\n})<{ isInvalid?: boolean }>`\n ${FormLabel} {\n ${(props) =>\n props.isInvalid &&\n css`\n color: ${theme.colors.red};\n `};\n }\n\n ${Select} {\n ${(props) =>\n props.isInvalid &&\n css`\n border: 1px solid ${theme.colors.red};\n `};\n\n &:focus {\n ${(props) =>\n props.isInvalid &&\n css`\n border: 1px solid ${theme.colors.red};\n `};\n }\n }\n`;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAAgC;;;ACAhC,mBAAyB;AAElB,SAAS,WAAW;AACzB,QAAM,CAAC,OAAO,QAAQ,QAAI,uBAAuB,IAAI;AAErD,QAAM,cAAc,CAAC,QAAiB;AACpC,UAAM,WAAW,eAAe,QAAQ,MAAM,IAAI,MAAM,OAAO,GAAG,CAAC;AACnE,aAAS,QAAQ;AACjB,YAAQ,MAAM,QAAQ;AAAA,EACxB;AAEA,QAAM,aAAa,MAAM,SAAS,IAAI;AAEtC,SAAO,EAAE,OAAO,aAAa,WAAW;AAC1C;;;ADZA,6BAAmD;AACnD,iBAA4B;AAC5B,UAAqB;;;AEInB,IAAM,kBAAkB;AACxB,IAAM,WAAW;AAEV,IAAM,YAAY,MACvB,OAAO,WAAW,eAAe,OAAO,aAAa;AAEvD,IAAM,WAAW,CAAC,SAAiB,OAAO,KAAK,KAAK,KAAK;AAElD,SAAS,cAAc,aAAa,UAAkD;AAC3F,MAAI,CAAC,UAAU,EAAG,QAAO,EAAE,MAAM,MAAM,SAAS,MAAM;AACtD,MAAI;AACF,UAAM,MAAM,OAAO,aAAa,QAAQ,eAAe;AACvD,QAAI,CAAC,IAAK,QAAO,EAAE,MAAM,MAAM,SAAS,MAAM;AAC9C,UAAM,SAAS,KAAK,MAAM,GAAG;AAC7B,QAAI,CAAC,QAAQ,UAAW,QAAO,EAAE,MAAM,MAAM,SAAS,MAAM;AAC5D,UAAM,MAA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uDAACC,SAAA,EAAO,SAAS,uBAAuB,OAAO,iBAAiB,MAAK,UAAS,cAAc,SAAS,6BAErG,GACF;AAAA,QAEA,8CAAC,OAAE;AAAA;AAAA,UAAoK;AAAA,UACrK;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,QAAO;AAAA,cACP,KAAI;AAAA,cACL;AAAA;AAAA,UAED;AAAA,UAAI;AAAA,UAAgB;AAAA,UAAI;AAAA,UAAO;AAAA,UAAI;AAAA,WAAmI;AAAA,SAE1K;AAAA,OACF;AAAA,KACF;AAEJ,CAAC;AAED,mBAAmB,cAAc;AAEjC,IAAO,eAAQ;","names":["import_react","styled","import_react","import_react","import_styled_components","styled","Input","import_styled_components","styled","import_jsx_runtime","Button","import_react","import_styled_components","styled","import_jsx_runtime","import_react","import_styled_components","FormLabel","styled","FormErrorMessage","FormControl","import_jsx_runtime","FormControl","FormLabel","FormErrorMessage","PhoneInput","import_react","import_styled_components","FormLabel","styled","FormErrorMessage","FormControl","import_jsx_runtime","FormControl","FormLabel","FormErrorMessage","import_jsx_runtime","React","error","Input","PhoneInput","Button"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/components/Form/index.tsx","../src/components/hooks/useError.ts","../src/utils/utm.ts","../src/components/styles/utils.ts","../src/components/Form/styles.ts","../src/components/styles/theme.ts","../src/components/ProductSelect/styles.ts","../src/components/styles/FontLoader.tsx","../src/components/Input/index.tsx","../src/components/Input/masks.ts","../src/components/Input/styles.ts","../src/components/Button/styles.ts","../src/components/Button/index.tsx","../src/components/Alert/index.tsx","../src/components/Alert/styles.ts","../src/components/Modal/index.tsx","../src/components/Modal/styles.ts","../src/components/PhoneInput/index.tsx","../src/components/PhoneInput/styles.ts","../src/components/ProductSelect/index.tsx","../src/config/environments.ts"],"sourcesContent":["export { default as MitreFormComponent, PreferenciaContato } from \"./components/Form\";\nexport type { Ambiente, Canal, MitreFormComponentProps, RequestBody } from \"./components/Form\";\n","import React, { useState } from \"react\";\nimport { useError } from \"../hooks/useError\";\nimport { useForm, SubmitHandler, Controller } from \"react-hook-form\";\nimport { yupResolver } from \"@hookform/resolvers/yup\";\nimport * as yup from \"yup\";\n\nimport { UTM, isBrowser, resolveUtmWithPriority } from '../../utils/utm';\nimport { Product } from '../../domain/Product';\n\nimport { PhoneNumberUtil } from 'google-libphonenumber';\nconst phoneUtil = PhoneNumberUtil.getInstance();\n\nimport {\n FormContainer,\n HeaderContainer,\n ButtonContainer,\n Form,\n Title,\n Subtitle\n} from \"./styles\";\nimport {\n FormControl,\n FormLabel,\n Select as FormSelect,\n FormErrorMessage,\n} from \"../ProductSelect/styles\";\nimport { theme } from \"../styles/theme\";\nimport { useMontserratFont } from \"../styles/FontLoader\";\n\nimport { Input } from \"../Input\";\nimport { Button } from \"../Button\";\nimport { Alert } from \"../Alert\";\nimport { Modal } from \"../Modal\";\nimport { PhoneInput } from \"../PhoneInput\";\nimport { ProductSelect } from \"../ProductSelect\";\n\nimport { resolveEnvironment, type Ambiente } from \"../../config/environments\";\n\nexport enum PreferenciaContato {\n Whatsapp = \"Whatsapp\",\n Email = \"Email\",\n Ligacao = \"Ligação\",\n}\n\nexport type { Ambiente };\n\nexport type Canal = \"form\" | \"chat\" | \"whatsapp\";\n\nconst WHATSAPP_MESSAGE = \"Olá! Tenho interesse e gostaria de mais informações.\";\n\nconst WHATSAPP_TITLE = \"Fale com um corretor por WhatsApp\";\nconst WHATSAPP_SUBTITLE = \"Informe seus dados para contato.\";\nconst WHATSAPP_BUTTON_TEXT = \"Entrar\";\n\nconst CHAT_TITLE = \"Fale com um corretor por chat\";\nconst CHAT_SUBTITLE = \"Informe seus dados para contato.\";\nconst CHAT_BUTTON_TEXT = \"Entrar\";\n\nconst MODAL_ERROR_TITLE = \"Não foi possível completar seu contato\";\nconst MODAL_ERROR_MESSAGE = \"Por favor, tente novamente em alguns instantes.\";\nconst MODAL_ERROR_BUTTON_TEXT = \"OK\";\n\nconst MODAL_SUCCESS_TITLE = \"Cadastro realizado!\";\nconst MODAL_SUCCESS_MESSAGE_WHATSAPP = \"Clique abaixo para continuar pelo WhatsApp.\";\nconst MODAL_SUCCESS_BUTTON_WHATSAPP = \"Abrir WhatsApp\";\nconst MODAL_SUCCESS_MESSAGE_CHAT = \"Clique abaixo para iniciar o atendimento.\";\nconst MODAL_SUCCESS_BUTTON_CHAT = \"Iniciar atendimento\";\n\ntype ActionModalState =\n | { kind: \"success\"; canal: \"whatsapp\"; targetUrl: string }\n | {\n kind: \"success\";\n canal: \"chat\";\n chatUrl: string;\n virtualObj: Record<string, unknown>;\n }\n | { kind: \"error\" };\n\nfunction buildWhatsappUrl(phone: string): string {\n const digits = phone.replace(/\\D/g, \"\");\n const text = encodeURIComponent(WHATSAPP_MESSAGE);\n return `https://api.whatsapp.com/send?phone=${digits}&text=${text}`;\n}\n\nfunction submitChatInNewTab(\n chatUrl: string,\n virtualObj: Record<string, unknown>\n): void {\n // Cria, submete e remove um form em nova aba. Executar dentro de gesto do\n // usuário (clique no botão do modal) garante que o browser não bloqueia.\n const form = document.createElement(\"form\");\n form.method = \"POST\";\n form.action = chatUrl;\n form.target = \"_blank\";\n const input = document.createElement(\"input\");\n input.type = \"hidden\";\n input.name = \"virtual_obj\";\n input.value = JSON.stringify(virtualObj);\n form.appendChild(input);\n document.body.appendChild(form);\n form.submit();\n document.body.removeChild(form);\n}\n\nexport interface MitreFormComponentProps {\n products: Product[];\n /**\n * Define de qual config interno o componente lê `apiUrl`, `apiToken`,\n * `whatsappPhone` e `chatUrl`. Default `\"homol\"`.\n */\n ambiente?: Ambiente;\n /** Default `\"form\"`. Ver doc/canal-feature.md. */\n canal?: Canal;\n showHeader?: boolean;\n title?: string;\n subtitle?: string;\n backgroundColor?: string;\n buttonBackgroundColor?: string;\n buttonTextColor?: string;\n textColor?: string;\n innerPadding?: string;\n inputBackgroundColor?: string;\n inputFocusBorderColor?: string;\n inputBorderColor?: string;\n inputTextColor?: string;\n inputPlaceholderColor?: string;\n showPreferenciaContato?: boolean;\n /** Opcional. Repassado no body do POST /leads e no `virtual_obj` (modo chat). */\n idProdutoTerceiro?: string | number;\n /** Opcional. Repassado no body do POST /leads e no `virtual_obj` (modo chat). */\n idEmpreendimento?: string | number;\n /**\n * Default: `true` em `canal === \"chat\"` / `\"whatsapp\"` (paridade com `atendimento.html`),\n * `false` em `canal === \"form\"`. Passe `false` para forçar criação do evento.\n */\n naoCriarEvento?: boolean;\n}\n\nexport interface RequestBody {\n name: string;\n email: string;\n phone: string;\n message: string;\n productId: string;\n utm_source: string;\n utm_medium?: string;\n utm_campaign?: string;\n utm_term?: string;\n preferencia_contato?: string;\n /** Presente quando `canal !== \"form\"`. */\n canal?: Canal;\n /**\n * Presente (e sempre `true`) quando `canal !== \"form\"`. Paridade com o fluxo legado\n * `atendimento.html`, cujo `<form id=\"chat-form\">` enviava o hidden `is_chat=true`\n * em ambos os canais (chat e whatsapp).\n */\n is_chat?: boolean;\n /** Presente quando `canal !== \"form\"`. `window.location.href` no momento do submit. */\n pagina?: string;\n /** Presente quando a prop homônima for informada e `canal !== \"form\"`. */\n idProdutoTerceiro?: string | number;\n /** Presente quando a prop homônima for informada e `canal !== \"form\"`. */\n idEmpreendimento?: string | number;\n /**\n * Presente quando o flag efetivo é `true`. Por default vai `true` em\n * `canal === \"chat\"` / `canal === \"whatsapp\"`; pode ser desligado com\n * `naoCriarEvento={false}`.\n */\n naoCriarEvento?: boolean;\n}\n\nconst isPhoneValid = (phone: string) => {\n try {\n return phoneUtil.isValidNumber(phoneUtil.parseAndKeepRawInput(phone));\n } catch (error) {\n console.log('erro ao validar telefone = ' + error)\n return false;\n }\n};\n\n// Schema base sem productId\nconst baseSchema = {\n name: yup.string().required(\"Nome é obrigatório\"),\n email: yup.string().required(\"Email é obrigatório\").email(\"Email inválido\"),\n phone: yup.object().shape({\n phone: yup.string().required(\"Telefone é obrigatório!\")\n .test(\n 'is-valid-phone',\n 'Número de telefone inválido!',\n function (value) {\n const digitsOnly = value?.replace(/\\D/g, '') || '';\n return digitsOnly.length >= 8 && isPhoneValid(value)\n }),\n inputValue: yup.string().required(\"Telefone é obrigatório!\"),\n dialCode: yup.string().required(\"Código de país é obrigatório\")\n }),\n};\n\n// Schema com productId quando necessário\nconst schemaWithProduct = yup.object().shape({\n ...baseSchema,\n productId: yup.string().required(\"Produto é obrigatório\"),\n});\n\nconst schema = yup.object().shape(baseSchema);\n\nconst MitreFormComponent = React.forwardRef<HTMLDivElement, MitreFormComponentProps>(({\n products,\n ambiente = \"homol\",\n canal = \"form\",\n showHeader = true,\n title = \"Atendimento por mensagem\",\n subtitle = \"Informe seus dados e retornaremos a mensagem.\",\n backgroundColor = theme.colors.gray180,\n textColor = theme.colors.black,\n buttonBackgroundColor = theme.colors.yellow500,\n buttonTextColor = theme.colors.black,\n innerPadding = \"1rem\",\n inputBackgroundColor = theme.colors.white,\n inputBorderColor = theme.colors.transparent,\n inputFocusBorderColor = theme.colors.yellow500,\n inputPlaceholderColor = theme.colors.gray100,\n inputTextColor = theme.colors.black,\n showPreferenciaContato = false,\n idProdutoTerceiro,\n idEmpreendimento,\n naoCriarEvento,\n}, ref) => {\n // Carregar fonte Montserrat automaticamente\n useMontserratFont();\n\n const [loading, setIsLoading] = useState(false);\n const { error, handleError, clearError } = useError();\n const [successMessage, setSuccessMessage] = useState('');\n const [formKey, setFormKey] = useState(0);\n const [selectedProductId, setSelectedProductId] = useState<number | null>(null);\n const [actionModal, setActionModal] = useState<ActionModalState | null>(null);\n\n // Validação do array de produtos\n const validateProducts = (): string | null => {\n if (!products) {\n return \"Lista de produtos não foi fornecida\";\n }\n\n if (!Array.isArray(products)) {\n return \"Lista de produtos deve ser um array\";\n }\n\n if (products.length === 0) {\n return \"Lista de produtos não pode estar vazia\";\n }\n\n // Validar cada produto no array\n for (let i = 0; i < products.length; i++) {\n const product = products[i];\n\n if (!product) {\n return `Produto na posição ${i} é inválido (nulo/undefined)`;\n }\n\n if (typeof product.id !== 'number' || product.id <= 0) {\n return `Produto na posição ${i} possui ID inválido (deve ser um número positivo)`;\n }\n\n if (typeof product.name !== 'string' || product.name.trim().length === 0) {\n return `Produto na posição ${i} possui nome inválido (deve ser uma string não vazia)`;\n }\n }\n\n return null;\n };\n\n const env = resolveEnvironment(ambiente);\n\n const validateAmbienteConfig = (): string | null => {\n if (!env) {\n return `ambiente='${ambiente}' não é reconhecido. Use 'homol' ou 'prod'.`;\n }\n if (!env.apiUrl || !env.apiToken) {\n return `Configuração interna do ambiente '${ambiente}' está incompleta (apiUrl/apiToken).`;\n }\n return null;\n };\n\n const validateWhatsappConfig = (): string | null => {\n if (canal !== \"whatsapp\") return null;\n if (!env) return null;\n const raw = env.whatsappPhone?.trim() ?? \"\";\n if (!raw) {\n return `canal='whatsapp' exige whatsappPhone no ambiente '${ambiente}'.`;\n }\n const normalized = raw.startsWith(\"+\") ? raw : `+${raw}`;\n if (!isPhoneValid(normalized)) {\n return `whatsappPhone do ambiente '${ambiente}' é inválido (${JSON.stringify(env.whatsappPhone)}).`;\n }\n return null;\n };\n\n const validateChatConfig = (): string | null => {\n if (canal !== \"chat\") return null;\n if (!env) return null;\n const raw = env.chatUrl?.trim() ?? \"\";\n if (!raw) {\n return `canal='chat' exige chatUrl no ambiente '${ambiente}'.`;\n }\n try {\n const parsed = new URL(raw);\n if (parsed.protocol !== \"http:\" && parsed.protocol !== \"https:\") {\n return `chatUrl do ambiente '${ambiente}' precisa ter protocolo http(s) (recebido: ${JSON.stringify(env.chatUrl)}).`;\n }\n } catch {\n return `chatUrl do ambiente '${ambiente}' não é URL absoluta válida (recebido: ${JSON.stringify(env.chatUrl)}).`;\n }\n return null;\n };\n\n const productsValidationError = validateProducts();\n const ambienteConfigError = validateAmbienteConfig();\n const whatsappConfigError = validateWhatsappConfig();\n const chatConfigError = validateChatConfig();\n // Em canal === \"whatsapp\" a preferência já é implícita (Whatsapp); em canal === \"chat\"\n // o legado não tinha esse campo. Em ambos o select é ocultado mesmo que o consumidor\n // tenha passado showPreferenciaContato={true}.\n const effectiveShowPreferenciaContato =\n canal === \"whatsapp\" || canal === \"chat\" ? false : showPreferenciaContato;\n // Override forte de título e subtítulo nos canais de atendimento direto.\n const effectiveTitle =\n canal === \"whatsapp\" ? WHATSAPP_TITLE : canal === \"chat\" ? CHAT_TITLE : title;\n const effectiveSubtitle =\n canal === \"whatsapp\"\n ? WHATSAPP_SUBTITLE\n : canal === \"chat\"\n ? CHAT_SUBTITLE\n : subtitle;\n\n // UTM resolved inside the component (URL > localStorage (7d TTL) > referrer)\n const [utm, setUtm] = useState<UTM>({ utm_source: 'direto', createdAt: new Date().toISOString() });\n\n // Usar schema com productId se houver mais de 1 produto\n const formSchema = products && products.length > 1 ? schemaWithProduct : schema;\n\n const { control, register, handleSubmit, formState: { errors }, reset, clearErrors } = useForm<{\n name: string;\n email: string;\n phone: { phone: string; inputValue: string; dialCode: string; };\n productId?: string;\n preferencia_contato?: string;\n }>({\n resolver: yupResolver(formSchema),\n mode: 'onSubmit',\n });\n\n React.useEffect(() => {\n if (!isBrowser()) return;\n const { data } = resolveUtmWithPriority(new Date());\n setUtm(data);\n }, []);\n\n const resetForm = () => {\n const resetData: any = {\n name: \"\",\n email: \"\",\n phone: { phone: \"\", inputValue: \"\", dialCode: \"\" },\n };\n\n // Incluir productId no reset se houver mais de 1 produto\n if (products && products.length > 1) {\n resetData.productId = \"\";\n setSelectedProductId(null);\n }\n\n reset(resetData, {\n keepErrors: false,\n keepDirty: false,\n keepTouched: false,\n keepIsSubmitted: false,\n keepSubmitCount: false,\n keepValues: false,\n keepDefaultValues: false,\n });\n clearErrors();\n setFormKey(k => k + 1); // Force remount\n };\n\n const sendMessage: SubmitHandler<{\n name: string;\n email: string;\n phone: { phone: string; inputValue: string; dialCode: string; };\n productId?: string;\n preferencia_contato?: string;\n }> = async (data) => {\n const { name, email, phone, productId, preferencia_contato } = data;\n\n const phoneValue = phone.inputValue;\n const phoneDigitsOnly = phoneValue?.replace(/\\D/g, '') || '';\n\n const message = \"Gostaria de mais informações sobre o produto\";\n\n setActionModal(null);\n\n try {\n setIsLoading(true);\n\n // env é garantido não-nulo aqui: validateAmbienteConfig roda em render-time\n // e bloqueia a UI antes de chegarmos no submit caso o config esteja inválido.\n if (!env) {\n throw new Error(\"Ambiente não resolvido\");\n }\n\n if (!products || products.length === 0) {\n throw new Error(\"Parâmetros obrigatórios não informados\");\n }\n\n // Determinar qual produto usar\n let selectedProduct: Product;\n\n if (products.length === 1) {\n // Se há apenas 1 produto, usar ele\n selectedProduct = products[0];\n } else {\n // Se há múltiplos produtos, usar o selecionado\n if (!productId) {\n throw new Error(\"Produto deve ser selecionado\");\n }\n const foundProduct = products.find(p => p.id.toString() === productId);\n if (!foundProduct) {\n throw new Error(\"Produto selecionado não encontrado\");\n }\n selectedProduct = foundProduct;\n }\n\n const paginaAtual =\n typeof window !== \"undefined\" ? window.location.href : undefined;\n\n // Default `true` em chat/whatsapp para paridade com o atendimento.html,\n // que sempre enviava o hidden `naoCriarEvento=true`. Override via prop.\n const naoCriarEventoEfetivo =\n canal !== \"form\" && (naoCriarEvento ?? true);\n\n const requestBody: RequestBody = {\n name,\n email,\n phone: phoneDigitsOnly,\n message,\n productId: selectedProduct.id.toString(),\n utm_source: utm.utm_source,\n utm_campaign: utm.utm_campaign,\n utm_medium: utm.utm_medium,\n utm_term: utm.utm_term,\n ...(canal === \"whatsapp\"\n ? { preferencia_contato: PreferenciaContato.Whatsapp }\n : effectiveShowPreferenciaContato && preferencia_contato\n ? { preferencia_contato }\n : {}),\n ...(canal !== \"form\"\n ? {\n canal,\n ...(paginaAtual ? { pagina: paginaAtual } : {}),\n // Paridade com atendimento.html legado: o mesmo <form id=\"chat-form\">\n // era usado para chat e whatsapp, portanto is_chat=true ia em ambos.\n is_chat: true,\n ...(idProdutoTerceiro !== undefined ? { idProdutoTerceiro } : {}),\n ...(idEmpreendimento !== undefined ? { idEmpreendimento } : {}),\n ...(naoCriarEventoEfetivo ? { naoCriarEvento: true } : {}),\n }\n : {}),\n };\n\n const response = await fetch(`${env.apiUrl}/leads`, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n Authorization: `Basic ${env.apiToken}`,\n },\n body: JSON.stringify(requestBody),\n });\n\n if (!response.ok) {\n throw new Error(\"Falha ao enviar a mensagem!\");\n }\n\n const responseData = await response.json();\n const leadId = responseData.leadId || responseData.id || '';\n\n resetForm();\n\n if (canal === \"whatsapp\") {\n setActionModal({\n kind: \"success\",\n canal: \"whatsapp\",\n targetUrl: buildWhatsappUrl(env.whatsappPhone),\n });\n } else if (canal === \"chat\") {\n const virtualObj: Record<string, unknown> = {\n ...requestBody,\n externalOriginId: leadId,\n ...(paginaAtual ? { pagina: paginaAtual } : {}),\n ...(idProdutoTerceiro !== undefined ? { idProdutoTerceiro } : {}),\n ...(idEmpreendimento !== undefined ? { idEmpreendimento } : {}),\n ...(naoCriarEventoEfetivo ? { naoCriarEvento: true } : {}),\n };\n setActionModal({\n kind: \"success\",\n canal: \"chat\",\n chatUrl: env.chatUrl,\n virtualObj,\n });\n } else {\n setSuccessMessage(\"Mensagem enviada com sucesso!\");\n }\n } catch (err) {\n if (canal === \"whatsapp\" || canal === \"chat\") {\n setActionModal({ kind: \"error\" });\n } else {\n handleError(err);\n }\n } finally {\n setIsLoading(false);\n }\n };\n\n // Se houver erro de configuração (produtos, ambiente, canal whatsapp ou canal chat),\n // renderizar erro no lugar do formulário\n if (productsValidationError || ambienteConfigError || whatsappConfigError || chatConfigError) {\n if (productsValidationError) {\n console.error('Erro na validação dos produtos:', productsValidationError);\n }\n if (ambienteConfigError) {\n console.error('Erro na validação do ambiente:', ambienteConfigError);\n }\n if (whatsappConfigError) {\n console.error('Erro na validação do canal whatsapp:', whatsappConfigError);\n }\n if (chatConfigError) {\n console.error('Erro na validação do canal chat:', chatConfigError);\n }\n\n return (\n <FormContainer $backgroundColor={backgroundColor} $innerPadding={innerPadding} ref={ref}>\n <HeaderContainer>\n <Title $textColor={textColor}>Erro no carregamento do formulário!</Title>\n <Subtitle $textColor={textColor}>\n Não foi possível carregar o formulário. Tente novamente mais tarde.\n </Subtitle>\n </HeaderContainer>\n </FormContainer>\n );\n }\n\n return (\n <>\n {error && (\n <Alert\n type=\"error\"\n dismissible\n onDismiss={clearError}\n autoDismiss={5000}\n >\n {error!.message}\n </Alert>\n )}\n\n {successMessage && (\n <Alert\n type=\"success\"\n dismissible\n onDismiss={() => setSuccessMessage('')}\n autoDismiss={5000}\n >\n {successMessage}\n </Alert>\n )}\n\n {actionModal?.kind === \"error\" && (\n <Modal\n type=\"error\"\n title={MODAL_ERROR_TITLE}\n message={MODAL_ERROR_MESSAGE}\n primaryButtonText={MODAL_ERROR_BUTTON_TEXT}\n onPrimaryAction={() => setActionModal(null)}\n onClose={() => setActionModal(null)}\n primaryButtonBgColor={buttonBackgroundColor}\n primaryButtonTextColor={buttonTextColor}\n />\n )}\n\n {actionModal?.kind === \"success\" && actionModal.canal === \"whatsapp\" && (\n <Modal\n type=\"success\"\n title={MODAL_SUCCESS_TITLE}\n message={MODAL_SUCCESS_MESSAGE_WHATSAPP}\n primaryButtonText={MODAL_SUCCESS_BUTTON_WHATSAPP}\n onPrimaryAction={() => {\n window.open(actionModal.targetUrl, \"_blank\", \"noopener,noreferrer\");\n setActionModal(null);\n }}\n onClose={() => setActionModal(null)}\n primaryButtonBgColor={buttonBackgroundColor}\n primaryButtonTextColor={buttonTextColor}\n />\n )}\n\n {actionModal?.kind === \"success\" && actionModal.canal === \"chat\" && (\n <Modal\n type=\"success\"\n title={MODAL_SUCCESS_TITLE}\n message={MODAL_SUCCESS_MESSAGE_CHAT}\n primaryButtonText={MODAL_SUCCESS_BUTTON_CHAT}\n onPrimaryAction={() => {\n submitChatInNewTab(actionModal.chatUrl, actionModal.virtualObj);\n setActionModal(null);\n }}\n onClose={() => setActionModal(null)}\n primaryButtonBgColor={buttonBackgroundColor}\n primaryButtonTextColor={buttonTextColor}\n />\n )}\n\n <FormContainer $backgroundColor={backgroundColor} $innerPadding={innerPadding} ref={ref} >\n {showHeader &&\n <HeaderContainer>\n <Title $textColor={textColor}>{effectiveTitle}</Title>\n\n <Subtitle $textColor={textColor}>{effectiveSubtitle}</Subtitle>\n </HeaderContainer>\n }\n\n <Form $textColor={textColor} onSubmit={handleSubmit(sendMessage)} noValidate>\n {products.length > 1 && (\n <ProductSelect\n id=\"productId\"\n label=\"Produto de interesse *\"\n placeholder=\"Selecione um produto\"\n {...register(\"productId\")}\n error={errors.productId?.message}\n products={products}\n required\n labelTextColor={textColor}\n backgroundColor={inputBackgroundColor}\n borderColor={inputBorderColor}\n focusBorderColor={inputFocusBorderColor}\n textColor={inputTextColor}\n />\n )}\n\n <Input\n id=\"name\"\n label=\"Nome *\"\n placeholder=\"Digite seu nome\"\n {...register(\"name\")}\n error={errors.name?.message}\n autoComplete=\"name\"\n required\n labelTextColor={textColor}\n backgroundColor={inputBackgroundColor}\n borderColor={inputBorderColor}\n focusBorderColor={inputFocusBorderColor}\n inputPlaceholderColor={inputPlaceholderColor}\n inputTextColor={inputTextColor}\n />\n\n <Input\n id=\"email\"\n label=\"Email *\"\n type=\"email\"\n placeholder=\"exemplo@email.com\"\n {...register(\"email\")}\n error={errors.email?.message}\n autoComplete=\"email\"\n required\n labelTextColor={textColor}\n backgroundColor={inputBackgroundColor}\n borderColor={inputBorderColor}\n focusBorderColor={inputFocusBorderColor}\n inputPlaceholderColor={inputPlaceholderColor}\n inputTextColor={inputTextColor}\n />\n\n <Controller\n key={formKey}\n name=\"phone\"\n control={control}\n defaultValue={{ phone: \"\", inputValue: \"\", dialCode: \"\" }}\n shouldUnregister={true}\n render={({ field }) => {\n const errorMsg =\n errors.phone?.inputValue?.message ||\n errors.phone?.phone?.message ||\n errors.phone?.message;\n\n return (\n <PhoneInput\n id=\"phone\"\n label=\"Telefone *\"\n placeholder=\"(11) 00000-0000\"\n error={errorMsg}\n required\n value={field.value.phone}\n onChange={field.onChange}\n name={field.name}\n labelTextColor={textColor}\n backgroundColor={inputBackgroundColor}\n borderColor={inputBorderColor}\n focusBorderColor={inputFocusBorderColor}\n inputPlaceholderColor={inputPlaceholderColor}\n inputTextColor={inputTextColor}\n />\n );\n }}\n />\n\n {effectiveShowPreferenciaContato && (\n <FormControl isInvalid={!!errors.preferencia_contato}>\n <FormLabel htmlFor=\"preferencia_contato\" $textColor={textColor}>\n Preferência de Contato\n </FormLabel>\n <FormSelect\n id=\"preferencia_contato\"\n {...register(\"preferencia_contato\")}\n defaultValue=\"\"\n $backgroundColor={inputBackgroundColor}\n $borderColor={inputBorderColor}\n $focusBorderColor={inputFocusBorderColor}\n $textColor={inputTextColor}\n >\n <option value=\"\" disabled>Selecione uma opção</option>\n {Object.values(PreferenciaContato).map((op) => (\n <option key={op} value={op}>{op}</option>\n ))}\n </FormSelect>\n {errors.preferencia_contato && (\n <FormErrorMessage>{errors.preferencia_contato.message}</FormErrorMessage>\n )}\n </FormControl>\n )}\n\n <h6>* Campos de preenchimento obrigatório.</h6>\n\n <ButtonContainer>\n <Button bgColor={buttonBackgroundColor} color={buttonTextColor} type=\"submit\" isSubmitting={loading}>\n {canal === \"whatsapp\"\n ? WHATSAPP_BUTTON_TEXT\n : canal === \"chat\"\n ? CHAT_BUTTON_TEXT\n : \"Enviar mensagem\"}\n </Button>\n </ButtonContainer>\n\n <p>A Mitre Realty respeita a sua privacidade e utiliza os seus dados pessoais para contatá-lo por e-mail ou telefone aqui registrados. Para saber mais, acesse a nossa{' '}\n <a\n href=\"https://www.mitrerealty.com.br/politica-de-privacidade\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Política de Privacidade\n </a>. Ao clicar em {'\"'}enviar{'\"'}, você concorda em permitir que a Mitre Realty, armazene e processe os dados pessoais fornecidos por você para finalidade informada</p>\n\n </Form>\n </FormContainer>\n </>\n );\n});\n\nMitreFormComponent.displayName = \"MitreFormComponent\";\n\nexport default MitreFormComponent;\n","import { useState } from \"react\";\n\nexport function useError() {\n const [error, setError] = useState<Error | null>(null);\n\n const handleError = (err: unknown) => {\n const errorObj = err instanceof Error ? err : new Error(String(err));\n setError(errorObj);\n console.error(errorObj);\n };\n\n const clearError = () => setError(null);\n\n return { error, handleError, clearError };\n}\n","export type UTM = {\n utm_source: string; // default 'direto'\n utm_campaign?: string;\n utm_medium?: string;\n utm_term?: string;\n createdAt: string; // ISO 8601\n };\n \n const UTM_STORAGE_KEY = 'utm_meta';\n const TTL_DAYS = 7;\n \n export const isBrowser = () =>\n typeof window !== 'undefined' && typeof document !== 'undefined';\n \n const daysToMs = (days: number) => days * 24 * 60 * 60 * 1000;\n \n export function readStoredUtm(maxAgeDays = TTL_DAYS): { data: UTM | null; isValid: boolean } {\n if (!isBrowser()) return { data: null, isValid: false };\n try {\n const raw = window.localStorage.getItem(UTM_STORAGE_KEY);\n if (!raw) return { data: null, isValid: false };\n const parsed = JSON.parse(raw) as UTM;\n if (!parsed?.createdAt) return { data: null, isValid: false };\n const age = Date.now() - new Date(parsed.createdAt).getTime();\n const isValid = age <= daysToMs(maxAgeDays);\n return { data: isValid ? parsed : null, isValid };\n } catch {\n return { data: null, isValid: false };\n }\n }\n \n export function saveUtm(data: Partial<UTM>, now = new Date()): UTM | null {\n if (!isBrowser()) return null;\n const payload: UTM = {\n utm_source: data.utm_source || 'direto',\n utm_campaign: data.utm_campaign,\n utm_medium: data.utm_medium,\n utm_term: data.utm_term,\n createdAt: now.toISOString(),\n };\n try {\n window.localStorage.setItem(UTM_STORAGE_KEY, JSON.stringify(payload));\n } catch { /* ignore quota errors */ }\n return payload;\n }\n \n export function parseUrlUtm(loc?: Location): Partial<UTM> {\n if (!isBrowser()) return {};\n const locationObj = loc || window.location;\n const sp = new URL(locationObj.href).searchParams;\n const utm_source = sp.get('utm_source') || undefined;\n const utm_campaign = sp.get('utm_campaign') || undefined;\n const utm_medium = sp.get('utm_medium') || undefined;\n const utm_term = sp.get('utm_term') || undefined;\n return { utm_source, utm_campaign, utm_medium, utm_term };\n }\n \n export function inferSourceFromReferrer(ref?: string): string | undefined {\n if (!isBrowser()) return undefined;\n const href = (ref ?? document.referrer ?? '').toLowerCase();\n if (!href) return 'direto';\n const hostMatch = href.match(/https?:\\/\\/([^/]+)/);\n const host = hostMatch?.[1] ?? href;\n if (/google\\./.test(host) || /^g\\.co$/.test(host) || /^goo\\.gl$/.test(host)) return 'google';\n\n if (\n /(^|\\.)facebook\\.com$/.test(host) ||\n /(^|\\.)m\\.facebook\\.com$/.test(host) ||\n /(^|\\.)fb\\.com$/.test(host) ||\n /(^|\\.)fb\\.me$/.test(host) ||\n /(^|\\.)fb\\.watch$/.test(host) ||\n /(^|\\.)m\\.me$/.test(host)\n ) return 'facebook';\n\n if (\n /(^|\\.)instagram\\.com$/.test(host) ||\n /(^|\\.)l\\.instagram\\.com$/.test(host) ||\n /(^|\\.)instagr\\.am$/.test(host) ||\n /^ig\\.me$/.test(host)\n ) return 'instagram';\n\n if (/(^|\\.)linkedin\\.com$/.test(host) || /^lnkd\\.in$/.test(host)) return 'linkedin';\n\n if (/^t\\.co$/.test(host) || /(^|\\.)twitter\\.com$/.test(host) || /(^|\\.)x\\.com$/.test(host)) return 'twitter';\n\n if (/(^|\\.)youtube\\.com$/.test(host) || /^youtu\\.be$/.test(host)) return 'youtube';\n\n if (/(^|\\.)mail\\.google\\.com$/.test(host)) return 'email';\n\n if (/(^|\\.)outlook\\.live\\.com$/.test(host) || /(^|\\.)outlook\\.office\\.com$/.test(host)) return 'email';\n\n if (/^(wa\\.me)$/.test(host) || /(^|\\.)api\\.whatsapp\\.com$/.test(host) || /(^|\\.)web\\.whatsapp\\.com$/.test(host)) return 'whatsapp';\n\n if (/^t\\.me$/.test(host)) return 'telegram';\n\n if (/(^|\\.)tiktok\\.com$/.test(host)) return 'tiktok';\n return 'direto';\n }\n \n /** Resolve UTM e persiste quando necessário. Prioridade: localStorage (válido) > URL > referrer */\n export function resolveUtmWithPriority(\n now = new Date(),\n propOverride?: Partial<UTM>\n ): { data: UTM; source: 'localStorage' | 'url' | 'referrer' } {\n // 1) Se houver UTM válido no localStorage (<= 7 dias), usar SEM sobrescrever\n const stored = readStoredUtm();\n if (stored.data) {\n const merged = { ...stored.data, ...propOverride } as UTM;\n return { data: merged, source: 'localStorage' };\n }\n \n // 2) Se NÃO houver válido no localStorage, tentar URL. Se houver, salvar e usar\n const fromUrl = parseUrlUtm();\n if (fromUrl.utm_source) {\n const saved = saveUtm(fromUrl, now)!;\n const merged = { ...saved, ...propOverride } as UTM;\n return { data: merged, source: 'url' };\n }\n \n // 3) Fallback: inferir do referrer, apenas ler (não salvar no localStorage)\n const utm_source = inferSourceFromReferrer();\n const payload: UTM = {\n utm_source: utm_source || 'direto',\n utm_campaign: propOverride?.utm_campaign,\n utm_medium: propOverride?.utm_medium,\n utm_term: propOverride?.utm_term,\n createdAt: now.toISOString(),\n };\n return { data: payload, source: 'referrer' };\n }","type directionType = \"column\" | \"row\";\ntype alignItemsType = \"center\" | \"flex-start\";\n\ntype jutifyContentType = \"center\" | \"space-between\";\n\nexport function flex(\n direction: directionType = \"row\",\n alignItems?: alignItemsType,\n justifyContent?: jutifyContentType\n) {\n return `\n align-items:${alignItems || null};\n display:flex;\n flex-direction:${direction};\n justify-content:${justifyContent || null};\n `;\n}\n\nexport const alignX = `\n left:50%;\n transform:translateX(-50%);\n`;\n\nexport const alignXAndY = `\n left:50%;\n top:50%;\n transform:translate(-50%, -50%);\n`;\n\nexport const darkEffect = `\n &:hover {\n cursor:pointer;\n filter:brightness(98%);\n }\n\n &:active {\n filter:brightness(95%);\n }\n`;\n\nexport const opacityEffect = `\n &:hover {\n cursor:pointer;\n opacity:.9;\n }\n\n &:active {\n opacity:.7;\n }\n`;\n\nexport const modalZIndex = 9999;\n\nexport const breakpoints = {\n tablet: \"1024px\",\n};\n","import { flex, opacityEffect } from \"../styles/utils\";\nimport styled from \"styled-components\";\nimport { theme } from \"../styles/theme\";\n\nexport const FormContainer = styled.div<{\n $backgroundColor: string;\n $innerPadding: string;\n}>`\n ${flex(\"column\")}\n align-items: stretch;\n justify-content: flex-start;\n overflow-x: hidden;\n overflow-y: auto;\n\n background: ${(props) => props.$backgroundColor || theme.colors.gray180};\n\n padding: ${(props) => props.$innerPadding || \"1rem\"};\n\n /* Adaptar ao container pai */\n height: 100%;\n width: 100%;\n\n /* Reset CSS isolado */\n * {\n box-sizing: border-box;\n }\n\n /* Fonte aplicada apenas ao componente */\n font-family: ${theme.fonts.primary};\n\n /* Estilos necessários apenas neste escopo */\n button {\n cursor: pointer;\n font-family: ${theme.fonts.primary};\n }\n\n input, textarea, select {\n font-family: ${theme.fonts.primary};\n }\n\n [disabled] {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n /* Hide scrollbars for WebKit browsers */\n ::-webkit-scrollbar {\n display: none;\n }\n\n /* Hide scrollbars for Firefox */\n scrollbar-width: none;\n\n box-sizing: border-box;\n`;\n\nexport const HeaderContainer = styled.div`\n margin-bottom: 1rem;\n`;\n\nexport const ButtonContainer = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-top: 0.75rem;\n\n button {\n ${opacityEffect}\n color: ${theme.colors.black};\n font-weight: 600;\n border: none;\n border-radius: 8px;\n width: 60%;\n margin-top: 10px;\n margin-bottom: 10px;\n }\n`;\n\nexport const Form = styled.form<{ $textColor: string }>`\n label {\n font-weight: 700;\n }\n\n input {\n margin-bottom: 0.75rem;\n }\n\n p {\n font-family: ${theme.fonts.primary};\n font-style: italic;\n font-weight: 200;\n font-size: 0.8rem;\n color: ${(props) => props.$textColor || theme.colors.black};\n text-align: start;\n }\n\n a {\n font-family: ${theme.fonts.primary};\n font-style: italic;\n font-weight: 200;\n font-size: 0.8rem;\n color: ${(props) => props.$textColor || theme.colors.black};\n }\n\n h6 {\n text-align: start;\n margin-left: 10px;\n color: ${(props) => props.$textColor || theme.colors.black};\n font-weight: 600;\n }\n\n & > div {\n margin-bottom: 10px;,\n }\n`;\n\nexport const Title = styled.h2<{ $textColor: string }>`\n font-size: 1.25rem;\n font-weight: 700;\n line-height: 24px;\n letter-spacing: 0em;\n color: ${(props) => props.$textColor || theme.colors.black};\n`;\n\nexport const Subtitle = styled.p<{ $textColor: string }>`\n font-size: 1rem;\n font-weight: 400;\n line-height: 23px;\n letter-spacing: 0em;\n margin-top: 10px;\n color: ${(props) => props.$textColor || theme.colors.black};\n`;\n","/**\n * Sistema de tema isolado para o componente\n * Substitui as variáveis CSS globais para evitar conflitos em projetos host\n */\n\nexport const theme = {\n colors: {\n // Cores principais\n red: '#e52e4d',\n white: '#FFF',\n black: '#2F2F2F',\n black2: '#1E1E1E',\n black3: '#353535',\n alphaBlack: '#000000',\n \n // Amarelos\n yellow400: '#FFD789',\n yellow500: '#F6C76B',\n \n // Cinzas\n gray40: '#F0F0F0',\n gray45: '#767676',\n gray50: '#686A69',\n gray60: '#8F8F8F',\n gray100: '#B6B6B6',\n gray150: '#B9B9B9',\n gray180: '#CECECE',\n gray200: '#D2D2D2',\n gray300: '#EBEBEB',\n gray400: '#ECECEC',\n gray500: '#F4F4F4',\n gray550: '#6F6F6F',\n gray600: '#686868',\n gray700: '#535353',\n gray800: '#9D9D9D',\n \n // Verdes\n green: '#57C06E',\n green2: '#2DCE68',\n \n // Azul\n blue: '#007BFF',\n \n // Transparente\n transparent: 'transparent',\n },\n \n shadows: {\n shadow500: '0px 4px 8px rgba(91, 91, 91, 0.2)',\n },\n \n fonts: {\n primary: '\"Montserrat\", sans-serif',\n },\n} as const;\n\nexport type Theme = typeof theme;\n","import { SelectHTMLAttributes } from \"react\";\nimport styled, { css } from \"styled-components\";\nimport { theme } from \"../styles/theme\";\n\nexport const FormLabel = styled.label<{ $textColor?: string }>`\n font-family: ${theme.fonts.primary};\n font-style: normal;\n font-weight: 500;\n font-size: 1rem;\n color: ${(props) => props.$textColor || theme.colors.black};\n display: block;\n margin-bottom: 0.5rem;\n text-align: left;\n`;\n\nexport const Select = styled.select<\n SelectHTMLAttributes<HTMLSelectElement> & { \n $backgroundColor?: string, \n $borderColor?: string, \n $focusBorderColor?: string, \n $textColor?: string,\n }\n>`\n font-family: ${theme.fonts.primary};\n font-style: normal;\n font-weight: 500;\n font-size: 1rem;\n line-height: 1.5rem;\n background: ${(props) => props.$backgroundColor || theme.colors.white};\n color: ${(props) => props.$textColor || theme.colors.black};\n padding: 0.5rem 3rem 0.5rem 0.5rem; /* Aumentado padding-right para 3rem */\n border-radius: 0.125rem;\n border: 1px solid ${(props) => props.$borderColor || theme.colors.transparent};\n display: block;\n height: 3.125rem;\n width: 100%;\n cursor: pointer;\n \n /* Remover a seta padrão do navegador */\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n \n /* Adicionar seta personalizada maior */\n background-image: url(\"data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e\");\n background-repeat: no-repeat;\n background-position: right 1rem center; /* Posicionado a 1rem da direita */\n background-size: 1.25rem; /* Tamanho da seta aumentado para 1.25rem */\n\n &:focus {\n border-radius: 0.125rem;\n border: 2px solid ${(props) => props.$focusBorderColor || theme.colors.yellow500};\n outline: none;\n }\n\n /* Estilo para option disabled (placeholder) */\n option:disabled {\n color: ${theme.colors.gray100};\n font-weight: 800;\n }\n\n /* Estilo para options normais */\n option:not(:disabled) {\n color: ${(props) => props.$textColor || theme.colors.black};\n font-weight: 500;\n }\n`;\n\nexport const FormErrorMessage = styled.small`\n font-size: 0.75rem;\n line-height: 1.125rem;\n color: ${theme.colors.red};\n margin-top: 0.25rem;\n display: block;\n`;\n\nexport const FormControl = styled.div.withConfig({\n shouldForwardProp: (prop) => ![\"isInvalid\"].includes(prop),\n})<{ isInvalid?: boolean }>`\n ${FormLabel} {\n ${(props) =>\n props.isInvalid &&\n css`\n color: ${theme.colors.red};\n `};\n }\n\n ${Select} {\n ${(props) =>\n props.isInvalid &&\n css`\n border: 1px solid ${theme.colors.red};\n `};\n\n &:focus {\n ${(props) =>\n props.isInvalid &&\n css`\n border: 1px solid ${theme.colors.red};\n `};\n }\n }\n`;\n","import { useEffect } from 'react';\n\n/**\n * Hook para carregar a fonte Montserrat de forma isolada\n * Garante que o componente funcione independentemente do projeto host\n */\nexport const useMontserratFont = () => {\n useEffect(() => {\n // Verificar se já existe um link para a fonte Montserrat adicionado por este componente\n const existingLink = document.querySelector('link[data-mitre-form-font=\"montserrat\"]');\n \n if (!existingLink) {\n // Criar e adicionar o link para a fonte Montserrat\n const link = document.createElement('link');\n link.rel = 'preconnect';\n link.href = 'https://fonts.googleapis.com';\n document.head.appendChild(link);\n\n const link2 = document.createElement('link');\n link2.rel = 'preconnect';\n link2.href = 'https://fonts.gstatic.com';\n link2.crossOrigin = 'anonymous';\n document.head.appendChild(link2);\n\n const link3 = document.createElement('link');\n link3.rel = 'stylesheet';\n link3.href = 'https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap';\n link3.dataset.mitreFormFont = 'montserrat';\n document.head.appendChild(link3);\n }\n\n // Nota: Intencionalmente NÃO removemos a fonte no cleanup\n // Uma vez carregada, ela pode ser usada por múltiplas instâncias do componente\n // e não causa conflitos por estar no head\n }, []);\n};\n","import {\n FormEvent,\n forwardRef,\n ForwardRefRenderFunction,\n InputHTMLAttributes,\n useCallback,\n} from \"react\";\nimport { FieldError } from \"react-hook-form\";\nimport { cep, cpf, currency, date } from \"./masks\";\n\nimport {\n FormControl,\n FormErrorMessage,\n FormLabel,\n Input as FormInput,\n} from \"./styles\";\n\ntype InputType =\n | \"text\"\n | \"email\"\n | \"password\"\n | \"number\"\n | \"tel\"\n | \"url\"\n | \"date\"\n | \"time\"\n | \"datetime-local\";\n\ninterface InputProps extends InputHTMLAttributes<HTMLInputElement> {\n id: string;\n label?: string;\n error?: string | FieldError;\n showErrorMessage?: boolean;\n labelTextColor?: string;\n backgroundColor?: string;\n borderColor?: string;\n focusBorderColor?: string;\n inputTextColor?: string;\n inputPlaceholderColor?: string;\n mask?: \"cep\" | \"currency\" | \"cpf\" | \"phone\" | \"date\";\n type?: InputType;\n}\n\nconst InputBase: ForwardRefRenderFunction<HTMLInputElement, InputProps> = (\n { id,\n label,\n error,\n showErrorMessage = true,\n labelTextColor,\n backgroundColor,\n borderColor,\n focusBorderColor,\n inputPlaceholderColor,\n inputTextColor,\n mask = \"\",\n type = \"text\",\n ...rest\n },\n ref\n) => {\n const handleKeyUp = useCallback(\n (e: FormEvent<HTMLInputElement>) => {\n if (mask === \"cep\") cep(e);\n if (mask === \"currency\") currency(e);\n if (mask === \"cpf\") cpf(e);\n if (mask === \"date\") date(e);\n },\n [mask]\n );\n\n return (\n <FormControl isInvalid={!!error}>\n {!!label && <FormLabel htmlFor={id} $textColor={labelTextColor}>{label}</FormLabel>}\n\n {!mask ? (\n <FormInput\n id={id}\n ref={ref}\n type={type}\n aria-invalid={!!error && showErrorMessage ? \"true\" : \"false\"}\n autoComplete={rest.autoComplete || \"on\"}\n $backgroundColor={backgroundColor}\n $borderColor={borderColor}\n $focusBorderColor={focusBorderColor}\n $placeholderColor={inputPlaceholderColor}\n $textColor={inputTextColor}\n {...rest}\n />\n ) : (\n <FormInput\n id={id}\n ref={ref}\n type={type}\n aria-invalid={!!error && showErrorMessage ? \"true\" : \"false\"}\n autoComplete={rest.autoComplete || \"on\"}\n onKeyUp={handleKeyUp}\n $backgroundColor={backgroundColor}\n $borderColor={borderColor}\n $focusBorderColor={focusBorderColor}\n $placeholderColor={inputPlaceholderColor}\n $textColor={inputTextColor}\n {...rest}\n />\n )}\n\n {!!error && showErrorMessage && (\n <FormErrorMessage data-testid=\"error-message\">\n {typeof error === 'string' ? error : error.message}\n </FormErrorMessage>\n )}\n </FormControl>\n );\n};\n\nexport const Input = forwardRef(InputBase);\n","import { FormEvent } from \"react\";\n\nexport function cep(e: FormEvent<HTMLInputElement>) {\n e.currentTarget.maxLength = 9;\n let value = e.currentTarget.value;\n value = value.replace(/\\D/g, \"\");\n value = value.replace(/^(\\d{5})(\\d)/, \"$1-$2\");\n e.currentTarget.value = value;\n return e;\n}\n\nexport function currency(e: FormEvent<HTMLInputElement>) {\n let value = e.currentTarget.value;\n value = value.replace(/\\D/g, \"\");\n value = value.replace(/(\\d)(\\d{2})$/, \"$1,$2\");\n value = value.replace(/(?=(\\d{3})+(\\D))\\B/g, \".\");\n\n e.currentTarget.value = value;\n return e;\n}\n\nexport function cpf(e: FormEvent<HTMLInputElement>) {\n e.currentTarget.maxLength = 14;\n let value = e.currentTarget.value;\n if (!value.match(/^(\\d{3}).(\\d{3}).(\\d{3})-(\\d{2})$/)) {\n value = value.replace(/\\D/g, \"\");\n value = value.replace(/(\\d{3})(\\d)/, \"$1.$2\");\n value = value.replace(/(\\d{3})(\\d)/, \"$1.$2\");\n value = value.replace(/(\\d{3})(\\d{2})$/, \"$1-$2\");\n\n e.currentTarget.value = value;\n }\n return e;\n}\n\nexport function date(e: FormEvent<HTMLInputElement>) {\n let value = e.currentTarget.value;\n value = value.replace(/\\D/g, \"\");\n value = value.replace(/(\\d{2})(\\d)/, \"$1/$2\");\n value = value.replace(/(\\d{2})(\\d)/, \"$1/$2\");\n e.currentTarget.value = value;\n return e;\n}\n\nexport function phone(e: FormEvent<HTMLInputElement>) {\n let value = e.currentTarget.value;\n value = value.replace(/\\D/g, \"\");\n value = value.replace(/(\\d{2})(\\d)/, \"$1/$2\");\n value = value.replace(/(\\d{2})(\\d)/, \"$1/$2\");\n e.currentTarget.value = value;\n return e;\n}\n","import { InputHTMLAttributes } from \"react\";\nimport styled, { css } from \"styled-components\";\nimport { theme } from \"../styles/theme\";\n\nexport const FormLabel = styled.label<{ $textColor?: string }>`\n font-family: ${theme.fonts.primary};\n font-style: normal;\n font-weight: 500;\n font-size: 1rem;\n color: ${(props) => props.$textColor || theme.colors.black};\n display: block;\n margin-bottom: 0.5rem;\n text-align: left;\n`;\n\nexport const Input = styled.input<\n InputHTMLAttributes<HTMLInputElement> & { \n $backgroundColor?: string, \n $borderColor?: string, \n $focusBorderColor?: string, \n $placeholderColor?: string\n $textColor?: string,\n }\n>`\n font-family: ${theme.fonts.primary};\n font-style: normal;\n font-weight: 500;\n font-size: 1rem;\n line-height: 1.5rem;\n background: ${(props) => props.$backgroundColor || theme.colors.white};\n color: ${(props) => props.$textColor || theme.colors.black};\n padding: 0.5rem;\n border-radius: 0.125rem;\n border: 1px solid ${(props) => props.$borderColor || theme.colors.transparent};\n display: block;\n height: 3.125rem;\n width: 100%;\n\n &:focus {\n border-radius: 0.125rem;\n border: 2px solid ${(props) => props.$focusBorderColor || theme.colors.yellow500};\n outline: none;\n }\n\n &::placeholder {\n font-size: 1rem;\n line-height: 1.5rem;\n color: ${(props) => props.$placeholderColor || theme.colors.gray100};\n font-weight: 700;\n }\n\n /* Autofill styles */\n &:-webkit-autofill {\n background: ${(props) => props.$backgroundColor || theme.colors.white} !important;\n color: ${(props) => props.$textColor || theme.colors.black} !important;\n -webkit-text-fill-color: ${(props) => props.$textColor || theme.colors.black} !important;\n transition: background-color 5000s ease-in-out 0s; /* Prevent flashing */\n }\n\n &:-webkit-autofill::first-line {\n font-family: ${theme.fonts.primary};\n font-size: 1rem;\n font-weight: 500;\n }\n`;\n\nexport const FormErrorMessage = styled.small`\n font-size: 0.75rem;\n line-height: 1.125rem;\n color: ${theme.colors.red};\n margin-top: 0.25rem;\n display: block;\n`;\n\nexport const FormControl = styled.div.withConfig({\n shouldForwardProp: (prop) => ![\"isInvalid\"].includes(prop),\n})<{ isInvalid?: boolean }>`\n ${FormLabel} {\n ${(props) =>\n props.isInvalid &&\n css`\n color: ${theme.colors.red};\n `};\n }\n\n ${Input} {\n ${(props) =>\n props.isInvalid &&\n css`\n border: 1px solid ${theme.colors.red};\n\n &:not(:focus)::placeholder {\n color: ${theme.colors.red};\n font-weight: 600;\n }\n `};\n\n &:focus {\n ${(props) =>\n props.isInvalid &&\n css`\n border: 1px solid ${theme.colors.red};\n `};\n }\n }\n`;\n","import { darken } from \"polished\";\nimport styled, { css } from \"styled-components\";\nimport { theme } from \"../styles/theme\";\n\ntype ButtonProps = {\n hasIcon?: boolean;\n isSubmitting?: boolean;\n hasSubmittingMessage?: boolean;\n bgColor?: string;\n bordercolor?: string;\n color?: string;\n height?: string;\n};\n\nexport const Icon = styled.span`\n font-size: 0;\n line-height: 0;\n transition: all 0.25s ease;\n\n transform: translate3d(-30px, 0px, 0px);\n visibility: hidden;\n opacity: 0;\n margin-right: 0.625rem;\n`;\n\nexport const Text = styled.span`\n font-family: ${theme.fonts.primary};\n font-size: 1rem;\n line-height: 1.5rem;\n margin-bottom: -2px;\n\n transition: all 0.25s ease;\n`;\n\nexport const TextSubmitting = styled.span`\n font-family: ${theme.fonts.primary};\n font-weight: 400;\n font-size: 1rem;\n\n transition: all 0.25s ease;\n`;\n\nexport const LoadingIcon = styled.span.withConfig({\n shouldForwardProp: (prop) => prop !== \"hasText\",\n})<{ hasText?: boolean }>`\n display: block;\n\n width: 1rem;\n height: 1rem;\n border: 0.125rem solid ${theme.colors.white};\n border-radius: 50%;\n animation: loadingAnimation 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: ${theme.colors.white} transparent transparent transparent;\n\n margin-right: ${(props) => (props.hasText ? \"0.625rem\" : \"0\")};\n\n @keyframes loadingAnimation {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n`;\n\nexport const Button = styled.button.withConfig({\n shouldForwardProp: (prop) =>\n ![\n \"hasIcon\",\n \"isSubmitting\",\n \"hasSubmittingMessage\",\n \"bgColor\",\n \"bordercolor\",\n \"color\",\n \"height\",\n ].includes(prop),\n})<ButtonProps>`\n background: ${(props) => darken(0.1, props?.bgColor || \"#F6C76B\")};\n color: ${(props) => props?.color || \"#2F2F2F\"};\n border: 1px solid ${(props) => darken(0.1, props?.bordercolor || \"#F6C76B\")};\n border-radius: 2px;\n\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0 0.75rem;\n height: ${(props) => props?.height || \"3.125rem\"};\n position: relative;\n font-size: 0;\n line-height: 0;\n\n transition: all 0.25s;\n\n ${Icon} {\n display: ${(props) => (props?.hasIcon ? \"block\" : \"\")};\n }\n\n ${Text} {\n transform: ${(props) =>\n props?.hasIcon ? \"translate3d(-4.5px, 0px, 0px)\" : \"unset\"};\n\n @media print, screen and (min-width: 40em) {\n transform: ${(props) =>\n props?.hasIcon ? \"translate3d(-14.5px, 0px, 0px)\" : \"unset\"};\n }\n\n color: ${(props) => props?.color || \"#2F2F2F\"};\n }\n\n &:hover {\n background: ${(props) => darken(0.2, props?.bgColor || \"#F6C76B\")};\n border-color: ${(props) => darken(0.2, props?.bordercolor || \"#F6C76B\")};\n\n ${Icon} {\n opacity: 1;\n visibility: visible;\n transform: translate3d(0px, 0px, 0px);\n }\n\n ${Text} {\n transform: ${(props) =>\n props?.hasIcon ? \"translate3d(-5px, 0px, 0px)\" : \"unset\"};\n }\n }\n\n ${Text} {\n ${(props) =>\n props.isSubmitting &&\n !props.hasSubmittingMessage &&\n css`\n transform: unset;\n opacity: 0;\n `}\n }\n\n ${LoadingIcon} {\n ${(props) =>\n props.isSubmitting &&\n !props.hasSubmittingMessage &&\n css`\n display: flex;\n -webkit-box-align: center;\n align-items: center;\n position: absolute;\n `}\n }\n`;\n","import { ButtonHTMLAttributes, ReactElement, ReactNode } from \"react\";\n\nimport {\n Button as ButtonComponent,\n Icon,\n LoadingIcon,\n Text,\n TextSubmitting,\n} from \"./styles\";\n\ntype ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {\n children: ReactNode;\n icon?: ReactElement;\n isSubmitting?: boolean;\n submittingMessage?: string;\n bgColor?: string;\n bordercolor?: string;\n color?: string;\n height?: string;\n};\n\nexport function Button({\n children,\n icon,\n isSubmitting = false,\n submittingMessage = \"\",\n disabled = false,\n color = \"#2F2F2F\",\n ...rest\n}: ButtonProps) {\n return (\n <ButtonComponent\n isSubmitting={isSubmitting}\n hasSubmittingMessage={submittingMessage.length > 0}\n disabled={isSubmitting || disabled}\n aria-disabled={isSubmitting || disabled}\n hasIcon={!!icon}\n color={color}\n {...rest}\n >\n {icon && !isSubmitting && <Icon data-testid=\"button-icon\">{icon}</Icon>}\n {isSubmitting && <LoadingIcon hasText={submittingMessage.length > 0} />}\n {(!isSubmitting || submittingMessage.length === 0) && (\n <Text className=\"text\">{children}</Text>\n )}\n {isSubmitting && submittingMessage.length > 0 && (\n <TextSubmitting>{submittingMessage}</TextSubmitting>\n )}\n </ButtonComponent>\n );\n}\n","import React, { useEffect, useState, useCallback } from 'react';\nimport { AlertContainer, DismissButton } from './styles';\nimport { AlertType } from './styles';\n\nimport { HiX } from 'react-icons/hi';\n\ninterface AlertProps {\n type?: AlertType;\n children: React.ReactNode;\n className?: string;\n dismissible?: boolean;\n onDismiss?: () => void;\n autoDismiss?: number;\n}\n\nexport const Alert = ({\n type = 'info',\n children,\n className,\n dismissible = false,\n onDismiss,\n autoDismiss\n}: AlertProps) => {\n const [isClosing, setIsClosing] = useState(false);\n\n const handleDismiss = useCallback(() => {\n setIsClosing(true);\n setTimeout(() => onDismiss?.(), 300);\n }, [onDismiss]);\n\n useEffect(() => {\n if (autoDismiss) {\n const timer = setTimeout(handleDismiss, autoDismiss);\n return () => clearTimeout(timer);\n }\n }, [autoDismiss, handleDismiss]);\n\n return (\n <AlertContainer\n $type={type}\n $dismissible={dismissible}\n $isClosing={isClosing}\n className={className}\n role=\"alert\"\n >\n {children}\n {dismissible && (\n <DismissButton \n onClick={handleDismiss} \n aria-label=\"Dismiss alert\"\n >\n <HiX /> \n </DismissButton>\n )}\n </AlertContainer>\n );\n};","import styled, { css, keyframes } from \"styled-components\";\nimport { theme } from \"../styles/theme\";\n\nexport type AlertType = \"error\" | \"warning\" | \"info\" | \"success\";\n\nconst fadeIn = keyframes`\n from { opacity: 0; transform: translateY(-10px); }\n to { opacity: 1; transform: translateY(0); }\n`;\n\nconst fadeOut = keyframes`\n from { opacity: 1; transform: translateY(0); }\n to { opacity: 0; transform: translateY(-10px); }\n`;\n\ninterface AlertContainerProps {\n $type: AlertType;\n $dismissible?: boolean;\n $isClosing: boolean;\n}\n\nconst typeStyles = {\n error: css`\n background-color: ${theme.colors.red};\n border: 1px solid ${theme.colors.red};\n color: ${theme.colors.white};\n svg {\n color: ${theme.colors.white};\n }\n `,\n warning: css`\n background-color: ${theme.colors.yellow500};\n border: 1px solid ${theme.colors.yellow400};\n color: ${theme.colors.black};\n svg {\n color: ${theme.colors.black};\n }\n `,\n info: css`\n background-color: ${theme.colors.blue};\n border: 1px solid ${theme.colors.blue};\n color: ${theme.colors.white};\n svg {\n color: ${theme.colors.white};\n }\n `,\n success: css`\n background-color: ${theme.colors.green};\n border: 1px solid ${theme.colors.green2};\n color: ${theme.colors.white};\n svg {\n color: ${theme.colors.white};\n }\n `,\n};\n\nexport const AlertContainer = styled.div<AlertContainerProps>`\n position: fixed;\n width: 500px;\n top: 15px;\n right: 15px;\n padding: 1rem ${({ $dismissible }) => ($dismissible ? \"2.5rem\" : \"1rem\")} 1rem\n 1rem;\n margin-bottom: 1rem;\n animation: ${({ $isClosing }) => ($isClosing ? fadeOut : fadeIn)} 0.3s\n ease-out;\n animation-fill-mode: forwards;\n align-items: center;\n gap: 0.5rem;\n box-shadow: ${theme.shadows.shadow500};\n border-radius: 0.5rem;\n font-size: 1rem;\n font-weight: 500;\n\n ${({ $type }) => typeStyles[$type]}\n`;\n\nexport const DismissButton = styled.button`\n position: absolute;\n background: transparent;\n right: 10px;\n border: none;\n cursor: pointer;\n color: inherit;\n opacity: 1;\n transition: opacity 0.2s;\n\n &:hover {\n opacity: 0.7;\n }\n\n svg {\n width: 1rem;\n height: 1rem;\n }\n`;\n","import { useEffect, useRef } from \"react\";\nimport { HiX } from \"react-icons/hi\";\n\nimport {\n Container,\n CloseButton,\n Overlay,\n PrimaryButton,\n ModalType,\n} from \"./styles\";\n\ninterface ModalProps {\n type: ModalType;\n title: string;\n message: string;\n primaryButtonText: string;\n onPrimaryAction: () => void;\n onClose: () => void;\n primaryButtonBgColor?: string;\n primaryButtonTextColor?: string;\n}\n\nexport const Modal = ({\n type,\n title,\n message,\n primaryButtonText,\n onPrimaryAction,\n onClose,\n primaryButtonBgColor,\n primaryButtonTextColor,\n}: ModalProps) => {\n const primaryButtonRef = useRef<HTMLButtonElement | null>(null);\n\n useEffect(() => {\n primaryButtonRef.current?.focus();\n }, []);\n\n useEffect(() => {\n const handleKey = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n onClose();\n }\n };\n document.addEventListener(\"keydown\", handleKey);\n return () => document.removeEventListener(\"keydown\", handleKey);\n }, [onClose]);\n\n const handleOverlayClick = (event: React.MouseEvent<HTMLDivElement>) => {\n if (event.target === event.currentTarget) {\n onClose();\n }\n };\n\n return (\n <Overlay onClick={handleOverlayClick} role=\"dialog\" aria-modal=\"true\" aria-label={title}>\n <Container $type={type}>\n <CloseButton onClick={onClose} aria-label=\"Fechar\">\n <HiX />\n </CloseButton>\n <h2>{title}</h2>\n <p>{message}</p>\n <PrimaryButton\n ref={primaryButtonRef}\n onClick={onPrimaryAction}\n $bgColor={primaryButtonBgColor}\n $textColor={primaryButtonTextColor}\n type=\"button\"\n >\n {primaryButtonText}\n </PrimaryButton>\n </Container>\n </Overlay>\n );\n};\n","import styled, { css, keyframes } from \"styled-components\";\nimport { theme } from \"../styles/theme\";\n\nexport type ModalType = \"success\" | \"error\";\n\nconst fadeIn = keyframes`\n from { opacity: 0; }\n to { opacity: 1; }\n`;\n\nconst slideIn = keyframes`\n from { opacity: 0; transform: translateY(-20px) scale(0.96); }\n to { opacity: 1; transform: translateY(0) scale(1); }\n`;\n\nexport const Overlay = styled.div`\n position: fixed;\n inset: 0;\n background: rgba(0, 0, 0, 0.55);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 9999;\n padding: 1rem;\n animation: ${fadeIn} 0.18s ease-out;\n`;\n\nconst accentStyles = {\n success: css`\n color: ${theme.colors.green2};\n `,\n error: css`\n color: ${theme.colors.red};\n `,\n};\n\ninterface ContainerProps {\n $type: ModalType;\n}\n\nexport const Container = styled.div<ContainerProps>`\n position: relative;\n background: ${theme.colors.white};\n border-radius: 0.75rem;\n box-shadow: ${theme.shadows.shadow500};\n max-width: 420px;\n width: 100%;\n padding: 1.75rem 1.5rem 1.25rem;\n font-family: ${theme.fonts.primary};\n animation: ${slideIn} 0.22s ease-out;\n\n &::before {\n content: \"\";\n display: block;\n width: 56px;\n height: 4px;\n border-radius: 999px;\n margin: 0 auto 1rem;\n background: ${({ $type }) =>\n $type === \"success\" ? theme.colors.green2 : theme.colors.red};\n }\n\n h2 {\n margin: 0 0 0.5rem;\n font-size: 1.25rem;\n font-weight: 700;\n text-align: center;\n ${({ $type }) => accentStyles[$type]}\n }\n\n p {\n margin: 0 0 1.5rem;\n font-size: 0.95rem;\n line-height: 1.45;\n text-align: center;\n color: ${theme.colors.black};\n }\n`;\n\nexport const CloseButton = styled.button`\n position: absolute;\n top: 0.5rem;\n right: 0.5rem;\n background: transparent;\n border: none;\n cursor: pointer;\n color: ${theme.colors.gray550};\n padding: 0.25rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: 999px;\n transition: background 0.15s, color 0.15s;\n\n &:hover {\n background: ${theme.colors.gray300};\n color: ${theme.colors.black};\n }\n\n svg {\n width: 1.1rem;\n height: 1.1rem;\n }\n`;\n\ninterface PrimaryButtonProps {\n $bgColor?: string;\n $textColor?: string;\n}\n\nexport const PrimaryButton = styled.button<PrimaryButtonProps>`\n display: block;\n width: 100%;\n padding: 0.75rem 1rem;\n border: none;\n border-radius: 0.5rem;\n background: ${({ $bgColor }) => $bgColor || theme.colors.yellow500};\n color: ${({ $textColor }) => $textColor || theme.colors.black};\n font-family: ${theme.fonts.primary};\n font-size: 1rem;\n font-weight: 700;\n cursor: pointer;\n transition: filter 0.15s;\n\n &:hover {\n filter: brightness(0.95);\n }\n\n &:focus-visible {\n outline: 2px solid ${theme.colors.yellow400};\n outline-offset: 2px;\n }\n`;\n","import {\n forwardRef,\n ForwardRefRenderFunction,\n InputHTMLAttributes,\n} from \"react\";\nimport { FieldError } from \"react-hook-form\";\nimport { StyledPhoneInput, FormControl, FormLabel, FormErrorMessage } from \"./styles\";\nimport { PhoneInputRefType, ParsedCountry } from \"react-international-phone\";\n\ninterface PhoneInputChange {\n phone: string;\n dialCode: string;\n inputValue: string;\n}\n\ninterface PhoneInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value'> {\n id: string;\n label?: string;\n error?: string | FieldError;\n showErrorMessage?: boolean;\n value: string;\n onChange?: (value: PhoneInputChange) => void;\n labelTextColor?: string;\n backgroundColor?: string;\n borderColor?: string;\n focusBorderColor: string;\n inputPlaceholderColor?: string;\n inputTextColor?: string;\n}\n\nconst PhoneInputBase: ForwardRefRenderFunction<PhoneInputRefType, PhoneInputProps> = (\n { id,\n label,\n error,\n showErrorMessage = true,\n labelTextColor,\n backgroundColor,\n borderColor,\n focusBorderColor,\n inputPlaceholderColor,\n inputTextColor,\n value,\n ...rest\n },\n ref\n) => {\n return (\n <FormControl isInvalid={!!error} >\n {!!label && <FormLabel htmlFor={id} $textColor={labelTextColor}>{label}</FormLabel>}\n <StyledPhoneInput\n ref={ref}\n defaultCountry=\"br\"\n disableCountryGuess={true}\n disableDialCodeAndPrefix={true}\n showDisabledDialCodeAndPrefix={false}\n placeholder={rest.placeholder}\n aria-invalid={!!error && showErrorMessage ? \"true\" : \"false\"}\n value={String(value)}\n onChange={(phone: string, meta: { country: ParsedCountry; inputValue: string }) => {\n if (typeof rest.onChange === \"function\") {\n rest.onChange({\n phone,\n dialCode: meta.country.dialCode,\n inputValue: meta.inputValue,\n });\n }\n }}\n inputProps={{\n id,\n name: rest.name || 'phone',\n required: rest.required,\n autoFocus: rest.autoFocus,\n autoComplete: rest.autoComplete || \"tel\",\n }}\n $backgroundColor={backgroundColor}\n $borderColor={borderColor}\n $focusBorderColor={focusBorderColor}\n $placeholderColor={inputPlaceholderColor}\n $textColor={inputTextColor}\n />\n {!!error && showErrorMessage && (\n <FormErrorMessage data-testid=\"error-message\">\n {typeof error === 'string' ? error : error?.message}\n </FormErrorMessage>\n )}\n </FormControl>\n );\n};\n\nexport const PhoneInput = forwardRef(PhoneInputBase);\n","import styled, { css } from \"styled-components\";\nimport { PhoneInput } from \"react-international-phone\";\nimport \"react-international-phone/style.css\";\nimport { theme } from \"../styles/theme\";\n\nexport const FormLabel = styled.label<{ $textColor?: string }>`\n font-family: ${theme.fonts.primary};\n font-style: normal;\n font-weight: 500;\n font-size: 1rem;\n color: ${(props) => props.$textColor || theme.colors.black};\n display: block;\n margin-bottom: 0.5rem;\n text-align: left;\n`;\n\nexport const StyledPhoneInput = styled(PhoneInput)<{ \n $backgroundColor?: string, \n $borderColor?: string, \n $focusBorderColor?: string, \n $placeholderColor?: string\n $textColor?: string,\n}>`\n width: 100%;\n height: 3.125rem;\n background: ${(props) => props.$backgroundColor || theme.colors.white};\n font-family: ${theme.fonts.primary};\n border: 1px solid ${(props) => props.$borderColor || theme.colors.transparent};\n border-radius: 0.125rem;\n\n &:focus-within {\n border-radius: 0.125rem;\n border: 2px solid ${(props) => props.$focusBorderColor || theme.colors.yellow500};\n outline: none;\n\n .react-international-phone-country-selector-button {\n border-right: 1px solid ${(props) => props.$focusBorderColor || theme.colors.yellow500};\n }\n }\n\n /* Style for the inner phone input container */\n .react-international-phone-input-container {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n overflow: hidden;\n font-family: ${theme.fonts.primary};\n font-size: 1rem;\n font-weight: 500;\n color: ${(props) => props.$textColor || theme.colors.black};\n background: ${(props) => props.$backgroundColor || theme.colors.white};\n }\n\n /* Style for the country selector button */\n .react-international-phone-country-selector-button {\n height: 100%;\n background: ${(props) => props.$backgroundColor || theme.colors.white};\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: ${theme.fonts.primary};\n font-size: 1rem;\n font-weight: 500;\n cursor: pointer;\n outline: none;\n border: none;\n border-right: 1px solid ${(props) => props.$borderColor || theme.colors.transparent};\n padding-left: 10px;\n }\n\n .react-international-phone-input:focus,\n .react-international-phone-input:focus-visible {\n outline: none !important; /* Removes the default blue/browser outline */\n border-color: initial; /* Or set to your desired default border color */\n box-shadow: none !important; /* Remove any default box shadow on focus */\n }\n\n /* Remove apenas o outline azul do botão e dropdown sem alterar outros estilos */\n .react-international-phone-country-selector-button:focus,\n .react-international-phone-country-selector-button:focus-visible {\n outline: none !important;\n }\n\n .react-international-phone-country-selector-dropdown {\n outline: none !important;\n padding: 10px !important;\n }\n\n .react-international-phone-country-selector-dropdown__list-item {\n padding-top: 5px !important;\n padding-bottom: 5px !important;\n }\n\n .react-international-phone-country-selector-dropdown__list-item:focus,\n .react-international-phone-country-selector-dropdown__list-item:focus-visible {\n outline: none !important;\n }\n\n /* Style for the input itself */\n input.react-international-phone-input {\n flex: 1;\n height: 100%;\n padding: 0 0.5rem;\n margin: 0;\n background: ${(props) => props.$backgroundColor || theme.colors.white};\n font-family: ${theme.fonts.primary};\n font-style: normal;\n font-weight: 500;\n font-size: 1rem;\n line-height: 1.5rem;\n color: ${(props) => props.$textColor || theme.colors.black};\n outline: none;\n border: none;\n border-radius: 0.125rem;\n\n &::placeholder {\n font-size: 1rem;\n line-height: 1.5rem;\n color: ${(props) => props.$placeholderColor || theme.colors.gray100};\n font-weight: 700;\n }\n\n &:-webkit-autofill {\n background: ${(props) => props.$backgroundColor || theme.colors.white} !important;\n -webkit-text-fill-color: ${(props) => props.$textColor || theme.colors.black} !important;\n transition: background-color 5000s ease-in-out 0s;\n }\n\n &:-webkit-autofill::first-line {\n font-family: ${theme.fonts.primary};\n font-size: 1rem;\n font-weight: 500;\n }\n }\n`;\n\nexport const FormErrorMessage = styled.small`\n font-size: 0.75rem;\n line-height: 1.125rem;\n color: ${theme.colors.red};\n margin-top: 0.25rem;\n display: block;\n`;\n\nexport const FormControl = styled.div.withConfig({\n shouldForwardProp: (prop) => ![\"isInvalid\"].includes(prop),\n})<{ isInvalid?: boolean }>`\n ${FormLabel} {\n ${(props) =>\n props.isInvalid &&\n css`\n color: ${theme.colors.red};\n `};\n }\n\n ${StyledPhoneInput} {\n ${(props) =>\n props.isInvalid &&\n css`\n border: 1px solid ${theme.colors.red};\n\n &:not(:focus)::placeholder {\n color: ${theme.colors.red};\n font-weight: 600;\n }\n `};\n\n .react-international-phone-input-container {\n ${(props) =>\n props.isInvalid &&\n css`\n border: 1px solid ${theme.colors.red};\n\n &:not(:focus)::placeholder {\n color: ${theme.colors.red};\n font-weight: 600;\n }\n `};\n }\n\n .react-international-phone-country-selector-button {\n ${(props) =>\n props.isInvalid &&\n css`\n border-right: 1px solid ${theme.colors.red};\n `};\n }\n }\n`;\n","import {\n forwardRef,\n ForwardRefRenderFunction,\n SelectHTMLAttributes,\n} from \"react\";\nimport { FieldError } from \"react-hook-form\";\nimport { Product } from \"../../domain/Product\";\n\nimport {\n FormControl,\n FormErrorMessage,\n FormLabel,\n Select as FormSelect,\n} from \"./styles\";\n\ninterface ProductSelectProps extends SelectHTMLAttributes<HTMLSelectElement> {\n id: string;\n label?: string;\n error?: string | FieldError;\n showErrorMessage?: boolean;\n labelTextColor?: string;\n backgroundColor?: string;\n borderColor?: string;\n focusBorderColor?: string;\n textColor?: string;\n products: Product[];\n placeholder?: string;\n}\n\nconst ProductSelectBase: ForwardRefRenderFunction<HTMLSelectElement, ProductSelectProps> = (\n {\n id,\n label,\n error,\n showErrorMessage = true,\n labelTextColor,\n backgroundColor,\n borderColor,\n focusBorderColor,\n textColor,\n products,\n placeholder = \"Selecione um produto\",\n ...rest\n },\n ref\n) => {\n return (\n <FormControl isInvalid={!!error}>\n {!!label && <FormLabel htmlFor={id} $textColor={labelTextColor}>{label}</FormLabel>}\n\n <FormSelect\n id={id}\n ref={ref}\n aria-invalid={!!error && showErrorMessage ? \"true\" : \"false\"}\n $backgroundColor={backgroundColor}\n $borderColor={borderColor}\n $focusBorderColor={focusBorderColor}\n $textColor={textColor}\n {...rest}\n >\n <option value=\"\" disabled>\n {placeholder}\n </option>\n {products.map((product) => (\n <option key={product.id} value={product.id}>\n {product.name}\n </option>\n ))}\n </FormSelect>\n\n {!!error && showErrorMessage && (\n <FormErrorMessage data-testid=\"error-message\">\n {typeof error === 'string' ? error : error.message}\n </FormErrorMessage>\n )}\n </FormControl>\n );\n};\n\nexport const ProductSelect = forwardRef(ProductSelectBase);\n","export type Ambiente = \"homol\" | \"prod\";\n\ninterface EnvironmentConfig {\n apiUrl: string;\n apiToken: string;\n whatsappPhone: string;\n chatUrl: string;\n}\n\nconst ENVIRONMENTS: Record<Ambiente, EnvironmentConfig> = {\n homol: {\n apiUrl: \"https://leads-hml.mitrerealty.com.br/api-leads\",\n apiToken:\n \"TEFORElOR19NSVRSRTptZlFXZnhvUHdNbWVZY0FidkF0QWJ3Q2RFYWtKckJBOXg5cGNsOTBvS1V0N2ZsU0d4TEtNdEZZd3k0NFlEc0c3\",\n whatsappPhone: \"551148100601\",\n chatUrl: \"https://crm-hml.mitrerealty.com.br/wcc/UserLoginSubmit.do\",\n },\n prod: {\n apiUrl: \"https://leads.mitrerealty.com.br/api-leads\",\n apiToken:\n \"TEFORElOR19NSVRSRTptZlFXZnhvUHdNbWVZY0FidkF0QWJ3Q2RFYWtKckJBOXg5cGNsOTBvS1V0N2ZsU0d4TEtNdEZZd3k0NFlEc0c3\",\n whatsappPhone: \"551148100601\",\n chatUrl: \"https://crm.mitrerealty.com.br/wcc/UserLoginSubmit.do\",\n },\n};\n\nexport const resolveEnvironment = (\n ambiente: Ambiente = \"homol\"\n): EnvironmentConfig | null => {\n return ENVIRONMENTS[ambiente] ?? null;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAAgC;;;ACAhC,mBAAyB;AAElB,SAAS,WAAW;AACzB,QAAM,CAAC,OAAO,QAAQ,QAAI,uBAAuB,IAAI;AAErD,QAAM,cAAc,CAAC,QAAiB;AACpC,UAAM,WAAW,e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gB,OAAO,IAAK,gBAAhB,EAAmB,CACjC;AAAA;AAAA;AAAA,UACH;AAAA,UACC,OAAO,uBACN,6CAAC,oBAAkB,iBAAO,oBAAoB,SAAQ;AAAA,WAE1D;AAAA,QAGF,6CAAC,QAAG,uDAAsC;AAAA,QAE1C,6CAAC,mBACC,uDAACC,SAAA,EAAO,SAAS,uBAAuB,OAAO,iBAAiB,MAAK,UAAS,cAAc,SACzF,oBAAU,aACP,uBACA,UAAU,SACR,mBACA,mBACR,GACF;AAAA,QAEA,8CAAC,OAAE;AAAA;AAAA,UAAoK;AAAA,UACrK;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,QAAO;AAAA,cACP,KAAI;AAAA,cACL;AAAA;AAAA,UAED;AAAA,UAAI;AAAA,UAAgB;AAAA,UAAI;AAAA,UAAO;AAAA,UAAI;AAAA,WAAmI;AAAA,SAE1K;AAAA,OACF;AAAA,KACF;AAEJ,CAAC;AAED,mBAAmB,cAAc;AAEjC,IAAO,eAAQ;","names":["import_react","styled","import_styled_components","styled","import_react","import_react","import_styled_components","FormLabel","styled","FormErrorMessage","FormControl","FormControl","FormLabel","FormErrorMessage","Input","import_styled_components","styled","import_jsx_runtime","Button","import_react","import_styled_components","styled","import_jsx_runtime","import_react","import_hi","import_styled_components","fadeIn","styled","import_jsx_runtime","import_react","import_styled_components","FormLabel","styled","FormErrorMessage","FormControl","import_jsx_runtime","FormControl","FormLabel","FormErrorMessage","PhoneInput","import_react","import_jsx_runtime","import_jsx_runtime","PreferenciaContato","React","Input","PhoneInput","Button"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -5,10 +5,24 @@ interface Product {
|
|
|
5
5
|
name: string;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
type Ambiente = "homol" | "prod";
|
|
9
|
+
|
|
10
|
+
declare enum PreferenciaContato {
|
|
11
|
+
Whatsapp = "Whatsapp",
|
|
12
|
+
Email = "Email",
|
|
13
|
+
Ligacao = "Liga\u00E7\u00E3o"
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type Canal = "form" | "chat" | "whatsapp";
|
|
8
17
|
interface MitreFormComponentProps {
|
|
9
18
|
products: Product[];
|
|
10
|
-
|
|
11
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Define de qual config interno o componente lê `apiUrl`, `apiToken`,
|
|
21
|
+
* `whatsappPhone` e `chatUrl`. Default `"homol"`.
|
|
22
|
+
*/
|
|
23
|
+
ambiente?: Ambiente;
|
|
24
|
+
/** Default `"form"`. Ver doc/canal-feature.md. */
|
|
25
|
+
canal?: Canal;
|
|
12
26
|
showHeader?: boolean;
|
|
13
27
|
title?: string;
|
|
14
28
|
subtitle?: string;
|
|
@@ -22,8 +36,16 @@ interface MitreFormComponentProps {
|
|
|
22
36
|
inputBorderColor?: string;
|
|
23
37
|
inputTextColor?: string;
|
|
24
38
|
inputPlaceholderColor?: string;
|
|
25
|
-
|
|
26
|
-
|
|
39
|
+
showPreferenciaContato?: boolean;
|
|
40
|
+
/** Opcional. Repassado no body do POST /leads e no `virtual_obj` (modo chat). */
|
|
41
|
+
idProdutoTerceiro?: string | number;
|
|
42
|
+
/** Opcional. Repassado no body do POST /leads e no `virtual_obj` (modo chat). */
|
|
43
|
+
idEmpreendimento?: string | number;
|
|
44
|
+
/**
|
|
45
|
+
* Default: `true` em `canal === "chat"` / `"whatsapp"` (paridade com `atendimento.html`),
|
|
46
|
+
* `false` em `canal === "form"`. Passe `false` para forçar criação do evento.
|
|
47
|
+
*/
|
|
48
|
+
naoCriarEvento?: boolean;
|
|
27
49
|
}
|
|
28
50
|
interface RequestBody {
|
|
29
51
|
name: string;
|
|
@@ -35,7 +57,28 @@ interface RequestBody {
|
|
|
35
57
|
utm_medium?: string;
|
|
36
58
|
utm_campaign?: string;
|
|
37
59
|
utm_term?: string;
|
|
60
|
+
preferencia_contato?: string;
|
|
61
|
+
/** Presente quando `canal !== "form"`. */
|
|
62
|
+
canal?: Canal;
|
|
63
|
+
/**
|
|
64
|
+
* Presente (e sempre `true`) quando `canal !== "form"`. Paridade com o fluxo legado
|
|
65
|
+
* `atendimento.html`, cujo `<form id="chat-form">` enviava o hidden `is_chat=true`
|
|
66
|
+
* em ambos os canais (chat e whatsapp).
|
|
67
|
+
*/
|
|
68
|
+
is_chat?: boolean;
|
|
69
|
+
/** Presente quando `canal !== "form"`. `window.location.href` no momento do submit. */
|
|
70
|
+
pagina?: string;
|
|
71
|
+
/** Presente quando a prop homônima for informada e `canal !== "form"`. */
|
|
72
|
+
idProdutoTerceiro?: string | number;
|
|
73
|
+
/** Presente quando a prop homônima for informada e `canal !== "form"`. */
|
|
74
|
+
idEmpreendimento?: string | number;
|
|
75
|
+
/**
|
|
76
|
+
* Presente quando o flag efetivo é `true`. Por default vai `true` em
|
|
77
|
+
* `canal === "chat"` / `canal === "whatsapp"`; pode ser desligado com
|
|
78
|
+
* `naoCriarEvento={false}`.
|
|
79
|
+
*/
|
|
80
|
+
naoCriarEvento?: boolean;
|
|
38
81
|
}
|
|
39
82
|
declare const MitreFormComponent: React.ForwardRefExoticComponent<MitreFormComponentProps & React.RefAttributes<HTMLDivElement>>;
|
|
40
83
|
|
|
41
|
-
export { MitreFormComponent, type MitreFormComponentProps, type RequestBody };
|
|
84
|
+
export { type Ambiente, type Canal, MitreFormComponent, type MitreFormComponentProps, PreferenciaContato, type RequestBody };
|