wca-designsystem 0.0.60 → 0.0.62
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/package.json +1 -1
- package/src/components/molecules/CardDestaque/CardDestaque.stories.tsx +2 -0
- package/src/components/molecules/CardDestaque/index.tsx +6 -0
- package/src/components/molecules/Passos/index.tsx +2 -1
- package/src/components/organismos/Tabela/body.tsx +1 -1
- package/src/components/organismos/Tabela/index.tsx +1 -1
- package/src/components/organismos/Tabela/styles.ts +3 -6
package/package.json
CHANGED
|
@@ -15,6 +15,8 @@ const props: CardDestaqueProps = {
|
|
|
15
15
|
ultimaExec: '33/33/3333 99:99:99',
|
|
16
16
|
status: 'exec',
|
|
17
17
|
verLogProcesso: () => console.log('aqui'),
|
|
18
|
+
onClickDownload: () => console.log('download'),
|
|
19
|
+
onClickUpload: () => console.log('upload'),
|
|
18
20
|
};
|
|
19
21
|
|
|
20
22
|
const Template: any = (args: CardDestaqueProps) => (
|
|
@@ -16,12 +16,16 @@ export type CardDestaqueProps = {
|
|
|
16
16
|
qtdErros: number;
|
|
17
17
|
status: 'error' | 'success' | 'exec';
|
|
18
18
|
verLogProcesso: () => void;
|
|
19
|
+
onClickDownload?: () => void;
|
|
20
|
+
onClickUpload?: () => void;
|
|
19
21
|
};
|
|
20
22
|
|
|
21
23
|
function CardDestaque({
|
|
22
24
|
porcentagem,
|
|
23
25
|
titulo,
|
|
24
26
|
qtdErros,
|
|
27
|
+
onClickDownload,
|
|
28
|
+
onClickUpload,
|
|
25
29
|
status,
|
|
26
30
|
verLogProcesso,
|
|
27
31
|
qtdLinhas,
|
|
@@ -57,6 +61,7 @@ function CardDestaque({
|
|
|
57
61
|
tipo="table"
|
|
58
62
|
toolTipInfo="Download"
|
|
59
63
|
color={theme.colors.gray['300']}
|
|
64
|
+
onClick={onClickDownload!}
|
|
60
65
|
>
|
|
61
66
|
<Icone
|
|
62
67
|
svg={download}
|
|
@@ -70,6 +75,7 @@ function CardDestaque({
|
|
|
70
75
|
toolTipInfo="Upload"
|
|
71
76
|
tipo="table"
|
|
72
77
|
color={theme.colors.gray['300']}
|
|
78
|
+
onClick={onClickUpload!}
|
|
73
79
|
>
|
|
74
80
|
<Icone
|
|
75
81
|
svg={upload}
|
|
@@ -86,8 +86,9 @@ function Passos({
|
|
|
86
86
|
</ActionIcon>
|
|
87
87
|
</S.BotaoEsquerda>
|
|
88
88
|
<S.PassoSteep {...props} color={color} active={passo}>
|
|
89
|
-
{passos?.map(passoMap => (
|
|
89
|
+
{passos?.map((passoMap, index) => (
|
|
90
90
|
<Stepper.Step
|
|
91
|
+
key={index}
|
|
91
92
|
completedIcon={<>{passoMap.id + 1}</>}
|
|
92
93
|
disabled={passoMap.desabilitado}
|
|
93
94
|
className={steepClasseChanger(
|
|
@@ -216,7 +216,7 @@ function BodyTable<T extends { id: string | number; children: Array<T> }>(
|
|
|
216
216
|
<S.TabelaBody
|
|
217
217
|
ref={tableBodyRef}
|
|
218
218
|
color={color}
|
|
219
|
-
|
|
219
|
+
style={{ left: `${hasSelect ? '53px' : '0px'}` }}
|
|
220
220
|
>
|
|
221
221
|
{data.flatMap(item =>
|
|
222
222
|
renderRows(
|
|
@@ -160,7 +160,7 @@ const Tabela = <T extends { id: string | number; children: Array<T> }>({
|
|
|
160
160
|
/>
|
|
161
161
|
{/* Scroll horizontal no topo */}
|
|
162
162
|
<S.ScrollWrapper ref={topScrollRef}>
|
|
163
|
-
<S.FakeTable
|
|
163
|
+
<S.FakeTable style={{ width: `${tamScroll}px` }} />
|
|
164
164
|
</S.ScrollWrapper>
|
|
165
165
|
<S.TableContainer ref={bottomScrollRef}>
|
|
166
166
|
<S.StyledTable ref={tabelaRef}>
|
|
@@ -4,7 +4,6 @@ import { Pagination } from '@mantine/core';
|
|
|
4
4
|
type ColorsProp = {
|
|
5
5
|
color?: string;
|
|
6
6
|
headerSelection?: Array<String>;
|
|
7
|
-
hasselect?: string;
|
|
8
7
|
tdMinWidth?: string;
|
|
9
8
|
};
|
|
10
9
|
|
|
@@ -101,7 +100,7 @@ export const TabelaHeader = styled.thead<ColorsProp>`
|
|
|
101
100
|
`;
|
|
102
101
|
|
|
103
102
|
export const TabelaBody = styled.tbody<ColorsProp>`
|
|
104
|
-
${({ theme, color
|
|
103
|
+
${({ theme, color }) => css`
|
|
105
104
|
min-height: 100vh; /* Garante altura mínima igual à altura da viewport */
|
|
106
105
|
width: 100%;
|
|
107
106
|
|
|
@@ -114,7 +113,6 @@ export const TabelaBody = styled.tbody<ColorsProp>`
|
|
|
114
113
|
.expand {
|
|
115
114
|
position: relative;
|
|
116
115
|
width: 50px;
|
|
117
|
-
left: ${hasselect === 'true' ? '53px' : '0px'};
|
|
118
116
|
background-color: ${color};
|
|
119
117
|
display: flex;
|
|
120
118
|
align-items: center;
|
|
@@ -241,7 +239,6 @@ export const ScrollWrapper = styled.div`
|
|
|
241
239
|
margin-bottom: -15px;
|
|
242
240
|
`;
|
|
243
241
|
|
|
244
|
-
export const FakeTable = styled.div
|
|
245
|
-
|
|
246
|
-
height: 1px; /* Apenas para criar a barra de rolagem */
|
|
242
|
+
export const FakeTable = styled.div`
|
|
243
|
+
height: 1px;
|
|
247
244
|
`;
|