wca-designsystem 1.0.31 → 1.0.33

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.31",
2
+ "version": "1.0.33",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -6,7 +6,7 @@ import proximo from '../../../assets/imagens/icons/NavDireita.svg';
6
6
  import anterior from '../../../assets/imagens/icons/NavEsquerda.svg';
7
7
  import flexa from '../../../assets/imagens/icons/FlexaPassos.svg';
8
8
  import { theme } from '../../../styles/theme';
9
- import { useCallback, useMemo, useRef } from 'react';
9
+ import { useCallback, useRef } from 'react';
10
10
  import Botao from '../../atomos/Botao';
11
11
  import HoverPopUp from '../../atomos/HoverPopUp';
12
12
  import ajuda from '../../../assets/imagens/icons/Ajuda.svg';
@@ -52,10 +52,7 @@ function Passos({
52
52
  }: PassosProps) {
53
53
  const carrouselRef = useRef<HTMLDivElement>(null);
54
54
 
55
- const passoInfos = useMemo(
56
- () => passos.filter(passoFilter => passoFilter.id === passo)[0],
57
- [passo]
58
- );
55
+ const passoInfos = passos.filter(passoFilter => passoFilter.id === passo)[0];
59
56
 
60
57
  /* const verificaProximoPasso = useCallback((passo: number) => {
61
58
  return passos[passo + 1]?.desabilitado === true;
@@ -171,27 +168,29 @@ function Passos({
171
168
  </S.PassosContainer>
172
169
  <S.PassoInfos color={color}>
173
170
  <div className="infosWrapper">
174
- <div className="infos">
175
- <p>Você está no Passo {passo + 1}:</p>
176
- <h3>{passoInfos?.titulo}</h3>
177
- <p className="preto">{passoInfos?.subTitulo}</p>
171
+ <div className="infos">
172
+ <p>Você está no Passo {passo + 1}:</p>
173
+ <h3>{passoInfos?.titulo}</h3>
174
+ <p className="preto">{passoInfos?.subTitulo}</p>
175
+ </div>
176
+ <HoverPopUp
177
+ texto={passoInfos?.subTitulo}
178
+ className="ajuda-wrapper ajuda-passos-wrapper"
179
+ >
180
+ <Icone
181
+ width={16}
182
+ height={16}
183
+ fill={theme.colors.gray['700']}
184
+ svg={ajuda}
185
+ />
186
+ </HoverPopUp>{' '}
178
187
  </div>
179
- <HoverPopUp texto={passoInfos?.subTitulo} className="ajuda-wrapper ajuda-passos-wrapper">
180
- <Icone
181
- width={16}
182
- height={16}
183
- fill={theme.colors.gray['700']}
184
- svg={ajuda}
185
- />
186
- </HoverPopUp> </div>
187
-
188
+
188
189
  <div className="botoes">
189
190
  <p className="ciclo">
190
191
  Ciclo:<span>{ciclo}</span>{' '}
191
192
  </p>
192
193
 
193
-
194
-
195
194
  {moreButtons?.map((button, index) => (
196
195
  <Botao
197
196
  key={index}
@@ -16,7 +16,7 @@ type HeaderOptions = {
16
16
  type HeaderTabelaProps<T> = {
17
17
  data: Array<T>;
18
18
  columns: Column<T>[];
19
- rowSelection?: Array<T>;
19
+ selectAllChecked?: boolean;
20
20
  setRowSelection?: React.Dispatch<React.SetStateAction<Array<T>>> | undefined;
21
21
  fixedPosition: Array<String>;
22
22
  calcStickPosition?: (index: number) => number;
@@ -38,7 +38,7 @@ type HeaderTabelaProps<T> = {
38
38
  };
39
39
  const HeaderTabela = <T,>({
40
40
  data,
41
- rowSelection,
41
+ selectAllChecked,
42
42
  setRowSelection,
43
43
  columns,
44
44
  fixedPosition,
@@ -103,7 +103,7 @@ const HeaderTabela = <T,>({
103
103
  size="md"
104
104
  color={color}
105
105
  type="checkbox"
106
- checked={rowSelection?.length === data.length}
106
+ checked={selectAllChecked}
107
107
  onChange={e => handleSelectAll(e.target.checked)}
108
108
  />
109
109
  </th>
@@ -39,6 +39,7 @@ export type CustomTableProps<
39
39
  setRowSelection?: React.Dispatch<React.SetStateAction<Array<T>>> | undefined;
40
40
  isLoading?: boolean;
41
41
  color?: string;
42
+ selectAllChecked?: boolean;
42
43
  setSimples: React.Dispatch<React.SetStateAction<boolean>>;
43
44
  setGlobalFilter: React.Dispatch<React.SetStateAction<string>>;
44
45
  globalFilter: string;
@@ -101,6 +102,7 @@ const Tabela = <
101
102
  setSelectedLine,
102
103
  tamanhoPaginacao,
103
104
  hasInfinitScrool,
105
+ selectAllChecked,
104
106
  hasFiltersButtons,
105
107
  qtdRegistrosPagina,
106
108
  quantidadeRegistros,
@@ -171,7 +173,7 @@ const Tabela = <
171
173
  ) : (
172
174
  <HeaderTabela
173
175
  data={data}
174
- rowSelection={rowSelection}
176
+ selectAllChecked={selectAllChecked}
175
177
  setRowSelection={setRowSelection}
176
178
  hasExpand={hasExpand}
177
179
  headerSelection={headerSelection}