@granto-umbrella/umbrella-components 3.0.34 → 3.0.37
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 +165 -27
- package/dist/umbrella-components.css +1 -1
- package/dist/umbrella-components.es.js +33627 -28792
- package/dist/umbrella-components.umd.js +1169 -1908
- package/package.json +136 -106
- package/src/assets.d.ts +19 -19
- package/src/components/atoms/Badge/Badge.styles.ts +88 -86
- package/src/components/atoms/Badge/Badge.tsx +42 -44
- package/src/components/atoms/Badge/Badge.types.ts +15 -15
- package/src/components/atoms/Breadcrumb/Breadcrumb.styles.ts +43 -43
- package/src/components/atoms/Breadcrumb/Breadcrumb.tsx +46 -48
- package/src/components/atoms/Breadcrumb/Breadcrumb.types.ts +12 -12
- package/src/components/atoms/Button/Button.styles.ts +279 -280
- package/src/components/atoms/Button/Button.tsx +76 -76
- package/src/components/atoms/Button/Button.types.ts +28 -28
- package/src/components/atoms/Button/index.ts +1 -1
- package/src/components/atoms/Checkbox/Checkbox.styles.ts +72 -72
- package/src/components/atoms/Checkbox/Checkbox.tsx +36 -36
- package/src/components/atoms/Checkbox/Checkbox.types.ts +14 -14
- package/src/components/atoms/Checkbox/CheckboxGroup.tsx +30 -30
- package/src/components/atoms/Checkbox/CheckboxSelectAll.tsx +32 -32
- package/src/components/atoms/CodeInput/CodeInput.styles.tsx +38 -39
- package/src/components/atoms/CodeInput/CodeInput.tsx +13 -19
- package/src/components/atoms/CodeInput/CodeInput.types.ts +3 -3
- package/src/components/atoms/CodeInput/index.tsx +1 -1
- package/src/components/atoms/DropDownMenu/DropdownMenu.tsx +48 -48
- package/src/components/atoms/DropDownMenu/DropdownMenu.types.ts +15 -15
- package/src/components/atoms/DropDownMenu/index.tsx +5 -2
- package/src/components/atoms/ErrorMessage/ErrorMessage.styles.tsx +28 -28
- package/src/components/atoms/ErrorMessage/ErrorMessage.tsx +12 -12
- package/src/components/atoms/ErrorMessage/ErrorMessage.types.ts +6 -6
- package/src/components/atoms/ErrorMessage/index.tsx +1 -1
- package/src/components/atoms/Footer/Footer.styles.tsx +22 -22
- package/src/components/atoms/Footer/Footer.tsx +9 -9
- package/src/components/atoms/Footer/Footer.types.tsx +5 -5
- package/src/components/atoms/Footer/index.tsx +1 -1
- package/src/components/atoms/GenericContainer/GenericContainer.styles.tsx +21 -21
- package/src/components/atoms/GenericContainer/GenericContainer.tsx +9 -9
- package/src/components/atoms/GenericContainer/GenericContainer.types.ts +5 -5
- package/src/components/atoms/GenericContainer/index.tsx +1 -1
- package/src/components/atoms/Icon/Icon.styles.ts +11 -11
- package/src/components/atoms/Icon/Icon.tsx +22 -22
- package/src/components/atoms/Icon/Icon.types.ts +6 -6
- package/src/components/atoms/Icon/index.ts +1 -1
- package/src/components/atoms/Input/Input.styles.ts +106 -101
- package/src/components/atoms/Input/index.ts +1 -1
- package/src/components/atoms/Label/Label.tsx +16 -16
- package/src/components/atoms/Loading/Loading.styles.tsx +25 -25
- package/src/components/atoms/Loading/Loading.tsx +8 -8
- package/src/components/atoms/LogoContainer/LogoContainer.Types.tsx +5 -5
- package/src/components/atoms/LogoContainer/LogoContainer.styles.tsx +11 -11
- package/src/components/atoms/LogoContainer/LogoContainer.tsx +11 -11
- package/src/components/atoms/LogoContainer/index.tsx +1 -1
- package/src/components/atoms/ModalAviso/ModalAviso.styles.tsx +56 -56
- package/src/components/atoms/ModalAviso/ModalAviso.tsx +43 -37
- package/src/components/atoms/ModalAviso/ModalAviso.types.ts +5 -5
- package/src/components/atoms/ModalAviso/index.tsx +1 -1
- package/src/components/atoms/MultiSelect/MultiSelect.styles.tsx +100 -92
- package/src/components/atoms/MultiSelect/MultiSelect.tsx +346 -346
- package/src/components/atoms/MultiSelect/MultiSelect.types.ts +38 -38
- package/src/components/atoms/Pill/Pill.styles.ts +46 -46
- package/src/components/atoms/Pill/Pill.tsx +35 -36
- package/src/components/atoms/Pill/Pill.types.ts +14 -18
- package/src/components/atoms/RadioButton/RadioButton.styles.ts +44 -43
- package/src/components/atoms/RadioButton/RadioButton.tsx +31 -31
- package/src/components/atoms/ResendLink/ResendLink.styles.tsx +19 -20
- package/src/components/atoms/ResendLink/ResendLink.tsx +21 -21
- package/src/components/atoms/ResendLink/ResendLink.types.ts +8 -9
- package/src/components/atoms/ResendLink/index.tsx +1 -2
- package/src/components/atoms/Select/Select.styles.ts +153 -149
- package/src/components/atoms/Select/Select.tsx +52 -43
- package/src/components/atoms/Select/index.tsx +1 -1
- package/src/components/atoms/Subtitle/Subtitle.tsx +7 -7
- package/src/components/atoms/Subtitle/Subtitle.types.ts +5 -5
- package/src/components/atoms/Subtitle/index.tsx +1 -1
- package/src/components/atoms/Switch/Switch.tsx +25 -25
- package/src/components/atoms/TabBar/TabBar.styles.tsx +64 -57
- package/src/components/atoms/TabBar/index.tsx +2 -2
- package/src/components/atoms/Text/Text.styles.tsx +35 -35
- package/src/components/atoms/Text/Text.tsx +32 -31
- package/src/components/atoms/Text/Text.types.ts +8 -8
- package/src/components/atoms/Text/index.ts +1 -1
- package/src/components/atoms/Textarea/Textarea.styles.ts +52 -52
- package/src/components/atoms/Textarea/Textarea.tsx +31 -31
- package/src/components/atoms/Title/Title.tsx +7 -7
- package/src/components/atoms/Title/Title.types.ts +5 -5
- package/src/components/atoms/Title/index.tsx +1 -1
- package/src/components/molecules/BannerAjuda/BannerAjuda.styles.tsx +9 -9
- package/src/components/molecules/BannerAjuda/BannerAjuda.tsx +18 -19
- package/src/components/molecules/BannerAjuda/index.tsx +1 -1
- package/src/components/molecules/ButtonGroup/ButtonGroup.styles.ts +10 -10
- package/src/components/molecules/ButtonGroup/ButtonGroup.types.ts +22 -22
- package/src/components/molecules/Calendar/Calendar.styles.ts +143 -143
- package/src/components/molecules/Calendar/Calendar.tsx +31 -31
- package/src/components/molecules/CodeInputContainer/CodeInputContainer.styles.tsx +7 -7
- package/src/components/molecules/CodeInputContainer/CodeInputContainer.types.ts +13 -13
- package/src/components/molecules/CodeInputContainer/index.tsx +1 -3
- package/src/components/molecules/ExcludeModal/ExcludeModal.styles.tsx +123 -118
- package/src/components/molecules/ExcludeModal/ExcludeModal.tsx +48 -48
- package/src/components/molecules/ExcludeModal/ExcludeModal.types.ts +10 -10
- package/src/components/molecules/ExcludeModal/index.tsx +1 -1
- package/src/components/molecules/FieldSelector/FieldSelector.styles.ts +59 -0
- package/src/components/molecules/FieldSelector/FieldSelector.tsx +167 -0
- package/src/components/molecules/HighlightsCard/HighlightsCard.styles.tsx +67 -68
- package/src/components/molecules/HighlightsCard/HighlightsCard.tsx +35 -26
- package/src/components/molecules/HighlightsCard/HighlightsCard.types.ts +10 -10
- package/src/components/molecules/HighlightsCard/index.tsx +1 -1
- package/src/components/molecules/InsuranceCard/InsuranceCard.styles.tsx +237 -237
- package/src/components/molecules/InsuranceCard/index.tsx +1 -1
- package/src/components/molecules/PieChartComponent/PieChartComponent.styles.tsx +7 -8
- package/src/components/molecules/PieChartComponent/PieChartComponent.tsx +70 -73
- package/src/components/molecules/PieChartComponent/PieChartComponent.types.ts +11 -11
- package/src/components/molecules/PieChartComponent/index.tsx +1 -1
- package/src/components/molecules/Popover/Popover.styles.ts +66 -65
- package/src/components/molecules/Popover/Popover.tsx +23 -23
- package/src/components/molecules/RadioBoxGroup/RadioBoxGroup.styles.ts +11 -11
- package/src/components/molecules/RadioBoxGroup/RadioBoxGroup.tsx +43 -43
- package/src/components/molecules/RadioGroupField/RadioGroupField.styles.tsx +65 -64
- package/src/components/molecules/RadioGroupField/RadioGroupField.tsx +69 -69
- package/src/components/molecules/RadioGroupField/RadioGroupField.types.ts +17 -17
- package/src/components/molecules/RadioGroupField/index.tsx +1 -1
- package/src/components/molecules/RefuseModal/RefuseModal.styles.tsx +139 -139
- package/src/components/molecules/RefuseModal/RefuseModal.tsx +92 -76
- package/src/components/molecules/RefuseModal/RefuseModal.types.ts +15 -15
- package/src/components/molecules/RefuseModal/index.tsx +2 -2
- package/src/components/molecules/ResultsChart/ResultsChart.tsx +23 -19
- package/src/components/molecules/ResultsChart/ResultsChart.types.ts +3 -3
- package/src/components/molecules/ResultsChart/index.tsx +2 -2
- package/src/components/molecules/TabToggle/TabToggle.styles.ts +54 -54
- package/src/components/molecules/TabToggle/TabToggle.tsx +35 -35
- package/src/components/organisms/AlertDialog/AlertDialog.styles.tsx +61 -61
- package/src/components/organisms/AlertDialog/AlertDialog.tsx +70 -70
- package/src/components/organisms/Dialog/Dialog.styles.ts +107 -106
- package/src/components/organisms/Dialog/Dialog.tsx +69 -69
- package/src/components/organisms/DonutEmissionsChart/DonutEmissionsChart.styles.tsx +113 -113
- package/src/components/organisms/DonutEmissionsChart/DonutEmissionsChart.tsx +75 -71
- package/src/components/organisms/DonutEmissionsChart/DonutEmissionsChart.types.ts +9 -9
- package/src/components/organisms/DonutEmissionsChart/index.tsx +5 -2
- package/src/components/organisms/ExportExcelModal/ExportExcelModal.styles.ts +59 -0
- package/src/components/organisms/ExportExcelModal/ExportExcelModal.tsx +80 -0
- package/src/components/organisms/Form/Form.styles.ts +35 -35
- package/src/components/organisms/Form/Form.tsx +160 -160
- package/src/components/organisms/ListagemUltimasEmissoes/ListagemUltimasEmissoes.styles.tsx +115 -114
- package/src/components/organisms/ListagemUltimasEmissoes/ListagemUltimasEmissoes.tsx +89 -89
- package/src/components/organisms/ListagemUltimasEmissoes/ListagemUltimasEmissoes.types.ts +16 -16
- package/src/components/organisms/ListagemUltimasEmissoes/index.tsx +1 -1
- package/src/components/organisms/Navbar/Navbar.styles.tsx +243 -243
- package/src/global.d.ts +9 -9
- package/src/index.ts +4 -0
- package/src/lib/utils.ts +6 -6
- package/src/styles/tokens/borders.ts +17 -17
- package/src/styles/tokens/index.tsx +6 -6
- package/src/styles/tokens/radius.ts +22 -22
- package/src/styles/tokens/shadows.ts +22 -22
- package/src/styles/tokens/sizes.ts +60 -64
- package/src/types/radius.types.ts +1 -1
- package/src/types/shadows.types.ts +1 -1
- package/src/utils/renderHighlightsCard.tsx +21 -0
|
@@ -1,237 +1,237 @@
|
|
|
1
|
-
/* eslint-disable react-refresh/only-export-components */
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
import { semanticColors } from '../../../styles/tokens';
|
|
4
|
-
import { StatusVariant } from './InsuranceCard.types';
|
|
5
|
-
|
|
6
|
-
export const PageContainer = styled.div`
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
gap: 16px;
|
|
10
|
-
max-width: 600px;
|
|
11
|
-
margin: 0 auto;
|
|
12
|
-
padding: 24px;
|
|
13
|
-
`;
|
|
14
|
-
|
|
15
|
-
export const Title = styled.h2`
|
|
16
|
-
font-size: 1.25rem;
|
|
17
|
-
font-weight: 600;
|
|
18
|
-
color: #2d3748;
|
|
19
|
-
`;
|
|
20
|
-
|
|
21
|
-
export const TabBar = styled.div`
|
|
22
|
-
display: flex;
|
|
23
|
-
gap: 12px;
|
|
24
|
-
`;
|
|
25
|
-
|
|
26
|
-
export const Tab = styled.button<{ active?: boolean }>`
|
|
27
|
-
padding: 8px 16px;
|
|
28
|
-
font-size: 0.875rem;
|
|
29
|
-
font-weight: 600;
|
|
30
|
-
border: none;
|
|
31
|
-
border-bottom: 2px solid transparent;
|
|
32
|
-
background: none;
|
|
33
|
-
cursor: pointer;
|
|
34
|
-
color: ${(props) =>
|
|
35
|
-
props.active ? semanticColors.branding.surface.enabled : '#718096'};
|
|
36
|
-
border-color: ${(props) =>
|
|
37
|
-
props.active ? semanticColors.branding.border.enabled : 'transparent'};
|
|
38
|
-
`;
|
|
39
|
-
|
|
40
|
-
export const ListContainer = styled.div`
|
|
41
|
-
display: flex;
|
|
42
|
-
flex-direction: column;
|
|
43
|
-
gap: 12px;
|
|
44
|
-
`;
|
|
45
|
-
|
|
46
|
-
export const CardContainer = styled.div<{ $variant: StatusVariant }>`
|
|
47
|
-
display: flex;
|
|
48
|
-
flex-direction: column;
|
|
49
|
-
justify-content: space-between;
|
|
50
|
-
width: 100%;
|
|
51
|
-
gap: 8px;
|
|
52
|
-
padding: 16px;
|
|
53
|
-
border-top: 4px solid ${(props) => variantColors[props.$variant]};
|
|
54
|
-
border-radius: 8px;
|
|
55
|
-
background-color: #fff;
|
|
56
|
-
`;
|
|
57
|
-
|
|
58
|
-
export const HeaderRow = styled.div`
|
|
59
|
-
display: flex;
|
|
60
|
-
align-items: center;
|
|
61
|
-
gap: 24px;
|
|
62
|
-
`;
|
|
63
|
-
|
|
64
|
-
export const BodyRow = styled.div`
|
|
65
|
-
display: flex;
|
|
66
|
-
gap: 24px;
|
|
67
|
-
justify-content: space-between;
|
|
68
|
-
|
|
69
|
-
@media (max-width: 768px) {
|
|
70
|
-
flex-direction: column;
|
|
71
|
-
gap: 16px;
|
|
72
|
-
}
|
|
73
|
-
`;
|
|
74
|
-
|
|
75
|
-
export const variantColors: Record<StatusVariant, string> = {
|
|
76
|
-
primary: semanticColors.global.border.feedback.info,
|
|
77
|
-
success: semanticColors.global.border.feedback.success,
|
|
78
|
-
warning: semanticColors.global.border.feedback.warning,
|
|
79
|
-
danger: semanticColors.global.border.feedback.error,
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
export const variantColorsText: Record<StatusVariant, string> = {
|
|
83
|
-
primary: semanticColors.global.text.onSurface.enabled,
|
|
84
|
-
success: semanticColors.global.text.feedback.success,
|
|
85
|
-
warning: semanticColors.global.text.feedback.warning,
|
|
86
|
-
danger: semanticColors.global.text.feedback.error,
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
export const Text = styled.span<{ $variant?: StatusVariant }>`
|
|
90
|
-
font-size: 10px;
|
|
91
|
-
color: ${(props) =>
|
|
92
|
-
props.$variant ? variantColors[props.$variant] : variantColorsText.primary};
|
|
93
|
-
`;
|
|
94
|
-
|
|
95
|
-
export const StatusBadge = styled.span<{ $variant: StatusVariant }>`
|
|
96
|
-
padding: 4px 8px;
|
|
97
|
-
font-size: 0.75rem;
|
|
98
|
-
font-weight: 600;
|
|
99
|
-
border-radius: 4px;
|
|
100
|
-
color: #fff;
|
|
101
|
-
background-color: ${(props) => variantColors[props.$variant]};
|
|
102
|
-
`;
|
|
103
|
-
export const InfoGroup = styled.div`
|
|
104
|
-
display: grid;
|
|
105
|
-
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
|
106
|
-
gap: 32px;
|
|
107
|
-
align-items: start;
|
|
108
|
-
width: 100%;
|
|
109
|
-
@media (max-width: 1200px) {
|
|
110
|
-
gap: 24px;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
@media (max-width: 768px) {
|
|
114
|
-
grid-template-columns: 1fr;
|
|
115
|
-
gap: 16px;
|
|
116
|
-
}
|
|
117
|
-
`;
|
|
118
|
-
|
|
119
|
-
export const InfoRow = styled.div`
|
|
120
|
-
display: flex;
|
|
121
|
-
width: 100%;
|
|
122
|
-
flex-direction: column;
|
|
123
|
-
justify-content: flex-start;
|
|
124
|
-
align-items: flex-start;
|
|
125
|
-
min-width: 0;
|
|
126
|
-
`;
|
|
127
|
-
|
|
128
|
-
export const InfoLabel = styled.span`
|
|
129
|
-
font-size: 12px;
|
|
130
|
-
color: #4a5568;
|
|
131
|
-
margin-bottom: 12px;
|
|
132
|
-
`;
|
|
133
|
-
|
|
134
|
-
export const InfoValue = styled.span`
|
|
135
|
-
font-size: 14px;
|
|
136
|
-
font-weight: 900;
|
|
137
|
-
color: #2d3748;
|
|
138
|
-
`;
|
|
139
|
-
|
|
140
|
-
export const TruncatedValue = styled(InfoValue)`
|
|
141
|
-
display: inline-block;
|
|
142
|
-
max-width: 100%;
|
|
143
|
-
overflow: hidden;
|
|
144
|
-
white-space: nowrap;
|
|
145
|
-
text-overflow: ellipsis;
|
|
146
|
-
`;
|
|
147
|
-
|
|
148
|
-
export const ProdValue = styled(InfoValue)`
|
|
149
|
-
display: inline-block;
|
|
150
|
-
max-width: 100%;
|
|
151
|
-
overflow: hidden;
|
|
152
|
-
white-space: nowrap;
|
|
153
|
-
text-overflow: ellipsis;
|
|
154
|
-
`;
|
|
155
|
-
|
|
156
|
-
export const ProcessValue = styled(InfoValue)`
|
|
157
|
-
display: inline-block;
|
|
158
|
-
max-width: 100%;
|
|
159
|
-
`;
|
|
160
|
-
|
|
161
|
-
export const InfoSubValue = styled.span`
|
|
162
|
-
font-size: 12px;
|
|
163
|
-
color: #2d3748;
|
|
164
|
-
line-height: 1.4;
|
|
165
|
-
`;
|
|
166
|
-
|
|
167
|
-
export const Actions = styled.div`
|
|
168
|
-
display: flex;
|
|
169
|
-
justify-content: flex-end;
|
|
170
|
-
`;
|
|
171
|
-
|
|
172
|
-
export const DropdownWrapper = styled.div`
|
|
173
|
-
position: relative;
|
|
174
|
-
`;
|
|
175
|
-
|
|
176
|
-
export const ActionButton = styled.button`
|
|
177
|
-
display: inline-flex;
|
|
178
|
-
justify-content: space-between;
|
|
179
|
-
min-width: 170px;
|
|
180
|
-
max-width: 100%;
|
|
181
|
-
align-items: center;
|
|
182
|
-
gap: 0.5rem;
|
|
183
|
-
padding: 8px 12px;
|
|
184
|
-
font-size: 0.875rem;
|
|
185
|
-
font-weight: 600;
|
|
186
|
-
border: none;
|
|
187
|
-
border-radius: 4px;
|
|
188
|
-
background-color: ${semanticColors.branding.border.enabled};
|
|
189
|
-
color: #fff;
|
|
190
|
-
cursor: pointer;
|
|
191
|
-
transition: opacity 0.2s;
|
|
192
|
-
|
|
193
|
-
@media (max-width: 768px) {
|
|
194
|
-
width: 100%;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
&:hover {
|
|
198
|
-
opacity: 0.9;
|
|
199
|
-
}
|
|
200
|
-
`;
|
|
201
|
-
|
|
202
|
-
export const DropdownMenu = styled.div`
|
|
203
|
-
position: absolute;
|
|
204
|
-
right: 0;
|
|
205
|
-
background-color: #fff;
|
|
206
|
-
border-radius: 4px;
|
|
207
|
-
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
|
208
|
-
display: grid;
|
|
209
|
-
gap: 4px;
|
|
210
|
-
padding: 8px 0;
|
|
211
|
-
width: 100%;
|
|
212
|
-
z-index: 10;
|
|
213
|
-
`;
|
|
214
|
-
|
|
215
|
-
export interface MenuItemProps {
|
|
216
|
-
icon: React.ReactNode;
|
|
217
|
-
danger?: boolean;
|
|
218
|
-
children: React.ReactNode;
|
|
219
|
-
onClick?: () => void;
|
|
220
|
-
id?: string;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
export const StyledMenuItem = styled.div<{ $danger?: boolean }>`
|
|
224
|
-
color: ${(props) =>
|
|
225
|
-
props.$danger ? semanticColors.danger.text.enabled : '#2d3748'};
|
|
226
|
-
display: inline-grid;
|
|
227
|
-
grid-auto-flow: column;
|
|
228
|
-
align-items: center;
|
|
229
|
-
justify-content: flex-start;
|
|
230
|
-
gap: 8px;
|
|
231
|
-
padding: 8px 12px;
|
|
232
|
-
font-size: 0.875rem;
|
|
233
|
-
cursor: pointer;
|
|
234
|
-
&:hover {
|
|
235
|
-
background-color: rgba(0, 0, 0, 0.05);
|
|
236
|
-
}
|
|
237
|
-
`;
|
|
1
|
+
/* eslint-disable react-refresh/only-export-components */
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { semanticColors } from '../../../styles/tokens';
|
|
4
|
+
import { StatusVariant } from './InsuranceCard.types';
|
|
5
|
+
|
|
6
|
+
export const PageContainer = styled.div`
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
gap: 16px;
|
|
10
|
+
max-width: 600px;
|
|
11
|
+
margin: 0 auto;
|
|
12
|
+
padding: 24px;
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
export const Title = styled.h2`
|
|
16
|
+
font-size: 1.25rem;
|
|
17
|
+
font-weight: 600;
|
|
18
|
+
color: #2d3748;
|
|
19
|
+
`;
|
|
20
|
+
|
|
21
|
+
export const TabBar = styled.div`
|
|
22
|
+
display: flex;
|
|
23
|
+
gap: 12px;
|
|
24
|
+
`;
|
|
25
|
+
|
|
26
|
+
export const Tab = styled.button<{ active?: boolean }>`
|
|
27
|
+
padding: 8px 16px;
|
|
28
|
+
font-size: 0.875rem;
|
|
29
|
+
font-weight: 600;
|
|
30
|
+
border: none;
|
|
31
|
+
border-bottom: 2px solid transparent;
|
|
32
|
+
background: none;
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
color: ${(props) =>
|
|
35
|
+
props.active ? semanticColors.branding.surface.enabled : '#718096'};
|
|
36
|
+
border-color: ${(props) =>
|
|
37
|
+
props.active ? semanticColors.branding.border.enabled : 'transparent'};
|
|
38
|
+
`;
|
|
39
|
+
|
|
40
|
+
export const ListContainer = styled.div`
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-direction: column;
|
|
43
|
+
gap: 12px;
|
|
44
|
+
`;
|
|
45
|
+
|
|
46
|
+
export const CardContainer = styled.div<{ $variant: StatusVariant }>`
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
justify-content: space-between;
|
|
50
|
+
width: 100%;
|
|
51
|
+
gap: 8px;
|
|
52
|
+
padding: 16px;
|
|
53
|
+
border-top: 4px solid ${(props) => variantColors[props.$variant]};
|
|
54
|
+
border-radius: 8px;
|
|
55
|
+
background-color: #fff;
|
|
56
|
+
`;
|
|
57
|
+
|
|
58
|
+
export const HeaderRow = styled.div`
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
gap: 24px;
|
|
62
|
+
`;
|
|
63
|
+
|
|
64
|
+
export const BodyRow = styled.div`
|
|
65
|
+
display: flex;
|
|
66
|
+
gap: 24px;
|
|
67
|
+
justify-content: space-between;
|
|
68
|
+
|
|
69
|
+
@media (max-width: 768px) {
|
|
70
|
+
flex-direction: column;
|
|
71
|
+
gap: 16px;
|
|
72
|
+
}
|
|
73
|
+
`;
|
|
74
|
+
|
|
75
|
+
export const variantColors: Record<StatusVariant, string> = {
|
|
76
|
+
primary: semanticColors.global.border.feedback.info,
|
|
77
|
+
success: semanticColors.global.border.feedback.success,
|
|
78
|
+
warning: semanticColors.global.border.feedback.warning,
|
|
79
|
+
danger: semanticColors.global.border.feedback.error,
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export const variantColorsText: Record<StatusVariant, string> = {
|
|
83
|
+
primary: semanticColors.global.text.onSurface.enabled,
|
|
84
|
+
success: semanticColors.global.text.feedback.success,
|
|
85
|
+
warning: semanticColors.global.text.feedback.warning,
|
|
86
|
+
danger: semanticColors.global.text.feedback.error,
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export const Text = styled.span<{ $variant?: StatusVariant }>`
|
|
90
|
+
font-size: 10px;
|
|
91
|
+
color: ${(props) =>
|
|
92
|
+
props.$variant ? variantColors[props.$variant] : variantColorsText.primary};
|
|
93
|
+
`;
|
|
94
|
+
|
|
95
|
+
export const StatusBadge = styled.span<{ $variant: StatusVariant }>`
|
|
96
|
+
padding: 4px 8px;
|
|
97
|
+
font-size: 0.75rem;
|
|
98
|
+
font-weight: 600;
|
|
99
|
+
border-radius: 4px;
|
|
100
|
+
color: #fff;
|
|
101
|
+
background-color: ${(props) => variantColors[props.$variant]};
|
|
102
|
+
`;
|
|
103
|
+
export const InfoGroup = styled.div`
|
|
104
|
+
display: grid;
|
|
105
|
+
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
|
106
|
+
gap: 32px;
|
|
107
|
+
align-items: start;
|
|
108
|
+
width: 100%;
|
|
109
|
+
@media (max-width: 1200px) {
|
|
110
|
+
gap: 24px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@media (max-width: 768px) {
|
|
114
|
+
grid-template-columns: 1fr;
|
|
115
|
+
gap: 16px;
|
|
116
|
+
}
|
|
117
|
+
`;
|
|
118
|
+
|
|
119
|
+
export const InfoRow = styled.div`
|
|
120
|
+
display: flex;
|
|
121
|
+
width: 100%;
|
|
122
|
+
flex-direction: column;
|
|
123
|
+
justify-content: flex-start;
|
|
124
|
+
align-items: flex-start;
|
|
125
|
+
min-width: 0;
|
|
126
|
+
`;
|
|
127
|
+
|
|
128
|
+
export const InfoLabel = styled.span`
|
|
129
|
+
font-size: 12px;
|
|
130
|
+
color: #4a5568;
|
|
131
|
+
margin-bottom: 12px;
|
|
132
|
+
`;
|
|
133
|
+
|
|
134
|
+
export const InfoValue = styled.span`
|
|
135
|
+
font-size: 14px;
|
|
136
|
+
font-weight: 900;
|
|
137
|
+
color: #2d3748;
|
|
138
|
+
`;
|
|
139
|
+
|
|
140
|
+
export const TruncatedValue = styled(InfoValue)`
|
|
141
|
+
display: inline-block;
|
|
142
|
+
max-width: 100%;
|
|
143
|
+
overflow: hidden;
|
|
144
|
+
white-space: nowrap;
|
|
145
|
+
text-overflow: ellipsis;
|
|
146
|
+
`;
|
|
147
|
+
|
|
148
|
+
export const ProdValue = styled(InfoValue)`
|
|
149
|
+
display: inline-block;
|
|
150
|
+
max-width: 100%;
|
|
151
|
+
overflow: hidden;
|
|
152
|
+
white-space: nowrap;
|
|
153
|
+
text-overflow: ellipsis;
|
|
154
|
+
`;
|
|
155
|
+
|
|
156
|
+
export const ProcessValue = styled(InfoValue)`
|
|
157
|
+
display: inline-block;
|
|
158
|
+
max-width: 100%;
|
|
159
|
+
`;
|
|
160
|
+
|
|
161
|
+
export const InfoSubValue = styled.span`
|
|
162
|
+
font-size: 12px;
|
|
163
|
+
color: #2d3748;
|
|
164
|
+
line-height: 1.4;
|
|
165
|
+
`;
|
|
166
|
+
|
|
167
|
+
export const Actions = styled.div`
|
|
168
|
+
display: flex;
|
|
169
|
+
justify-content: flex-end;
|
|
170
|
+
`;
|
|
171
|
+
|
|
172
|
+
export const DropdownWrapper = styled.div`
|
|
173
|
+
position: relative;
|
|
174
|
+
`;
|
|
175
|
+
|
|
176
|
+
export const ActionButton = styled.button`
|
|
177
|
+
display: inline-flex;
|
|
178
|
+
justify-content: space-between;
|
|
179
|
+
min-width: 170px;
|
|
180
|
+
max-width: 100%;
|
|
181
|
+
align-items: center;
|
|
182
|
+
gap: 0.5rem;
|
|
183
|
+
padding: 8px 12px;
|
|
184
|
+
font-size: 0.875rem;
|
|
185
|
+
font-weight: 600;
|
|
186
|
+
border: none;
|
|
187
|
+
border-radius: 4px;
|
|
188
|
+
background-color: ${semanticColors.branding.border.enabled};
|
|
189
|
+
color: #fff;
|
|
190
|
+
cursor: pointer;
|
|
191
|
+
transition: opacity 0.2s;
|
|
192
|
+
|
|
193
|
+
@media (max-width: 768px) {
|
|
194
|
+
width: 100%;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
&:hover {
|
|
198
|
+
opacity: 0.9;
|
|
199
|
+
}
|
|
200
|
+
`;
|
|
201
|
+
|
|
202
|
+
export const DropdownMenu = styled.div`
|
|
203
|
+
position: absolute;
|
|
204
|
+
right: 0;
|
|
205
|
+
background-color: #fff;
|
|
206
|
+
border-radius: 4px;
|
|
207
|
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
|
208
|
+
display: grid;
|
|
209
|
+
gap: 4px;
|
|
210
|
+
padding: 8px 0;
|
|
211
|
+
width: 100%;
|
|
212
|
+
z-index: 10;
|
|
213
|
+
`;
|
|
214
|
+
|
|
215
|
+
export interface MenuItemProps {
|
|
216
|
+
icon: React.ReactNode;
|
|
217
|
+
danger?: boolean;
|
|
218
|
+
children: React.ReactNode;
|
|
219
|
+
onClick?: () => void;
|
|
220
|
+
id?: string;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export const StyledMenuItem = styled.div<{ $danger?: boolean }>`
|
|
224
|
+
color: ${(props) =>
|
|
225
|
+
props.$danger ? semanticColors.danger.text.enabled : '#2d3748'};
|
|
226
|
+
display: inline-grid;
|
|
227
|
+
grid-auto-flow: column;
|
|
228
|
+
align-items: center;
|
|
229
|
+
justify-content: flex-start;
|
|
230
|
+
gap: 8px;
|
|
231
|
+
padding: 8px 12px;
|
|
232
|
+
font-size: 0.875rem;
|
|
233
|
+
cursor: pointer;
|
|
234
|
+
&:hover {
|
|
235
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
236
|
+
}
|
|
237
|
+
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { InsuranceCard } from
|
|
1
|
+
export { InsuranceCard } from './InsuranceCard';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
|
|
3
|
-
export const StyledPieChart = styled.div`
|
|
4
|
-
.recharts-wrapper {
|
|
5
|
-
margin: auto;
|
|
6
|
-
}
|
|
7
|
-
`;
|
|
8
|
-
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
export const StyledPieChart = styled.div`
|
|
4
|
+
.recharts-wrapper {
|
|
5
|
+
margin: auto;
|
|
6
|
+
}
|
|
7
|
+
`;
|
|
@@ -1,73 +1,70 @@
|
|
|
1
|
-
import { useMemo } from
|
|
2
|
-
import { PieChart, Pie, Label, Tooltip } from
|
|
3
|
-
import { StyledPieChart } from
|
|
4
|
-
import { PieChartComponentProps } from
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
{
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
export { PieChartComponent };
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { PieChart, Pie, Label, Tooltip } from 'recharts';
|
|
3
|
+
import { StyledPieChart } from './PieChartComponent.styles';
|
|
4
|
+
import { PieChartComponentProps } from './PieChartComponent.types';
|
|
5
|
+
import { semanticColors, typographyTokens } from '../../../styles/tokens';
|
|
6
|
+
|
|
7
|
+
const PieChartComponent = ({ data }: PieChartComponentProps) => {
|
|
8
|
+
const totalEmissoes = useMemo(
|
|
9
|
+
() => data.reduce((acc, curr) => acc + curr.value, 0),
|
|
10
|
+
[data]
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<StyledPieChart>
|
|
15
|
+
<PieChart width={155} height={155}>
|
|
16
|
+
<Tooltip cursor={false} />
|
|
17
|
+
<Pie
|
|
18
|
+
data={data}
|
|
19
|
+
dataKey="value"
|
|
20
|
+
nameKey="name"
|
|
21
|
+
innerRadius={52}
|
|
22
|
+
outerRadius={62}
|
|
23
|
+
stroke="none"
|
|
24
|
+
paddingAngle={2}
|
|
25
|
+
>
|
|
26
|
+
<Label
|
|
27
|
+
content={({ viewBox }) => {
|
|
28
|
+
if (viewBox && 'cx' in viewBox && 'cy' in viewBox) {
|
|
29
|
+
const { cx, cy } = viewBox;
|
|
30
|
+
return (
|
|
31
|
+
<text
|
|
32
|
+
x={cx}
|
|
33
|
+
y={cy}
|
|
34
|
+
textAnchor="middle"
|
|
35
|
+
dominantBaseline="middle"
|
|
36
|
+
>
|
|
37
|
+
<tspan
|
|
38
|
+
x={cx}
|
|
39
|
+
y={(cy ?? 0) - 8}
|
|
40
|
+
style={{
|
|
41
|
+
fontSize: typographyTokens.fontSizes.displayL,
|
|
42
|
+
fontWeight: typographyTokens.fontWeights.bold,
|
|
43
|
+
fill: semanticColors.base.text,
|
|
44
|
+
}}
|
|
45
|
+
>
|
|
46
|
+
{totalEmissoes}
|
|
47
|
+
</tspan>
|
|
48
|
+
<tspan
|
|
49
|
+
x={cx}
|
|
50
|
+
y={(cy ?? 0) + 16}
|
|
51
|
+
style={{
|
|
52
|
+
fontSize: typographyTokens.fontSizes.bodyS,
|
|
53
|
+
fill: semanticColors.base.text,
|
|
54
|
+
}}
|
|
55
|
+
>
|
|
56
|
+
emissões
|
|
57
|
+
</tspan>
|
|
58
|
+
</text>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
return null;
|
|
62
|
+
}}
|
|
63
|
+
/>
|
|
64
|
+
</Pie>
|
|
65
|
+
</PieChart>
|
|
66
|
+
</StyledPieChart>
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export { PieChartComponent };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export interface PieChartData {
|
|
2
|
-
name: string;
|
|
3
|
-
value: number;
|
|
4
|
-
fill: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface PieChartComponentProps {
|
|
10
|
-
data: PieChartData[];
|
|
11
|
-
}
|
|
1
|
+
export interface PieChartData {
|
|
2
|
+
name: string;
|
|
3
|
+
value: number;
|
|
4
|
+
fill: string;
|
|
5
|
+
|
|
6
|
+
[key: string]: string | number;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface PieChartComponentProps {
|
|
10
|
+
data: PieChartData[];
|
|
11
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { PieChartComponent } from
|
|
1
|
+
export { PieChartComponent } from './PieChartComponent';
|