@credithub/harlan-components 1.64.4 → 1.65.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.
@@ -1,6 +1,6 @@
1
1
  import { IconProps } from '@/@types/icon';
2
2
  import React, { ComponentType, DetailedHTMLProps, HTMLAttributes, ReactNode } from 'react';
3
- export type HeaderProps = DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLElement> & {
3
+ export type HeaderProps = Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'title' | 'icon'> & {
4
4
  title?: ReactNode;
5
5
  subtitle?: ReactNode;
6
6
  description?: ReactNode;
@@ -13,16 +13,19 @@ export type HeaderProps = DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTML
13
13
  showLoadingBar?: boolean;
14
14
  };
15
15
  icon?: ComponentType<IconProps>;
16
- iconProps?: IconProps;
16
+ iconProps?: Record<string, unknown>;
17
17
  titleClassName?: string;
18
18
  subtitleClassName?: string;
19
19
  descriptionClassName?: string;
20
20
  containerClassName?: string;
21
21
  contentClassName?: string;
22
22
  actionsClassName?: string;
23
- innerRef?: React.LegacyRef<HTMLDivElement>;
23
+ innerRef?: React.Ref<HTMLDivElement>;
24
24
  variant?: 'default' | 'error' | 'loading';
25
25
  printBar?: boolean;
26
26
  };
27
+ /** -----------------------------
28
+ * Component
29
+ * ----------------------------- */
27
30
  declare const Header: React.FC<HeaderProps>;
28
31
  export default Header;
@@ -28,6 +28,9 @@ import classNames from 'classnames';
28
28
  import React, { useMemo } from 'react';
29
29
  import styled, { useTheme } from 'styled-components';
30
30
  import LoadingBar from './loadingBar';
31
+ /** -----------------------------
32
+ * Styled helpers
33
+ * ----------------------------- */
31
34
  var Title = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n color: ", ";\n"], ["\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n color: ", ";\n"])), function (_a) {
32
35
  var theme = _a.theme;
33
36
  return theme.typography.headline24.fontSize;
@@ -72,7 +75,7 @@ var Description = styled.div(templateObject_3 || (templateObject_3 = __makeTempl
72
75
  });
73
76
  var HeaderUI = styled(function (_a) {
74
77
  var children = _a.children, props = __rest(_a, ["children"]);
75
- return React.createElement("header", __assign({}, props), children);
78
+ return (React.createElement("header", __assign({}, props), children));
76
79
  })(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n @media screen {\n background: #ffffff !important;\n box-shadow: 0px 4px 5px rgba(0, 0, 0, 0.15);\n border-radius: 30px;\n }\n\n @media print {\n page-break-before: avoid;\n page-break-after: avoid;\n page-break-inside: avoid;\n padding: 18px;\n print-color-adjust: exact;\n background: #eae9e9;\n border-radius: 18px;\n }\n\n padding: 30px 20px;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n\n ", " {\n color: ", ";\n }\n"], ["\n @media screen {\n background: #ffffff !important;\n box-shadow: 0px 4px 5px rgba(0, 0, 0, 0.15);\n border-radius: 30px;\n }\n\n @media print {\n page-break-before: avoid;\n page-break-after: avoid;\n page-break-inside: avoid;\n padding: 18px;\n print-color-adjust: exact;\n background: #eae9e9;\n border-radius: 18px;\n }\n\n padding: 30px 20px;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n\n ", " {\n color: ", ";\n }\n"])), Title, function (props) { return props.color; });
77
80
  var HeaderContainer = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n gap: 20px;\n\n @media print {\n width: 100%;\n }\n"], ["\n display: flex;\n gap: 20px;\n\n @media print {\n width: 100%;\n }\n"])));
78
81
  var ActionsList = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n gap: 10px;\n"], ["\n display: flex;\n flex-direction: row;\n gap: 10px;\n"])));
@@ -82,8 +85,11 @@ var LoadingBarWrapper = styled.div(templateObject_9 || (templateObject_9 = __mak
82
85
  var hidden = _a.hidden;
83
86
  return (hidden ? 0 : 1);
84
87
  });
88
+ /** -----------------------------
89
+ * Component
90
+ * ----------------------------- */
85
91
  var Header = function (_a) {
86
- var title = _a.title, subtitle = _a.subtitle, description = _a.description, actions = _a.actions, Icon = _a.icon, _b = _a.variant, variant = _b === void 0 ? 'default' : _b, iconProps = _a.iconProps, _c = _a.loadingProps, loadingProps = _c === void 0 ? {} : _c, className = _a.className, titleClassName = _a.titleClassName, subtitleClassName = _a.subtitleClassName, descriptionClassName = _a.descriptionClassName, containerClassName = _a.containerClassName, actionsClassName = _a.actionsClassName, innerRef = _a.innerRef, _d = _a.printBar, printBar = _d === void 0 ? true : _d, props = __rest(_a, ["title", "subtitle", "description", "actions", "icon", "variant", "iconProps", "loadingProps", "className", "titleClassName", "subtitleClassName", "descriptionClassName", "containerClassName", "actionsClassName", "innerRef", "printBar"]);
92
+ var title = _a.title, subtitle = _a.subtitle, description = _a.description, actions = _a.actions, Icon = _a.icon, iconProps = _a.iconProps, _b = _a.variant, variant = _b === void 0 ? 'default' : _b, _c = _a.loadingProps, loadingProps = _c === void 0 ? {} : _c, className = _a.className, titleClassName = _a.titleClassName, subtitleClassName = _a.subtitleClassName, descriptionClassName = _a.descriptionClassName, containerClassName = _a.containerClassName, actionsClassName = _a.actionsClassName, innerRef = _a.innerRef, _d = _a.printBar, printBar = _d === void 0 ? true : _d, rest = __rest(_a, ["title", "subtitle", "description", "actions", "icon", "iconProps", "variant", "loadingProps", "className", "titleClassName", "subtitleClassName", "descriptionClassName", "containerClassName", "actionsClassName", "innerRef", "printBar"]);
87
93
  var theme = useTheme();
88
94
  var headerClass = classNames(className);
89
95
  var actionsClass = classNames(actionsClassName);
@@ -91,18 +97,21 @@ var Header = function (_a) {
91
97
  var isLoading = variant === 'loading';
92
98
  var variantColor = useMemo(function () { return getVariantColor(variant, theme); }, [variant, theme]);
93
99
  return (React.createElement("div", { ref: innerRef },
94
- React.createElement(HeaderUI, __assign({ className: headerClass, color: variantColor }, props),
100
+ React.createElement(HeaderUI, __assign({ className: headerClass, color: variantColor }, rest),
95
101
  React.createElement(HeaderContainer, { className: containerClass },
96
102
  React.createElement(IconWrapper, null, Icon && React.createElement(Icon, __assign({}, iconProps, { circleFill: variantColor }))),
97
103
  React.createElement(TextWrapper, { printBar: printBar },
98
- React.createElement(Title, { hidden: !title, className: classNames(titleClassName) }, title),
104
+ title && (React.createElement(Title, { className: classNames(titleClassName) }, title)),
99
105
  React.createElement("div", { className: "text-wrapper-subtitle-description" },
100
106
  React.createElement(Subtitle, { hidden: isLoading || !subtitle, className: subtitleClassName }, subtitle),
101
107
  React.createElement(Description, { hidden: isLoading || !description, className: descriptionClassName }, description)),
102
108
  React.createElement(LoadingBarWrapper, { hidden: !isLoading },
103
109
  React.createElement(LoadingBar, { percentage: (loadingProps === null || loadingProps === void 0 ? void 0 : loadingProps.percentage) || 0 })))),
104
- React.createElement(ActionsList, { className: actionsClass }, actions && actions))));
110
+ actions && (React.createElement(ActionsList, { className: actionsClass }, actions)))));
105
111
  };
112
+ /** -----------------------------
113
+ * Helpers
114
+ * ----------------------------- */
106
115
  var getVariantColor = function (type, theme) {
107
116
  if (type === void 0) { type = 'default'; }
108
117
  var options = {
@@ -12,167 +12,185 @@ var __assign = (this && this.__assign) || function () {
12
12
  import ProtestosIcon from '../../assets/icones/protestos';
13
13
  import { useGlobalData } from '../../contexts/globalDataContext';
14
14
  import { normalizeName, similarNames } from '../../utils/similarNames';
15
- import React, { useContext, useEffect, useMemo, useRef } from 'react';
15
+ import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
16
16
  import StatusMessage from '../interface/statusMessage';
17
17
  import Section from '../section';
18
18
  import { Queries, RequestStatus } from '../webservice';
19
+ import { TitleWithTooltip, TooltipContainer, TooltipIcon, TooltipText } from './liminarStyles';
19
20
  var validAssuntos = [
20
21
  'protesto indevido de título',
21
22
  'protesto indevido de títulos',
22
23
  'inclusão indevida em cadastro de inadimplentes',
23
24
  'liminar',
24
- 'sustação de Protesto',
25
+ 'sustação de protesto',
25
26
  'inexequibilidade do titulo / inexequibilidade da obrigação',
26
- 'Adimplemento e Extinção',
27
- 'Inexequibilidade do Título / Inexequibilidade da Obrigação | Tutela de Urgência | Protesto Indevido de Título'
27
+ 'inexequibilidade do titulo / inexequibilidade da obrigação | tutela de urgência | protesto indevido de título'
28
28
  ].map(normalizeName);
29
+ var businessTypes = [
30
+ 'factoring',
31
+ 'fidc',
32
+ 'securitizadora',
33
+ 'fintech',
34
+ 'banco',
35
+ 'cooperativa'
36
+ ];
29
37
  var Liminar = function () {
30
- var _a, _b, _c, _d, _e;
38
+ var _a, _b;
31
39
  var ctx = useContext(Queries.LiminarCenprot);
32
- var _f = useGlobalData(), globalData = _f.data, setData = _f.setData;
33
- // Detecta múltiplas origens de liminar
34
- var origensDetectadas = useMemo(function () {
35
- var _a, _b, _c, _d;
36
- var sources = [];
37
- // Trata tipo vindo como string ou array
40
+ var _c = useGlobalData(), globalData = _c.data, setData = _c.setData;
41
+ var processedRef = useRef(false);
42
+ var processingRef = useRef(true);
43
+ var resultRef = useRef('Não encontrado');
44
+ var dataHashRef = useRef('');
45
+ var _d = useState(false), showInversionInfo = _d[0], setShowInversionInfo = _d[1];
46
+ var tiposDocumento = useMemo(function () {
47
+ var _a;
38
48
  var tipoRaw = (_a = ctx.document) === null || _a === void 0 ? void 0 : _a.type;
39
- var tipos = [];
40
49
  if (Array.isArray(tipoRaw)) {
41
- tipos.push.apply(tipos, tipoRaw.map(function (t) { return t.toLowerCase(); }));
50
+ return tipoRaw.map(function (t) { return t.toLowerCase(); });
42
51
  }
43
- else if (typeof tipoRaw === 'string') {
44
- tipos.push(tipoRaw.toLowerCase());
52
+ if (typeof tipoRaw === 'string') {
53
+ return [tipoRaw.toLowerCase()];
45
54
  }
46
- tipos.forEach(function (tipo) {
47
- if (tipo === 'cenprot')
48
- sources.push('Liminar no Cenprot');
49
- else if (tipo === 'serasa')
50
- sources.push('Liminar na Serasa');
51
- else if (tipo === 'judicial')
52
- sources.push('Liminar no Judiciário');
53
- });
54
- // Detecção via processos jurídicos
55
+ return [];
56
+ }, [ctx.document]);
57
+ var mapTipoToLabel = function (tipo) {
58
+ switch (tipo) {
59
+ case 'cenprot':
60
+ return 'Liminar no Cenprot';
61
+ case 'serasa':
62
+ return 'Liminar na Serasa';
63
+ case 'judicial':
64
+ return 'Liminar no Judiciário';
65
+ default:
66
+ return null;
67
+ }
68
+ };
69
+ // Detecta origens de liminar: tipos + processos
70
+ var origensDetectadas = useMemo(function () {
71
+ var _a, _b, _c, _d;
72
+ var labels = new Set();
73
+ var indiciosApi = ((_a = ctx.document) === null || _a === void 0 ? void 0 : _a.indiciosDeLiminar) === true;
74
+ if (indiciosApi) {
75
+ tiposDocumento.forEach(function (tipo) {
76
+ var label = mapTipoToLabel(tipo);
77
+ if (label)
78
+ labels.add(label);
79
+ });
80
+ }
81
+ // Processos Judiciais sempre checados
55
82
  var carouselName = ((_c = (_b = globalData === null || globalData === void 0 ? void 0 : globalData.dossie) === null || _b === void 0 ? void 0 : _b.carousel) === null || _c === void 0 ? void 0 : _c.name) || '';
56
83
  var empresas = (_d = globalData === null || globalData === void 0 ? void 0 : globalData.processosJuridicosData) === null || _d === void 0 ? void 0 : _d.empresa;
57
- if (Array.isArray(empresas)) {
58
- var empresaNomeNormalizado_1 = normalizeName(carouselName);
59
- var processosComLiminar = empresas.filter(function (processo) {
84
+ if (carouselName && Array.isArray(empresas)) {
85
+ var nomeEmpresaNorm_1 = normalizeName(carouselName);
86
+ var hasJudicial = empresas.some(function (processo) {
60
87
  var _a;
61
- var hasAtivoEnvolvido = (_a = processo.envolvidos_ultima_movimentacao) === null || _a === void 0 ? void 0 : _a.some(function (envolvido) {
62
- return (envolvido.envolvido_tipo === 'Ativo' &&
63
- similarNames(normalizeName(envolvido.nome_sem_filtro), empresaNomeNormalizado_1, 0.9));
88
+ var ativoMatch = (_a = processo.envolvidos_ultima_movimentacao) === null || _a === void 0 ? void 0 : _a.some(function (e) {
89
+ return e.envolvido_tipo === 'Ativo' &&
90
+ similarNames(normalizeName(e.nome_sem_filtro), nomeEmpresaNorm_1, 0.9);
64
91
  });
92
+ if (!ativoMatch)
93
+ return false;
65
94
  var assuntos = Array.isArray(processo.assuntos)
66
95
  ? processo.assuntos
67
96
  : [processo.assuntos];
68
- var hasValidAssunto = assuntos.some(function (assunto) {
69
- return validAssuntos.some(function (valid) {
70
- return similarNames(normalizeName(assunto), valid, 0.9);
71
- });
97
+ return assuntos.some(function (a) {
98
+ return validAssuntos.includes(normalizeName(a));
72
99
  });
73
- return hasAtivoEnvolvido && hasValidAssunto;
74
100
  });
75
- if (processosComLiminar.length > 0) {
76
- sources.push('Liminar no Judiciário');
101
+ if (hasJudicial) {
102
+ labels.add('Liminar no Judiciário');
103
+ var foundBusinessEntity = empresas.some(function (processo) {
104
+ var _a;
105
+ return (_a = processo.envolvidos_ultima_movimentacao) === null || _a === void 0 ? void 0 : _a.some(function (e) {
106
+ if (e.envolvido_tipo !== 'Ativo')
107
+ return false;
108
+ var nomeNorm = normalizeName(e.nome_sem_filtro);
109
+ return businessTypes.some(function (type) { return nomeNorm.includes(type); });
110
+ });
111
+ });
112
+ if (foundBusinessEntity) {
113
+ setShowInversionInfo(true);
114
+ }
77
115
  }
78
116
  }
79
- return sources;
117
+ return Array.from(labels);
80
118
  }, [
81
119
  ctx.document,
120
+ tiposDocumento,
82
121
  (_a = globalData === null || globalData === void 0 ? void 0 : globalData.dossie) === null || _a === void 0 ? void 0 : _a.carousel,
83
122
  (_b = globalData === null || globalData === void 0 ? void 0 : globalData.processosJuridicosData) === null || _b === void 0 ? void 0 : _b.empresa
84
123
  ]);
85
- // refs para controle de processamento
86
- var processedRef = useRef(false);
87
- var processingRef = useRef(true);
88
- var resultRef = useRef(undefined);
89
- var dataHashRef = useRef('');
90
- var isProcessoNaoEncontrado = useMemo(function () {
91
- return ctx.type === RequestStatus.Error && ctx.error;
92
- }, [ctx.type, ctx.error]);
93
- var derivedCtx = useMemo(function () {
94
- return __assign(__assign({}, ctx), { type: isProcessoNaoEncontrado ? RequestStatus.Success : ctx.type, document: isProcessoNaoEncontrado
95
- ? { indiciosDeLiminar: false }
96
- : ctx.document });
97
- }, [ctx, isProcessoNaoEncontrado]);
124
+ // Indica se houve erro 404 (processo não encontrado)
125
+ var isErro404 = useMemo(function () { return ctx.type === RequestStatus.Error && !!ctx.error; }, [ctx.type, ctx.error]);
126
+ var derivedCtx = useMemo(function () { return (__assign(__assign({}, ctx), { type: isErro404 ? RequestStatus.Success : ctx.type, document: isErro404 ? { indiciosDeLiminar: false } : ctx.document })); }, [ctx, isErro404]);
127
+ // Efeito principal: atualiza estado global e resultados
98
128
  useEffect(function () {
129
+ var _a, _b, _c, _d;
130
+ if (!((_a = globalData === null || globalData === void 0 ? void 0 : globalData.dossie) === null || _a === void 0 ? void 0 : _a.carousel) ||
131
+ !((_b = globalData === null || globalData === void 0 ? void 0 : globalData.processosJuridicosData) === null || _b === void 0 ? void 0 : _b.isLoaded))
132
+ return;
99
133
  if (ctx.type === RequestStatus.Loading) {
100
134
  processingRef.current = true;
101
- processedRef.current = false;
102
- }
103
- }, [ctx.type]);
104
- useEffect(function () {
105
- var _a, _b, _c;
106
- if (!((_a = globalData === null || globalData === void 0 ? void 0 : globalData.dossie) === null || _a === void 0 ? void 0 : _a.carousel) ||
107
- !((_b = globalData === null || globalData === void 0 ? void 0 : globalData.processosJuridicosData) === null || _b === void 0 ? void 0 : _b.isLoaded)) {
108
135
  return;
109
136
  }
110
- if (ctx.type === RequestStatus.Loading)
111
- return;
112
- var currentDataHash = JSON.stringify({
137
+ var hash = JSON.stringify({
138
+ tipo: ctx.type,
139
+ indicios: (_c = ctx.document) === null || _c === void 0 ? void 0 : _c.indiciosDeLiminar,
113
140
  carousel: globalData.dossie.carousel,
114
- empresa: globalData.processosJuridicosData.empresa,
115
- ctx: {
116
- type: ctx.type,
117
- document: !!ctx.document,
118
- error: ctx.error ? String(ctx.error) : null
119
- }
141
+ empresas: globalData.processosJuridicosData.empresa
120
142
  });
121
- if (currentDataHash === dataHashRef.current && processedRef.current)
143
+ if (hash === dataHashRef.current && processedRef.current)
122
144
  return;
123
- dataHashRef.current = currentDataHash;
124
- // Processamento de dados
125
- var empresas = globalData.processosJuridicosData.empresa;
126
- if (ctx.type === RequestStatus.Error && !isProcessoNaoEncontrado) {
127
- setData(function (prevState) { return (__assign(__assign({}, prevState), { liminar: { isLoaded: true } })); });
128
- console.error('Erro na requisição de liminares:', ctx.error || 'Erro desconhecido');
145
+ dataHashRef.current = hash;
146
+ if (ctx.type === RequestStatus.Error && !isErro404) {
147
+ setData(function (prev) { return (__assign(__assign({}, prev), { liminar: { isLoaded: true } })); });
148
+ console.error('Erro na requisição de liminares:', ctx.error || 'desconhecido');
129
149
  }
130
- var isSuccess = ctx.type === RequestStatus.Success || isProcessoNaoEncontrado;
131
- var indiciosDeLiminar = isSuccess
132
- ? ((_c = ctx.document) === null || _c === void 0 ? void 0 : _c.indiciosDeLiminar) === true
133
- : false;
134
- var finalStatus = indiciosDeLiminar ||
135
- (empresas &&
136
- empresas.length > 0 &&
137
- resultRef.current !== 'Não encontrado')
150
+ var indiciosApi = ((_d = ctx.document) === null || _d === void 0 ? void 0 : _d.indiciosDeLiminar) === true;
151
+ var finalStatus = indiciosApi || origensDetectadas.length > 0
138
152
  ? 'Encontrado'
139
153
  : 'Não encontrado';
140
154
  setData(function (prev) {
141
155
  var _a, _b;
142
156
  if (((_a = prev.liminar) === null || _a === void 0 ? void 0 : _a.message) === finalStatus &&
143
- ((_b = prev.liminar) === null || _b === void 0 ? void 0 : _b.indiciosDeLiminar) === indiciosDeLiminar) {
157
+ ((_b = prev.liminar) === null || _b === void 0 ? void 0 : _b.indiciosDeLiminar) === indiciosApi) {
144
158
  return prev;
145
159
  }
146
- return __assign(__assign({}, prev), { liminar: { indiciosDeLiminar: indiciosDeLiminar, message: finalStatus, isLoaded: true } });
160
+ return __assign(__assign({}, prev), { liminar: {
161
+ indiciosDeLiminar: indiciosApi,
162
+ message: finalStatus,
163
+ isLoaded: true
164
+ } });
147
165
  });
148
166
  resultRef.current = finalStatus;
149
167
  processingRef.current = false;
150
168
  processedRef.current = true;
151
- }, [
152
- ctx,
153
- (_c = globalData === null || globalData === void 0 ? void 0 : globalData.dossie) === null || _c === void 0 ? void 0 : _c.carousel,
154
- (_d = globalData === null || globalData === void 0 ? void 0 : globalData.processosJuridicosData) === null || _d === void 0 ? void 0 : _d.isLoaded,
155
- (_e = globalData === null || globalData === void 0 ? void 0 : globalData.processosJuridicosData) === null || _e === void 0 ? void 0 : _e.empresa,
156
- isProcessoNaoEncontrado,
157
- setData
158
- ]);
159
- if (processedRef.current && resultRef.current === 'Não encontrado')
169
+ }, [ctx, globalData, origensDetectadas, setData, isErro404]);
170
+ // Se nada encontrado, não renderiza componente
171
+ if (processedRef.current && resultRef.current === 'Não encontrado') {
160
172
  return null;
161
- return (React.createElement(Section, { title: "Liminares para Remo\u00E7\u00E3o de Protesto", subtitle: processingRef.current
173
+ }
174
+ return (React.createElement(Section, { title: React.createElement(React.Fragment, null,
175
+ React.createElement(TitleWithTooltip, null,
176
+ "Liminares para Remo\u00E7\u00E3o de Protesto",
177
+ showInversionInfo && (React.createElement(TooltipContainer, null,
178
+ React.createElement(TooltipIcon, null),
179
+ React.createElement(TooltipText, null, "Aten\u00E7\u00E3o: Em alguns casos, o sistema judicial pode registrar os pap\u00E9is das partes de forma invertida, dificultando a interpreta\u00E7\u00E3o direta. Por isso, utilizamos algoritmos internos para detectar esse padr\u00E3o com base em contexto e palavras-chave."))))), subtitle: processingRef.current
162
180
  ? 'Carregando liminar...'
163
181
  : 'Indícios de liminares para ocultação de registros.', icon: ProtestosIcon, ctx: processingRef.current
164
182
  ? __assign(__assign({}, ctx), { type: RequestStatus.Loading }) : derivedCtx, onSuccess: processingRef.current
165
183
  ? undefined
166
184
  : function (data, context) {
167
185
  var _a;
168
- var globalMessage = ((_a = globalData === null || globalData === void 0 ? void 0 : globalData.liminar) === null || _a === void 0 ? void 0 : _a.message) || 'Não encontrado';
169
- var variant = globalMessage === 'Encontrado' ? 'error' : 'default';
186
+ var message = ((_a = globalData === null || globalData === void 0 ? void 0 : globalData.liminar) === null || _a === void 0 ? void 0 : _a.message) || 'Não encontrado';
187
+ var variant = message === 'Encontrado' ? 'error' : 'default';
170
188
  return {
171
189
  children: React.createElement(React.Fragment, null),
172
190
  variant: variant,
173
191
  description: (React.createElement(React.Fragment, null,
174
- React.createElement(StatusMessage, { type: variant }, globalMessage),
175
- origensDetectadas.map(function (origem, index) { return (React.createElement(StatusMessage, { key: index, type: variant }, origem)); })))
192
+ React.createElement(StatusMessage, { type: variant }, message),
193
+ origensDetectadas.map(function (o, i) { return (React.createElement(StatusMessage, { key: i, type: variant }, o)); })))
176
194
  };
177
195
  } }));
178
196
  };
@@ -0,0 +1,7 @@
1
+ export declare const TooltipContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
2
+ export declare const TooltipIcon: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("phosphor-react").IconProps & import("react").RefAttributes<SVGSVGElement>>, import("styled-components").DefaultTheme, {
3
+ weight: "fill";
4
+ size: 24;
5
+ }, "size" | "weight">;
6
+ export declare const TooltipText: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
7
+ export declare const TitleWithTooltip: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -0,0 +1,15 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ import theme from '../../styles/theme';
6
+ import { WarningCircle } from 'phosphor-react';
7
+ import styled from 'styled-components';
8
+ export var TooltipContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n display: inline-flex;\n align-items: center;\n margin-left: 8px;\n\n &:hover {\n span {\n visibility: visible;\n opacity: 1;\n transform: translateY(0);\n }\n }\n"], ["\n position: relative;\n display: inline-flex;\n align-items: center;\n margin-left: 8px;\n\n &:hover {\n span {\n visibility: visible;\n opacity: 1;\n transform: translateY(0);\n }\n }\n"])));
9
+ export var TooltipIcon = styled(WarningCircle).attrs({
10
+ weight: 'fill',
11
+ size: 24
12
+ })(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n color: ", ";\n cursor: pointer;\n transition: transform 0.2s ease;\n\n &:hover {\n transform: scale(1.2);\n }\n"], ["\n color: ", ";\n cursor: pointer;\n transition: transform 0.2s ease;\n\n &:hover {\n transform: scale(1.2);\n }\n"])), theme.colors.laranja);
13
+ export var TooltipText = styled.span(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n visibility: hidden;\n width: 380px;\n max-width: 90vw;\n background-color: ", ";\n color: ", ";\n text-align: left;\n border-radius: 10px;\n padding: 16px 18px;\n font-size: 15px;\n font-weight: 500;\n font-style: normal;\n line-height: 1.5;\n position: absolute;\n z-index: 10;\n top: 130%;\n left: 0;\n opacity: 0;\n transform: translateY(-10px);\n transition:\n opacity 0.3s ease-in-out,\n transform 0.3s ease-in-out;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);\n\n @media screen and (max-width: 768px) {\n font-size: 14px;\n padding: 14px;\n }\n"], ["\n visibility: hidden;\n width: 380px;\n max-width: 90vw;\n background-color: ", ";\n color: ", ";\n text-align: left;\n border-radius: 10px;\n padding: 16px 18px;\n font-size: 15px;\n font-weight: 500;\n font-style: normal;\n line-height: 1.5;\n position: absolute;\n z-index: 10;\n top: 130%;\n left: 0;\n opacity: 0;\n transform: translateY(-10px);\n transition:\n opacity 0.3s ease-in-out,\n transform 0.3s ease-in-out;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);\n\n @media screen and (max-width: 768px) {\n font-size: 14px;\n padding: 14px;\n }\n"])), theme.colors.cinzaBase, theme.colors.erroApoio);
14
+ export var TitleWithTooltip = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: 8px;\n"], ["\n display: flex;\n align-items: center;\n gap: 8px;\n"])));
15
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4;