wca-designsystem 1.0.19 → 1.0.21

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.19",
2
+ "version": "1.0.21",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -106,6 +106,7 @@
106
106
  "react-router-dom": "^6.23.1",
107
107
  "recharts": "^2.14.1",
108
108
  "styled-components": "^6.1.11",
109
+ "wca-designsystem": "^1.0.16",
109
110
  "xlsx": "^0.18.5"
110
111
  }
111
112
  }
@@ -41,7 +41,8 @@ const CardInicial = ({
41
41
  }}
42
42
  >
43
43
 
44
- <Icone width={45} height={45} svg={icone} fill={theme.colors.white} />
44
+ {/* <Icone width={45} height={45} svg={icone} fill={theme.colors.white} /> */}
45
+ <Icone svg={icone} fill={theme.colors.white} className="icone" />
45
46
 
46
47
  </S.CardInicialHeader>
47
48
 
@@ -73,6 +74,7 @@ const CardInicial = ({
73
74
  aviso && (
74
75
  <>
75
76
  <Icone
77
+ className='iconeAviso'
76
78
  width={20}
77
79
  height={20}
78
80
  svg={avisoInfo?.icone ?? ''}
@@ -21,10 +21,21 @@ export const CardInicialHeader = styled.div`
21
21
  display: flex;
22
22
  align-items: center;
23
23
  justify-content: center;
24
+
25
+ .icone {
26
+ min-width: 40px;
27
+ min-height: 40px;
28
+ max-width: 80px;
29
+ max-height: 80px;
30
+ object-fit: contain;;
31
+ }
32
+
24
33
  `}
25
34
 
26
35
  `;
27
36
 
37
+
38
+
28
39
  export const CardInicialBody = styled.div`
29
40
  ${({ theme }) => css`
30
41
  margin-top: 10px;
@@ -55,6 +66,7 @@ export const CardInicialFooter = styled.div`
55
66
  text-align: center;
56
67
  border-radius: 0 8px 8px;
57
68
  background-color: ${theme.colors.white};
69
+ margin-top: 28px;
58
70
 
59
71
  button {
60
72
  width: 160px;
@@ -75,6 +87,12 @@ export const CardInicialWarning = styled.div`
75
87
  padding: 0px;
76
88
  margin-top: auto;
77
89
  padding: 4px 0;
90
+
91
+ .iconeAviso{
92
+ width: 10px;
93
+ height: 10px;
94
+ }
95
+
78
96
  `}
79
97
  `;
80
98
 
@@ -89,7 +89,7 @@ function BodyTable<
89
89
  key={`row-${item.id}`}
90
90
  onClick={() => {
91
91
  if (!item.disabled) {
92
- setSelectedLine?.(item.id === selectedLine?.id ? null : item);
92
+ setSelectedLine?.(item);
93
93
  }
94
94
  }}
95
95
  style={{
@@ -41,6 +41,8 @@ export type CustomTableProps<
41
41
  setGlobalFilter: React.Dispatch<React.SetStateAction<string>>;
42
42
  globalFilter: string;
43
43
  setPagination: React.Dispatch<any>;
44
+ selectedLine?: T | null;
45
+ setSelectedLine?: React.Dispatch<React.SetStateAction<T | null>>;
44
46
  handleAdicionar?: () => void;
45
47
  hasFiltersButtons?: boolean;
46
48
  setOrdenarPor?: React.Dispatch<React.SetStateAction<SelectDataProps>>;
@@ -70,34 +72,36 @@ const Tabela = <
70
72
  T extends { id: string | number; children?: Array<T>; disabled?: boolean }
71
73
  >({
72
74
  data,
73
- columns,
74
- setPagination,
75
- qtdRegistrosPagina,
76
- ordenarPor,
77
- acoesChildren,
78
75
  color,
79
- rowSelection,
80
- tdMinWidth = '260px',
81
- setRowSelection,
82
- hasFiltersButtons,
83
- isLoading,
84
76
  hasAdd,
77
+ columns,
78
+ hasOrder,
79
+ isLoading,
85
80
  hasSelect,
86
- globalFilter,
87
81
  hasExpand,
82
+ ordenarPor,
83
+ setSimples,
84
+ selectedLine,
85
+ globalFilter,
86
+ rowSelection,
87
+ fixedPosition,
88
+ setPagination,
89
+ acoesChildren,
88
90
  setFiltrosPor,
89
- setGlobalFilter,
90
- hasOrder,
91
- headerSelection,
92
91
  fetchMoreData,
93
92
  setOrdenarPor,
94
- setSimples,
93
+ setGlobalFilter,
95
94
  handleAdicionar,
95
+ setRowSelection,
96
+ headerSelection,
96
97
  tabelaPaginacao,
97
- quantidadeRegistros,
98
- tamanhoPaginacao,
99
- fixedPosition,
98
+ setSelectedLine,
100
99
  hasInfinitScrool,
100
+ tamanhoPaginacao,
101
+ hasFiltersButtons,
102
+ qtdRegistrosPagina,
103
+ quantidadeRegistros,
104
+ tdMinWidth = '260px',
101
105
  }: CustomTableProps<T>) => {
102
106
  const [toogleFiltros, setToogleFiltros] = useState(false);
103
107
  const [formatedColumns, setFormatedColumns] = useState(
@@ -197,6 +201,8 @@ const Tabela = <
197
201
  hasMoreData={quantidadeRegistros !== data.length}
198
202
  rowSelection={rowSelection}
199
203
  setRowSelection={setRowSelection}
204
+ selectedLine={selectedLine}
205
+ setSelectedLine={setSelectedLine}
200
206
  acoesChildren={acoesChildren}
201
207
  data={data}
202
208
  columns={columnsToShow}