wca-designsystem 1.0.26 → 1.0.28
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/MosaicoCritica/MosaicoCritica.stories.tsx +5 -0
- package/src/components/molecules/MosaicoCritica/index.tsx +50 -33
- package/src/components/organismos/Tabela/SkeletonTable.tsx +1 -1
- package/src/components/organismos/Tabela/Tabela.stories.tsx +2 -1
- package/src/components/organismos/Tabela/styles.ts +4 -3
- package/src/styles/theme.ts +1 -0
package/package.json
CHANGED
|
@@ -17,6 +17,11 @@ const props = {
|
|
|
17
17
|
critica: '122333.0',
|
|
18
18
|
absorcao: '221444.0',
|
|
19
19
|
desdobramento: '12011112233330.0',
|
|
20
|
+
mensagens: [
|
|
21
|
+
'Fora do período da Agenda',
|
|
22
|
+
'Período Crítico deve estar liberado e executando',
|
|
23
|
+
],
|
|
24
|
+
podeExecutar: false,
|
|
20
25
|
};
|
|
21
26
|
|
|
22
27
|
const Template: any = (args: any) => (
|
|
@@ -5,6 +5,7 @@ import { Box, Flex } from '@mantine/core';
|
|
|
5
5
|
import IconeBotao from '../../atomos/IconeBotao';
|
|
6
6
|
import Icone from '../../atomos/Icone';
|
|
7
7
|
import alocar from '../../../assets/imagens/icons/Mais.svg';
|
|
8
|
+
import ajuda from '../../../assets/imagens/icons/Ajuda.svg';
|
|
8
9
|
import retirar from '../../../assets/imagens/icons/Menos.svg';
|
|
9
10
|
|
|
10
11
|
interface MosaicoCriticaProps {
|
|
@@ -12,8 +13,10 @@ interface MosaicoCriticaProps {
|
|
|
12
13
|
nome?: string;
|
|
13
14
|
saldo?: string;
|
|
14
15
|
media?: string;
|
|
15
|
-
absorcao?: string;
|
|
16
16
|
critica?: string;
|
|
17
|
+
mensagens?: string[];
|
|
18
|
+
absorcao?: string;
|
|
19
|
+
podeExecutar?: boolean;
|
|
17
20
|
desdobramento?: string;
|
|
18
21
|
disabledAlocar?: boolean;
|
|
19
22
|
disabledRetirar?: boolean;
|
|
@@ -27,11 +30,13 @@ const MosaicoCritica = ({
|
|
|
27
30
|
media,
|
|
28
31
|
critica,
|
|
29
32
|
absorcao,
|
|
33
|
+
mensagens,
|
|
30
34
|
desdobramento,
|
|
31
|
-
disabledAlocar,
|
|
32
|
-
disabledRetirar,
|
|
33
35
|
onClickAlocar,
|
|
34
36
|
onClickRetirar,
|
|
37
|
+
disabledAlocar,
|
|
38
|
+
disabledRetirar,
|
|
39
|
+
podeExecutar = true,
|
|
35
40
|
color = theme.colors.purpleSec,
|
|
36
41
|
}: MosaicoCriticaProps) => {
|
|
37
42
|
return (
|
|
@@ -73,39 +78,51 @@ const MosaicoCritica = ({
|
|
|
73
78
|
</Box>
|
|
74
79
|
|
|
75
80
|
<Box>
|
|
76
|
-
|
|
77
|
-
<
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
>
|
|
84
|
-
<Icone
|
|
81
|
+
{podeExecutar ? (
|
|
82
|
+
<Flex gap={10}>
|
|
83
|
+
<IconeBotao
|
|
84
|
+
toolTipInfo="Alocar"
|
|
85
|
+
tipo="table"
|
|
86
|
+
color={color}
|
|
87
|
+
onClick={onClickAlocar}
|
|
85
88
|
disabled={disabledAlocar}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
>
|
|
90
|
+
<Icone
|
|
91
|
+
disabled={disabledAlocar}
|
|
92
|
+
svg={alocar}
|
|
93
|
+
fill={color}
|
|
94
|
+
width={14}
|
|
95
|
+
height={14}
|
|
96
|
+
/>
|
|
97
|
+
</IconeBotao>
|
|
92
98
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
disabled={disabledRetirar}
|
|
99
|
-
>
|
|
100
|
-
<Icone
|
|
99
|
+
<IconeBotao
|
|
100
|
+
toolTipInfo="Retirar"
|
|
101
|
+
tipo="table"
|
|
102
|
+
color={color}
|
|
103
|
+
onClick={onClickRetirar}
|
|
101
104
|
disabled={disabledRetirar}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
>
|
|
106
|
+
<Icone
|
|
107
|
+
disabled={disabledRetirar}
|
|
108
|
+
svg={retirar}
|
|
109
|
+
fill={color}
|
|
110
|
+
width={14}
|
|
111
|
+
height={14}
|
|
112
|
+
/>
|
|
113
|
+
</IconeBotao>
|
|
114
|
+
</Flex>
|
|
115
|
+
) : (
|
|
116
|
+
mensagens?.length !== 0 && (
|
|
117
|
+
<IconeBotao
|
|
118
|
+
toolTipInfo={mensagens!.map(m => `• ${m}`).join('\n')}
|
|
119
|
+
tipo="round"
|
|
120
|
+
color={theme.colors.gray[300]}
|
|
121
|
+
>
|
|
122
|
+
<Icone svg={ajuda} fill={color} width={14} height={14} />
|
|
123
|
+
</IconeBotao>
|
|
124
|
+
)
|
|
125
|
+
)}
|
|
109
126
|
</Box>
|
|
110
127
|
</Flex>
|
|
111
128
|
</S.MosaicoCriticaContainer>
|
|
@@ -67,10 +67,11 @@ const Template: any = (args: any) => (
|
|
|
67
67
|
export const TabelaProps = Template.bind({});
|
|
68
68
|
|
|
69
69
|
TabelaProps.args = {
|
|
70
|
-
data:
|
|
70
|
+
data: [],
|
|
71
71
|
footer: footer,
|
|
72
72
|
hasExpand: false,
|
|
73
73
|
hasSelect: false,
|
|
74
|
+
isLoading: true,
|
|
74
75
|
acoesChildren: (row: any): JSX.Element => (
|
|
75
76
|
<>
|
|
76
77
|
<Botao onClick={() => console.log(row)} tipo={'table'} children={'▶'} />
|
|
@@ -34,7 +34,6 @@ export const StyledTable = styled.table`
|
|
|
34
34
|
th,
|
|
35
35
|
td {
|
|
36
36
|
border-bottom: 1px solid ${theme.colors.gray['300']};
|
|
37
|
-
font-size: ${theme.sizes.meddium};
|
|
38
37
|
}
|
|
39
38
|
|
|
40
39
|
th {
|
|
@@ -50,7 +49,9 @@ export const StyledTable = styled.table`
|
|
|
50
49
|
background-color: ${theme.colors.gray['700']};
|
|
51
50
|
}
|
|
52
51
|
|
|
53
|
-
tr:hover:has(h2)
|
|
52
|
+
tr:hover:has(h2),
|
|
53
|
+
tr:hover:has(.mantine-Loader-root),
|
|
54
|
+
tfoot tr:hover {
|
|
54
55
|
background-color: unset;
|
|
55
56
|
}
|
|
56
57
|
|
|
@@ -278,6 +279,6 @@ export const FooterRow = styled.tr`
|
|
|
278
279
|
|
|
279
280
|
export const FooterCell = styled.td<{ tdMinWidth: string; color?: string }>`
|
|
280
281
|
min-width: ${({ tdMinWidth }) => tdMinWidth};
|
|
281
|
-
padding:
|
|
282
|
+
padding: 5px;
|
|
282
283
|
border-top: 1px solid ${({ theme }) => theme.colors.gray[500]};
|
|
283
284
|
`;
|