@granto-umbrella/umbrella-components 2.3.22 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/umbrella-components.css +1 -1
- package/dist/umbrella-components.es.js +42830 -62989
- package/dist/umbrella-components.umd.js +2104 -548
- package/package.json +10 -5
- package/src/assets/_banner_contato.png +0 -0
- package/src/assets/_logoUmbrella.svg +34 -0
- package/src/assets.d.ts +19 -0
- package/src/components/atoms/Badge/Badge.styles.ts +24 -17
- package/src/components/atoms/Badge/Badge.tsx +19 -11
- package/src/components/atoms/Badge/Badge.types.ts +3 -2
- package/src/components/atoms/Breadcrumb/Breadcrumb.styles.ts +18 -11
- package/src/components/atoms/Breadcrumb/Breadcrumb.tsx +11 -3
- package/src/components/atoms/Button/Button.styles.ts +86 -12
- package/src/components/atoms/Button/Button.types.ts +6 -1
- package/src/components/atoms/Checkbox/Checkbox.styles.ts +4 -4
- package/src/components/atoms/Checkbox/Checkbox.tsx +2 -1
- package/src/components/atoms/CodeInput/CodeInput.styles.tsx +39 -0
- package/src/components/atoms/CodeInput/CodeInput.tsx +19 -0
- package/src/components/atoms/CodeInput/CodeInput.types.ts +3 -0
- package/src/components/atoms/CodeInput/index.tsx +1 -0
- package/src/components/atoms/DropDownMenu/DropdownMenu.styles.tsx +106 -0
- package/src/components/atoms/DropDownMenu/DropdownMenu.tsx +48 -0
- package/src/components/atoms/DropDownMenu/DropdownMenu.types.ts +15 -0
- package/src/components/atoms/DropDownMenu/index.tsx +2 -0
- package/src/components/atoms/ErrorMessage/ErrorMessage.styles.tsx +28 -0
- package/src/components/atoms/ErrorMessage/ErrorMessage.tsx +12 -0
- package/src/components/atoms/ErrorMessage/ErrorMessage.types.ts +6 -0
- package/src/components/atoms/ErrorMessage/index.tsx +1 -0
- package/src/components/atoms/Footer/Footer.styles.tsx +22 -0
- package/src/components/atoms/Footer/Footer.tsx +9 -0
- package/src/components/atoms/Footer/Footer.types.tsx +5 -0
- package/src/components/atoms/Footer/index.tsx +1 -0
- package/src/components/atoms/GenericContainer/GenericContainer.styles.tsx +21 -0
- package/src/components/atoms/GenericContainer/GenericContainer.tsx +9 -0
- package/src/components/atoms/GenericContainer/GenericContainer.types.ts +5 -0
- package/src/components/atoms/GenericContainer/index.tsx +1 -0
- package/src/components/atoms/Input/Input.styles.ts +24 -8
- package/src/components/atoms/Input/Input.tsx +10 -9
- package/src/components/atoms/Input/Input.types.ts +4 -25
- package/src/components/atoms/Label/Label.styles.ts +8 -7
- package/src/components/atoms/Loading/Loading.styles.tsx +23 -0
- package/src/components/atoms/Loading/Loading.tsx +8 -0
- package/src/components/atoms/Loading/index.tsx +1 -0
- package/src/components/atoms/LogoContainer/LogoContainer.Types.tsx +5 -0
- package/src/components/atoms/LogoContainer/LogoContainer.styles.tsx +11 -0
- package/src/components/atoms/LogoContainer/LogoContainer.tsx +11 -0
- package/src/components/atoms/LogoContainer/index.tsx +1 -0
- package/src/components/atoms/ModalAviso/ModalAviso.styles.tsx +54 -0
- package/src/components/atoms/ModalAviso/ModalAviso.tsx +37 -0
- package/src/components/atoms/ModalAviso/ModalAviso.types.ts +5 -0
- package/src/components/atoms/ModalAviso/index.tsx +1 -0
- package/src/components/atoms/MultiSelect/MultiSelect.styles.tsx +92 -0
- package/src/components/atoms/MultiSelect/MultiSelect.tsx +346 -0
- package/src/components/atoms/MultiSelect/MultiSelect.types.ts +38 -0
- package/src/components/atoms/MultiSelect/index.tsx +1 -0
- package/src/components/atoms/RadioButton/RadioButton.styles.ts +3 -2
- package/src/components/atoms/RadioButton/RadioButton.tsx +1 -0
- package/src/components/atoms/ResendLink/ResendLink.styles.tsx +20 -0
- package/src/components/atoms/ResendLink/ResendLink.tsx +16 -0
- package/src/components/atoms/ResendLink/ResendLink.types.ts +9 -0
- package/src/components/atoms/ResendLink/index.tsx +1 -0
- package/src/components/atoms/Select/Select.styles.ts +81 -23
- package/src/components/atoms/Select/Select.tsx +17 -30
- package/src/components/atoms/Select/Select.types.ts +17 -9
- package/src/components/atoms/Subtitle/Subtitle.styles.tsx +21 -0
- package/src/components/atoms/Subtitle/Subtitle.tsx +7 -0
- package/src/components/atoms/Subtitle/Subtitle.types.ts +5 -0
- package/src/components/atoms/Subtitle/index.tsx +1 -0
- package/src/components/atoms/Switch/Switch.styles.ts +13 -8
- package/src/components/atoms/Switch/Switch.tsx +1 -1
- package/src/components/atoms/Tapbar/Tapbar.styles.tsx +57 -0
- package/src/components/atoms/Tapbar/Tapbar.tsx +24 -0
- package/src/components/atoms/Tapbar/Tapbar.types.ts +11 -0
- package/src/components/atoms/Tapbar/index.tsx +2 -0
- package/src/components/atoms/Text/Text.styles.tsx +8 -5
- package/src/components/atoms/Text/Text.tsx +2 -0
- package/src/components/atoms/Textarea/Textarea.styles.ts +7 -8
- package/src/components/atoms/Textarea/Textarea.tsx +1 -1
- package/src/components/atoms/Title/Title.styles.tsx +17 -0
- package/src/components/atoms/Title/Title.tsx +7 -0
- package/src/components/atoms/Title/Title.types.ts +5 -0
- package/src/components/atoms/Title/index.tsx +1 -0
- package/src/components/molecules/BannerAjuda/BannerAjuda.styles.tsx +9 -0
- package/src/components/molecules/BannerAjuda/BannerAjuda.tsx +19 -0
- package/src/components/molecules/BannerAjuda/BannerAjuda.types.ts +5 -0
- package/src/components/molecules/BannerAjuda/index.tsx +1 -0
- package/src/components/molecules/ButtonGroup/ButtonGroup.tsx +12 -6
- package/src/components/molecules/ButtonGroup/ButtonGroup.types.ts +16 -2
- package/src/components/molecules/CodeInputContainer/CodeInputContainer.styles.tsx +7 -0
- package/src/components/molecules/CodeInputContainer/CodeInputContainer.tsx +32 -0
- package/src/components/molecules/CodeInputContainer/CodeInputContainer.types.ts +13 -0
- package/src/components/molecules/CodeInputContainer/index.tsx +3 -0
- package/src/components/molecules/ExcludeModal/ExcludeModal.styles.tsx +118 -0
- package/src/components/molecules/ExcludeModal/ExcludeModal.tsx +48 -0
- package/src/components/molecules/ExcludeModal/ExcludeModal.types.ts +10 -0
- package/src/components/molecules/ExcludeModal/index.tsx +1 -0
- package/src/components/molecules/HighlightsCard/HighlightsCard.styles.tsx +68 -0
- package/src/components/molecules/HighlightsCard/HighlightsCard.tsx +26 -0
- package/src/components/molecules/HighlightsCard/HighlightsCard.types.ts +10 -0
- package/src/components/molecules/HighlightsCard/index.tsx +1 -0
- package/src/components/molecules/InsuranceCard/InsuranceCard.styles.tsx +174 -0
- package/src/components/molecules/InsuranceCard/InsuranceCard.tsx +418 -0
- package/src/components/molecules/InsuranceCard/InsuranceCard.types.ts +32 -0
- package/src/components/molecules/InsuranceCard/index.tsx +1 -0
- package/src/components/molecules/PieChartComponent/PieChartComponent.styles.tsx +8 -0
- package/src/components/molecules/PieChartComponent/PieChartComponent.tsx +73 -0
- package/src/components/molecules/PieChartComponent/PieChartComponent.types.ts +11 -0
- package/src/components/molecules/PieChartComponent/index.tsx +1 -0
- package/src/components/molecules/RadioGroupField/RadioGroupField.styles.tsx +64 -0
- package/src/components/molecules/RadioGroupField/RadioGroupField.tsx +69 -0
- package/src/components/molecules/RadioGroupField/RadioGroupField.types.ts +17 -0
- package/src/components/molecules/RadioGroupField/index.tsx +1 -0
- package/src/components/molecules/RefuseModal/RefuseModal.styles.tsx +139 -0
- package/src/components/molecules/RefuseModal/RefuseModal.tsx +76 -0
- package/src/components/molecules/RefuseModal/RefuseModal.types.ts +15 -0
- package/src/components/molecules/RefuseModal/index.tsx +2 -0
- package/src/components/molecules/ResultsChart/ResultsChart.styles.tsx +22 -0
- package/src/components/molecules/ResultsChart/ResultsChart.tsx +19 -0
- package/src/components/molecules/ResultsChart/ResultsChart.types.ts +3 -0
- package/src/components/molecules/ResultsChart/index.tsx +2 -0
- package/src/components/molecules/TimeLine/TimeLine.styles.ts +118 -0
- package/src/components/molecules/TimeLine/TimeLine.tsx +38 -0
- package/src/components/molecules/TimeLine/TimeLine.types.ts +35 -0
- package/src/components/organisms/DonutEmissionsChart/DonutEmissionsChart.styles.tsx +113 -0
- package/src/components/organisms/DonutEmissionsChart/DonutEmissionsChart.tsx +71 -0
- package/src/components/organisms/DonutEmissionsChart/DonutEmissionsChart.types.ts +9 -0
- package/src/components/organisms/DonutEmissionsChart/index.tsx +2 -0
- package/src/components/organisms/ListagemUltimasEmissoes/ListagemUltimasEmissoes.styles.tsx +114 -0
- package/src/components/organisms/ListagemUltimasEmissoes/ListagemUltimasEmissoes.tsx +89 -0
- package/src/components/organisms/ListagemUltimasEmissoes/ListagemUltimasEmissoes.types.ts +16 -0
- package/src/components/organisms/ListagemUltimasEmissoes/index.tsx +1 -0
- package/src/components/organisms/TimelineModal/TimelineModal.styles.ts +49 -0
- package/src/components/organisms/TimelineModal/TimelineModal.tsx +37 -0
- package/src/global.d.ts +6 -0
- package/src/index.ts +69 -36
- package/src/lib/helpers.ts +17 -0
- package/src/styles/tokens/colors.ts +102 -96
- package/src/styles/tokens/shadows.ts +3 -3
- package/src/styles/tokens/sizes.ts +12 -1
- package/src/styles/tokens/typography.ts +148 -123
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import {
|
|
3
|
+
semanticColors,
|
|
4
|
+
semanticSizes,
|
|
5
|
+
typographyTokens,
|
|
6
|
+
semanticRadius,
|
|
7
|
+
} from "../../../styles/tokens";
|
|
8
|
+
|
|
9
|
+
export const TableWrapper = styled.div`
|
|
10
|
+
width: 100%;
|
|
11
|
+
overflow-x: auto;
|
|
12
|
+
background-color: ${semanticColors.base.background};
|
|
13
|
+
border: 1px solid ${semanticColors.global.border.default};
|
|
14
|
+
padding: ${semanticSizes.global.padding.xl};
|
|
15
|
+
border-radius: ${semanticRadius.global.radius.md2};
|
|
16
|
+
`;
|
|
17
|
+
|
|
18
|
+
export const Table = styled.table`
|
|
19
|
+
width: 100%;
|
|
20
|
+
border-collapse: collapse;
|
|
21
|
+
`;
|
|
22
|
+
|
|
23
|
+
export const TableHead = styled.thead`
|
|
24
|
+
background-color: ${semanticColors.base.background};
|
|
25
|
+
`;
|
|
26
|
+
|
|
27
|
+
export const TableRow = styled.tr`
|
|
28
|
+
&:last-child td {
|
|
29
|
+
border-bottom: none;
|
|
30
|
+
padding-bottom: 0;
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
|
|
34
|
+
export const TableHeader = styled.th`
|
|
35
|
+
padding: ${semanticSizes.global.padding.md} 0;
|
|
36
|
+
text-align: left;
|
|
37
|
+
border: 0px;
|
|
38
|
+
font-weight: ${typographyTokens.fontWeights.semibold};
|
|
39
|
+
font-size: ${typographyTokens.fontSizes.bodyS};
|
|
40
|
+
color: ${semanticColors.global.text.onSurface.enabled};
|
|
41
|
+
|
|
42
|
+
&.center {
|
|
43
|
+
text-align: center;
|
|
44
|
+
}
|
|
45
|
+
`;
|
|
46
|
+
|
|
47
|
+
export const TableData = styled.td`
|
|
48
|
+
padding: ${semanticSizes.global.padding.lg} 0 ${semanticSizes.global.padding["2xl"]};
|
|
49
|
+
border-bottom: 1px solid ${semanticColors.neutral[200]};
|
|
50
|
+
text-align: left;
|
|
51
|
+
font-size: ${typographyTokens.fontSizes.bodyM};
|
|
52
|
+
color: ${semanticColors.global.text.default.enabled};
|
|
53
|
+
|
|
54
|
+
&.center {
|
|
55
|
+
text-align: center;
|
|
56
|
+
|
|
57
|
+
img {
|
|
58
|
+
display: block;
|
|
59
|
+
margin: 0 auto;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
img {
|
|
64
|
+
cursor: pointer;
|
|
65
|
+
}
|
|
66
|
+
`;
|
|
67
|
+
|
|
68
|
+
export const TableWrapperHeader = styled.div`
|
|
69
|
+
display: flex;
|
|
70
|
+
flex-direction: row;
|
|
71
|
+
justify-content: space-between;
|
|
72
|
+
align-items: center;
|
|
73
|
+
gap: ${semanticSizes.global.gap.sm};
|
|
74
|
+
margin-bottom: ${semanticSizes.global.gap.lg};
|
|
75
|
+
`;
|
|
76
|
+
|
|
77
|
+
export const TableWrapperTitle = styled.h2`
|
|
78
|
+
font-size: ${typographyTokens.fontSizes.headingM};
|
|
79
|
+
font-weight: ${typographyTokens.fontWeights.medium};
|
|
80
|
+
margin: 0;
|
|
81
|
+
color: ${semanticColors.base.text};
|
|
82
|
+
`;
|
|
83
|
+
|
|
84
|
+
export const TableWrapperLink = styled.button`
|
|
85
|
+
display: flex;
|
|
86
|
+
flex-direction: row;
|
|
87
|
+
font-size: ${typographyTokens.fontSizes.labelL};
|
|
88
|
+
margin: 0;
|
|
89
|
+
padding: 0;
|
|
90
|
+
background: none;
|
|
91
|
+
border: none;
|
|
92
|
+
color: ${semanticColors.branding.text.accent.enabled};
|
|
93
|
+
gap: ${semanticSizes.global.gap.sm};
|
|
94
|
+
align-items: center;
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
transition: opacity 0.2s;
|
|
97
|
+
|
|
98
|
+
&:hover {
|
|
99
|
+
opacity: 0.8;
|
|
100
|
+
}
|
|
101
|
+
`;
|
|
102
|
+
|
|
103
|
+
export const LoadingContainer = styled.div`
|
|
104
|
+
display: flex;
|
|
105
|
+
justify-content: center;
|
|
106
|
+
align-items: center;
|
|
107
|
+
padding: ${semanticSizes.global.padding["3xl"]};
|
|
108
|
+
font-size: ${typographyTokens.fontSizes.bodyM};
|
|
109
|
+
color: ${semanticColors.global.text.onSurface.subtitle};
|
|
110
|
+
`;
|
|
111
|
+
|
|
112
|
+
export const ErrorContainer = styled(LoadingContainer)`
|
|
113
|
+
color: ${semanticColors.danger.text.feedback.strong};
|
|
114
|
+
`;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {
|
|
3
|
+
TableWrapper,
|
|
4
|
+
Table,
|
|
5
|
+
TableHead,
|
|
6
|
+
TableRow,
|
|
7
|
+
TableHeader,
|
|
8
|
+
TableData,
|
|
9
|
+
TableWrapperHeader,
|
|
10
|
+
TableWrapperTitle,
|
|
11
|
+
TableWrapperLink,
|
|
12
|
+
LoadingContainer,
|
|
13
|
+
ErrorContainer,
|
|
14
|
+
} from "./ListagemUltimasEmissoes.styles";
|
|
15
|
+
import { ListagemUltimasEmissoesProps } from "./ListagemUltimasEmissoes.types";
|
|
16
|
+
|
|
17
|
+
const ListagemUltimasEmissoes: React.FC<ListagemUltimasEmissoesProps> = ({
|
|
18
|
+
items = [],
|
|
19
|
+
isLoading = false,
|
|
20
|
+
isError = false,
|
|
21
|
+
error = null,
|
|
22
|
+
onViewAll,
|
|
23
|
+
onActionClick,
|
|
24
|
+
title = "Suas últimas emissões",
|
|
25
|
+
}) => {
|
|
26
|
+
if (isLoading) {
|
|
27
|
+
return <LoadingContainer>Carregando emissões...</LoadingContainer>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (isError) {
|
|
31
|
+
return (
|
|
32
|
+
<ErrorContainer>
|
|
33
|
+
Erro: {error?.message || "Não foi possível carregar as emissões"}
|
|
34
|
+
</ErrorContainer>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (!items || items.length === 0) {
|
|
39
|
+
return <LoadingContainer>Nenhuma emissão encontrada</LoadingContainer>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<TableWrapper>
|
|
44
|
+
<TableWrapperHeader>
|
|
45
|
+
<TableWrapperTitle>{title}</TableWrapperTitle>
|
|
46
|
+
<TableWrapperLink onClick={onViewAll}>
|
|
47
|
+
Ver todos
|
|
48
|
+
<span>→</span>
|
|
49
|
+
</TableWrapperLink>
|
|
50
|
+
</TableWrapperHeader>
|
|
51
|
+
|
|
52
|
+
<Table>
|
|
53
|
+
<TableHead>
|
|
54
|
+
<TableRow>
|
|
55
|
+
<TableHeader>Reclamante</TableHeader>
|
|
56
|
+
<TableHeader>Valor Pago</TableHeader>
|
|
57
|
+
<TableHeader>Produto</TableHeader>
|
|
58
|
+
<TableHeader>ID</TableHeader>
|
|
59
|
+
<TableHeader className="center">Ações</TableHeader>
|
|
60
|
+
</TableRow>
|
|
61
|
+
</TableHead>
|
|
62
|
+
<tbody>
|
|
63
|
+
{items.map((item) => (
|
|
64
|
+
<TableRow key={item.policyId}>
|
|
65
|
+
<TableData>{item.insurerName}</TableData>
|
|
66
|
+
<TableData>
|
|
67
|
+
{Number(item.paymentTotal).toLocaleString("pt-BR", {
|
|
68
|
+
style: "currency",
|
|
69
|
+
currency: "BRL",
|
|
70
|
+
})}
|
|
71
|
+
</TableData>
|
|
72
|
+
<TableData>{item.modality}</TableData>
|
|
73
|
+
<TableData>{item.policyId}</TableData>
|
|
74
|
+
<TableData
|
|
75
|
+
className="center"
|
|
76
|
+
onClick={() => onActionClick?.(item.policyId)}
|
|
77
|
+
style={{ cursor: "pointer" }}
|
|
78
|
+
>
|
|
79
|
+
⋮
|
|
80
|
+
</TableData>
|
|
81
|
+
</TableRow>
|
|
82
|
+
))}
|
|
83
|
+
</tbody>
|
|
84
|
+
</Table>
|
|
85
|
+
</TableWrapper>
|
|
86
|
+
);
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export { ListagemUltimasEmissoes };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface EmissionItem {
|
|
2
|
+
policyId: string;
|
|
3
|
+
insurerName: string;
|
|
4
|
+
paymentTotal: number;
|
|
5
|
+
modality: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface ListagemUltimasEmissoesProps {
|
|
9
|
+
items?: EmissionItem[];
|
|
10
|
+
isLoading?: boolean;
|
|
11
|
+
isError?: boolean;
|
|
12
|
+
error?: Error | null;
|
|
13
|
+
onViewAll?: () => void;
|
|
14
|
+
onActionClick?: (policyId: string) => void;
|
|
15
|
+
title?: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ListagemUltimasEmissoes } from "./ListagemUltimasEmissoes";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import * as Dialog from '@radix-ui/react-dialog';
|
|
3
|
+
import { semanticColors } from '../../../styles/tokens';
|
|
4
|
+
|
|
5
|
+
export const Overlay = styled(Dialog.Overlay)`
|
|
6
|
+
position: fixed;
|
|
7
|
+
inset: 0;
|
|
8
|
+
background-color: rgba(0, 0, 0, 0.6);
|
|
9
|
+
z-index: 50;
|
|
10
|
+
`;
|
|
11
|
+
export const Content = styled(Dialog.Content)`
|
|
12
|
+
position: fixed;
|
|
13
|
+
top: 50%;
|
|
14
|
+
left: 50%;
|
|
15
|
+
transform: translate(-50%, -50%);
|
|
16
|
+
background: white;
|
|
17
|
+
border-radius: 12px;
|
|
18
|
+
padding: 32px;
|
|
19
|
+
width: 100%;
|
|
20
|
+
max-width: 520px;
|
|
21
|
+
z-index: 1000;
|
|
22
|
+
border-top: 6px solid ${semanticColors.branding.surface.enabled};
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
export const Title = styled.h2`
|
|
26
|
+
font-size: 28px;
|
|
27
|
+
font-weight: 600;
|
|
28
|
+
color: ${semanticColors.base.text};
|
|
29
|
+
margin-bottom: 16px;
|
|
30
|
+
padding-right: 12px;
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: row;
|
|
33
|
+
gap: 8px;
|
|
34
|
+
align-items: center;
|
|
35
|
+
margin-top: -24px;
|
|
36
|
+
`;
|
|
37
|
+
|
|
38
|
+
export const CloseIcon = styled(Dialog.Close)`
|
|
39
|
+
position: absolute;
|
|
40
|
+
top: 32px;
|
|
41
|
+
right: 32px;
|
|
42
|
+
background: transparent;
|
|
43
|
+
border: none;
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
|
|
46
|
+
svg {
|
|
47
|
+
color: #888;
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import * as Dialog from '@radix-ui/react-dialog';
|
|
3
|
+
import { X } from 'lucide-react';
|
|
4
|
+
import { CloseIcon, Content, Overlay, Title } from './TimelineModal.styles';
|
|
5
|
+
import { FlowArrow } from 'phosphor-react';
|
|
6
|
+
import { Timeline } from '../../molecules/TimeLine/TimeLine';
|
|
7
|
+
export const TimelineModal = ({
|
|
8
|
+
open,
|
|
9
|
+
onOpenChange,
|
|
10
|
+
onClose,
|
|
11
|
+
data,
|
|
12
|
+
}: {
|
|
13
|
+
open: boolean;
|
|
14
|
+
onOpenChange: (open: boolean) => void;
|
|
15
|
+
onClose: () => void;
|
|
16
|
+
data: any;
|
|
17
|
+
}) => {
|
|
18
|
+
return (
|
|
19
|
+
<Dialog.Root open={open} onOpenChange={onOpenChange}>
|
|
20
|
+
<Overlay />
|
|
21
|
+
<Content>
|
|
22
|
+
<CloseIcon aria-label="Fechar" onClick={onClose}>
|
|
23
|
+
<X size={28} color="#BDBDBD" />
|
|
24
|
+
</CloseIcon>
|
|
25
|
+
|
|
26
|
+
<Dialog.Title>
|
|
27
|
+
<Title>
|
|
28
|
+
<FlowArrow />
|
|
29
|
+
Linha do tempo
|
|
30
|
+
</Title>
|
|
31
|
+
</Dialog.Title>
|
|
32
|
+
|
|
33
|
+
<Timeline items={data} />
|
|
34
|
+
</Content>
|
|
35
|
+
</Dialog.Root>
|
|
36
|
+
);
|
|
37
|
+
};
|
package/src/global.d.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { Form } from 'react-hook-form';
|
|
2
|
+
|
|
2
3
|
// Import all components
|
|
3
4
|
import {
|
|
4
5
|
Dialog,
|
|
@@ -7,38 +8,56 @@ import {
|
|
|
7
8
|
DialogPortal,
|
|
8
9
|
DialogTitle,
|
|
9
10
|
DialogTrigger,
|
|
10
|
-
} from
|
|
11
|
-
|
|
12
|
-
import Badge from
|
|
13
|
-
import Breadcrumb from
|
|
14
|
-
import Button from
|
|
15
|
-
import { Checkbox } from
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import {
|
|
11
|
+
} from '@radix-ui/react-dialog';
|
|
12
|
+
|
|
13
|
+
import Badge from './components/atoms/Badge/Badge';
|
|
14
|
+
import Breadcrumb from './components/atoms/Breadcrumb/Breadcrumb';
|
|
15
|
+
import Button from './components/atoms/Button';
|
|
16
|
+
import { Checkbox } from './components/atoms/Checkbox/Checkbox';
|
|
17
|
+
import CodeInput from './components/atoms/CodeInput/CodeInput';
|
|
18
|
+
import { DatePickerInput } from './components/atoms/DatePickerInput/DatePickerInput';
|
|
19
|
+
import { DropdownMenu } from './components/atoms/DropDownMenu/DropdownMenu';
|
|
20
|
+
import ErroMessage from './components/atoms/ErrorMessage/ErrorMessage';
|
|
21
|
+
import Footer from './components/atoms/Footer/Footer';
|
|
22
|
+
import { GenericContainer } from './components/atoms/GenericContainer';
|
|
23
|
+
import Icon from './components/atoms/Icon';
|
|
24
|
+
import Input from './components/atoms/Input';
|
|
25
|
+
import { Label } from './components/atoms/Label/Label';
|
|
26
|
+
import Loading from './components/atoms/Loading';
|
|
27
|
+
import { LogoContainer } from './components/atoms/LogoContainer';
|
|
28
|
+
import { ModalAviso } from './components/atoms/ModalAviso';
|
|
29
|
+
import { MultiSelect } from './components/atoms/MultiSelect';
|
|
30
|
+
import Pill from './components/atoms/Pill/Pill';
|
|
31
|
+
import RadioButton from './components/atoms/RadioButton/RadioButton';
|
|
32
|
+
import { ResendLink } from './components/atoms/ResendLink';
|
|
33
|
+
import Select from './components/atoms/Select';
|
|
34
|
+
import { Subtitle } from './components/atoms/Subtitle';
|
|
35
|
+
import Switch from './components/atoms/Switch/Switch';
|
|
36
|
+
import { Tapbar } from './components/atoms/Tapbar';
|
|
37
|
+
import Text from './components/atoms/Text';
|
|
38
|
+
import Textarea from './components/atoms/Textarea/Textarea';
|
|
39
|
+
import { Title } from './components/atoms/Title';
|
|
40
|
+
import { BannerAjuda } from './components/molecules/BannerAjuda';
|
|
41
|
+
import ButtonGroup from './components/molecules/ButtonGroup/ButtonGroup';
|
|
42
|
+
import { Calendar } from './components/molecules/Calendar/Calendar';
|
|
43
|
+
import { CodeInputContainer } from './components/molecules/CodeInputContainer';
|
|
27
44
|
import {
|
|
28
45
|
Popover,
|
|
29
46
|
PopoverContent,
|
|
30
47
|
PopoverTrigger,
|
|
31
|
-
} from
|
|
32
|
-
import RadioGroup from
|
|
33
|
-
import
|
|
48
|
+
} from './components/molecules/Popover/Popover';
|
|
49
|
+
import RadioGroup from './components/molecules/RadioBoxGroup/RadioBoxGroup';
|
|
50
|
+
import { TabToggle } from './components/molecules/TabToggle/TabToggle';
|
|
51
|
+
import { Timeline } from './components/molecules/TimeLine/TimeLine';
|
|
52
|
+
import AlertDialog from './components/organisms/AlertDialog/AlertDialog';
|
|
34
53
|
import {
|
|
35
54
|
DialogFooter,
|
|
36
55
|
DialogHeader,
|
|
37
|
-
} from
|
|
56
|
+
} from './components/organisms/Dialog/Dialog';
|
|
38
57
|
import {
|
|
39
58
|
StyledDialogClose,
|
|
40
59
|
StyledDialogOverlay,
|
|
41
|
-
} from
|
|
60
|
+
} from './components/organisms/Dialog/Dialog.styles';
|
|
42
61
|
import {
|
|
43
62
|
FormControl,
|
|
44
63
|
FormDescription,
|
|
@@ -47,20 +66,20 @@ import {
|
|
|
47
66
|
FormLabel,
|
|
48
67
|
FormMessage,
|
|
49
68
|
useFormField,
|
|
50
|
-
} from
|
|
51
|
-
|
|
52
|
-
import { TabToggle } from "./components/molecules/TabToggle/TabToggle";
|
|
53
|
-
|
|
54
|
-
import { DatePickerInput } from "./components/atoms/DatePickerInput/DatePickerInput";
|
|
69
|
+
} from './components/organisms/Form/Form';
|
|
70
|
+
import { TimelineModal } from './components/organisms/TimelineModal/TimelineModal';
|
|
55
71
|
|
|
56
72
|
// Export all components
|
|
57
73
|
export {
|
|
58
74
|
AlertDialog,
|
|
75
|
+
BannerAjuda,
|
|
59
76
|
Badge,
|
|
60
77
|
Breadcrumb,
|
|
61
78
|
Button,
|
|
62
79
|
ButtonGroup,
|
|
63
80
|
Calendar,
|
|
81
|
+
CodeInput,
|
|
82
|
+
CodeInputContainer,
|
|
64
83
|
Checkbox,
|
|
65
84
|
DatePickerInput,
|
|
66
85
|
Dialog,
|
|
@@ -71,6 +90,9 @@ export {
|
|
|
71
90
|
DialogPortal,
|
|
72
91
|
DialogTitle,
|
|
73
92
|
DialogTrigger,
|
|
93
|
+
DropdownMenu,
|
|
94
|
+
ErroMessage,
|
|
95
|
+
Footer,
|
|
74
96
|
Form,
|
|
75
97
|
FormControl,
|
|
76
98
|
FormDescription,
|
|
@@ -78,6 +100,11 @@ export {
|
|
|
78
100
|
FormItem,
|
|
79
101
|
FormLabel,
|
|
80
102
|
FormMessage,
|
|
103
|
+
GenericContainer,
|
|
104
|
+
Loading,
|
|
105
|
+
LogoContainer,
|
|
106
|
+
ModalAviso,
|
|
107
|
+
MultiSelect,
|
|
81
108
|
Icon,
|
|
82
109
|
Input,
|
|
83
110
|
Label,
|
|
@@ -87,24 +114,30 @@ export {
|
|
|
87
114
|
PopoverTrigger,
|
|
88
115
|
RadioButton,
|
|
89
116
|
RadioGroup,
|
|
117
|
+
ResendLink,
|
|
90
118
|
Select,
|
|
119
|
+
Subtitle,
|
|
91
120
|
StyledDialogClose,
|
|
92
121
|
StyledDialogOverlay,
|
|
93
122
|
Switch,
|
|
123
|
+
Tapbar,
|
|
94
124
|
TabToggle,
|
|
95
125
|
Text,
|
|
96
126
|
Textarea,
|
|
127
|
+
Title,
|
|
97
128
|
useFormField,
|
|
129
|
+
Timeline,
|
|
130
|
+
TimelineModal,
|
|
98
131
|
};
|
|
99
132
|
|
|
100
133
|
// Export all tokens from a new file
|
|
101
|
-
export { primitiveBorders, semanticBorders } from
|
|
102
|
-
export { primitiveColors, semanticColors } from
|
|
103
|
-
export { primitiveRadius, semanticRadius } from
|
|
104
|
-
export { primitiveShadows, semanticShadows } from
|
|
105
|
-
export { primitiveSizes, semanticSizes } from
|
|
106
|
-
export { typographyTokens } from
|
|
134
|
+
export { primitiveBorders, semanticBorders } from './styles/tokens/borders';
|
|
135
|
+
export { primitiveColors, semanticColors } from './styles/tokens/colors';
|
|
136
|
+
export { primitiveRadius, semanticRadius } from './styles/tokens/radius';
|
|
137
|
+
export { primitiveShadows, semanticShadows } from './styles/tokens/shadows';
|
|
138
|
+
export { primitiveSizes, semanticSizes } from './styles/tokens/sizes';
|
|
139
|
+
export { typographyTokens } from './styles/tokens/typography';
|
|
107
140
|
|
|
108
141
|
// Export all types
|
|
109
|
-
export type { Radius } from
|
|
110
|
-
export type { Shadows } from
|
|
142
|
+
export type { Radius } from './types/radius.types';
|
|
143
|
+
export type { Shadows } from './types/shadows.types';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TimelineVariant } from '@/components/molecules/TimeLine/TimeLine.types';
|
|
2
|
+
|
|
3
|
+
export function labelFromVariant(v?: TimelineVariant) {
|
|
4
|
+
switch (v) {
|
|
5
|
+
case 'accepted':
|
|
6
|
+
return 'Proposta aceita';
|
|
7
|
+
case 'continued':
|
|
8
|
+
return 'Continuação';
|
|
9
|
+
case 'rejected':
|
|
10
|
+
return 'Recusada';
|
|
11
|
+
case 'download':
|
|
12
|
+
return 'Download';
|
|
13
|
+
case 'StatusChanged':
|
|
14
|
+
default:
|
|
15
|
+
return 'Status Alterado';
|
|
16
|
+
}
|
|
17
|
+
}
|