wca-designsystem 0.0.59 → 0.0.61
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/atomos/BarraDeProgresso/BarraDeProgresso.stories.tsx +1 -0
- package/src/components/atomos/BarraDeProgresso/index.tsx +3 -1
- package/src/components/molecules/CardDestaque/index.tsx +10 -2
- package/src/components/molecules/Passos/Passos.stories.tsx +1 -1
- package/src/components/molecules/Passos/index.tsx +16 -13
- package/src/components/molecules/Passos/styles.ts +11 -2
- package/src/components/organismos/Tabela/body.tsx +1 -1
- package/src/components/organismos/Tabela/index.tsx +2 -2
- package/src/components/organismos/Tabela/styles.ts +3 -6
package/package.json
CHANGED
|
@@ -4,6 +4,7 @@ import { Progress, ProgressSectionProps } from '@mantine/core';
|
|
|
4
4
|
|
|
5
5
|
export interface BarraDeProgressoProps extends ProgressSectionProps {
|
|
6
6
|
duracao: number;
|
|
7
|
+
label: string;
|
|
7
8
|
height?: string;
|
|
8
9
|
animated?: boolean;
|
|
9
10
|
}
|
|
@@ -12,6 +13,7 @@ const BarraDeProgresso = ({
|
|
|
12
13
|
duracao,
|
|
13
14
|
animated = false,
|
|
14
15
|
height,
|
|
16
|
+
label,
|
|
15
17
|
...props
|
|
16
18
|
}: BarraDeProgressoProps) => {
|
|
17
19
|
return (
|
|
@@ -26,7 +28,7 @@ const BarraDeProgresso = ({
|
|
|
26
28
|
data-testid="progress-section"
|
|
27
29
|
animated={animated}
|
|
28
30
|
>
|
|
29
|
-
<Progress.Label>
|
|
31
|
+
<Progress.Label>{label}</Progress.Label>
|
|
30
32
|
</Progress.Section>
|
|
31
33
|
</S.BarraDeProgressoContainer>
|
|
32
34
|
);
|
|
@@ -53,7 +53,11 @@ function CardDestaque({
|
|
|
53
53
|
<S.CardDestaqueCabecalho>
|
|
54
54
|
<h3>{titulo}</h3>
|
|
55
55
|
<div className="botoes">
|
|
56
|
-
<IconeBotao
|
|
56
|
+
<IconeBotao
|
|
57
|
+
tipo="table"
|
|
58
|
+
toolTipInfo="Download"
|
|
59
|
+
color={theme.colors.gray['300']}
|
|
60
|
+
>
|
|
57
61
|
<Icone
|
|
58
62
|
svg={download}
|
|
59
63
|
fill={theme.colors.blue}
|
|
@@ -62,7 +66,11 @@ function CardDestaque({
|
|
|
62
66
|
/>
|
|
63
67
|
</IconeBotao>
|
|
64
68
|
|
|
65
|
-
<IconeBotao
|
|
69
|
+
<IconeBotao
|
|
70
|
+
toolTipInfo="Upload"
|
|
71
|
+
tipo="table"
|
|
72
|
+
color={theme.colors.gray['300']}
|
|
73
|
+
>
|
|
66
74
|
<Icone
|
|
67
75
|
svg={upload}
|
|
68
76
|
fill={theme.colors.blue}
|
|
@@ -11,7 +11,7 @@ export default {
|
|
|
11
11
|
// const [passo, setPasso] = useState(1);
|
|
12
12
|
const passos: PassoProps[] = [
|
|
13
13
|
{
|
|
14
|
-
titulo: 'Execução do Desdobramento',
|
|
14
|
+
titulo: 'Execução do Desdobramento adasdasdasdasdasdasdasd',
|
|
15
15
|
subTitulo: 'Duas linhas de resumo sobre este passo.',
|
|
16
16
|
id: 0,
|
|
17
17
|
desabilitado: false,
|
|
@@ -8,6 +8,7 @@ import flexa from '../../../assets/imagens/icons/FlexaPassos.svg';
|
|
|
8
8
|
import { theme } from '../../../styles/theme';
|
|
9
9
|
import { useCallback, useMemo, useRef } from 'react';
|
|
10
10
|
import Botao from '../../atomos/Botao';
|
|
11
|
+
import HoverPopUp from '../../atomos/HoverPopUp';
|
|
11
12
|
|
|
12
13
|
export type PassoProps = {
|
|
13
14
|
titulo: string;
|
|
@@ -85,27 +86,29 @@ function Passos({
|
|
|
85
86
|
</ActionIcon>
|
|
86
87
|
</S.BotaoEsquerda>
|
|
87
88
|
<S.PassoSteep {...props} color={color} active={passo}>
|
|
88
|
-
{passos?.map(passoMap => (
|
|
89
|
+
{passos?.map((passoMap, index) => (
|
|
89
90
|
<Stepper.Step
|
|
91
|
+
key={index}
|
|
90
92
|
completedIcon={<>{passoMap.id + 1}</>}
|
|
91
93
|
disabled={passoMap.desabilitado}
|
|
92
|
-
key={passoMap.id}
|
|
93
94
|
className={steepClasseChanger(
|
|
94
95
|
passoMap.id,
|
|
95
96
|
passoMap?.desabilitado!
|
|
96
97
|
)}
|
|
97
98
|
label={
|
|
98
|
-
<
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
99
|
+
<HoverPopUp texto={passoMap.titulo} key={passoMap.id}>
|
|
100
|
+
<h2
|
|
101
|
+
className={passo === passoMap.id ? 'label-fixo' : ''}
|
|
102
|
+
style={{
|
|
103
|
+
color:
|
|
104
|
+
passo === passoMap.id
|
|
105
|
+
? theme.colors.blackSti
|
|
106
|
+
: theme.colors.gray['700'],
|
|
107
|
+
}}
|
|
108
|
+
>
|
|
109
|
+
{passoMap.titulo}
|
|
110
|
+
</h2>
|
|
111
|
+
</HoverPopUp>
|
|
109
112
|
}
|
|
110
113
|
description={
|
|
111
114
|
passoMap.id === passo ? (
|
|
@@ -107,11 +107,17 @@ export const PassoSteep = styled(Stepper)<PassosWrapperProps>`
|
|
|
107
107
|
.sub-titulo {
|
|
108
108
|
display: flex;
|
|
109
109
|
align-items: end;
|
|
110
|
+
|
|
110
111
|
p {
|
|
111
112
|
font-size: ${theme.sizes.xSmall};
|
|
112
113
|
color: ${theme.colors.gray['500']};
|
|
113
114
|
width: 128px;
|
|
114
115
|
font-weight: light;
|
|
116
|
+
text-overflow: ellipsis;
|
|
117
|
+
overflow: hidden;
|
|
118
|
+
-webkit-line-clamp: 3;
|
|
119
|
+
display: -webkit-box;
|
|
120
|
+
-webkit-box-orient: vertical;
|
|
115
121
|
}
|
|
116
122
|
}
|
|
117
123
|
|
|
@@ -138,9 +144,12 @@ export const PassoSteep = styled(Stepper)<PassosWrapperProps>`
|
|
|
138
144
|
h2 {
|
|
139
145
|
font-size: ${theme.sizes.large};
|
|
140
146
|
color: ${theme.colors.gray['700']};
|
|
141
|
-
line-height: 16px;
|
|
142
147
|
font-weight: 700;
|
|
143
|
-
|
|
148
|
+
text-overflow: ellipsis;
|
|
149
|
+
overflow: hidden;
|
|
150
|
+
-webkit-line-clamp: 2;
|
|
151
|
+
display: -webkit-box;
|
|
152
|
+
-webkit-box-orient: vertical;
|
|
144
153
|
}
|
|
145
154
|
|
|
146
155
|
.label-fixo {
|
|
@@ -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(
|
|
@@ -116,7 +116,7 @@ const Tabela = <T extends { id: string | number; children: Array<T> }>({
|
|
|
116
116
|
useEffect(() => {
|
|
117
117
|
const topScroll = topScrollRef.current;
|
|
118
118
|
const bottomScroll = bottomScrollRef.current;
|
|
119
|
-
const tabela =
|
|
119
|
+
const tabela = tabelaRef.current;
|
|
120
120
|
|
|
121
121
|
if (topScroll && bottomScroll) {
|
|
122
122
|
const onTopScroll = () => {
|
|
@@ -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
|
`;
|