@groupeactual/ui-kit 1.1.1-beta.3 → 1.1.1-beta.5
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/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Datatable/Datatable.d.ts +1 -1
- package/dist/cjs/types/components/Datatable/datatable.interface.d.ts +4 -4
- package/dist/es/index.d.ts +5 -5
- package/dist/es/index.mjs +1 -1
- package/dist/es/index.mjs.map +1 -1
- package/dist/es/types/components/Datatable/Datatable.d.ts +1 -1
- package/dist/es/types/components/Datatable/datatable.interface.d.ts +4 -4
- package/package.json +2 -2
- package/src/components/Datatable/Datatable.tsx +4 -4
- package/src/components/Datatable/datatable.interface.ts +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Props } from './datatable.interface';
|
|
2
2
|
declare const Datatable: {
|
|
3
|
-
<T extends {}>({ values, columns,
|
|
3
|
+
<T extends {}>({ values, columns, withPagination, withHeader, withTopPagination, ...props }: Props<T>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
6
6
|
export default Datatable;
|
|
@@ -13,14 +13,14 @@ export interface Row {
|
|
|
13
13
|
type BaseProps<T> = {
|
|
14
14
|
columns: Column<T>[];
|
|
15
15
|
withHeader?: boolean;
|
|
16
|
-
withPagination
|
|
17
|
-
withTopPagination
|
|
16
|
+
withPagination?: boolean;
|
|
17
|
+
withTopPagination?: boolean;
|
|
18
18
|
};
|
|
19
19
|
type WithoutPaginationProps = {
|
|
20
|
-
withPagination
|
|
20
|
+
withPagination?: false;
|
|
21
21
|
};
|
|
22
22
|
type WithoutTopPaginationProps = {
|
|
23
|
-
withTopPagination
|
|
23
|
+
withTopPagination?: false;
|
|
24
24
|
};
|
|
25
25
|
type PaginationProps = {
|
|
26
26
|
withPagination: true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@groupeactual/ui-kit",
|
|
3
|
-
"version": "1.1.1-beta.
|
|
3
|
+
"version": "1.1.1-beta.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A simple template for a custom React component library",
|
|
6
6
|
"devDependencies": {
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"notistack": "^3.0.1",
|
|
55
55
|
"react": "^18.2.0",
|
|
56
56
|
"react-dom": "^18.2.0",
|
|
57
|
-
"@groupeactual/design-tokens": "1.1.1-beta.
|
|
57
|
+
"@groupeactual/design-tokens": "1.1.1-beta.5"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"react": "^18.2.0",
|
|
@@ -27,14 +27,14 @@ import { Order, Props, Row } from './datatable.interface';
|
|
|
27
27
|
const Datatable = <T extends {}>({
|
|
28
28
|
values,
|
|
29
29
|
columns,
|
|
30
|
+
withPagination,
|
|
30
31
|
withHeader = true,
|
|
31
|
-
|
|
32
|
-
withTopPagination = false,
|
|
32
|
+
withTopPagination,
|
|
33
33
|
...props
|
|
34
34
|
}: Props<T>) => {
|
|
35
35
|
let rowPerPage = 5;
|
|
36
|
-
let totalPerPageTrad = '
|
|
37
|
-
let totalTrad = '
|
|
36
|
+
let totalPerPageTrad = '';
|
|
37
|
+
let totalTrad = '';
|
|
38
38
|
let limitsPerPageArray = [3, 5, 10, 20];
|
|
39
39
|
|
|
40
40
|
if ('rowPerPage' in props && props.rowPerPage) {
|
|
@@ -17,16 +17,16 @@ export interface Row {
|
|
|
17
17
|
type BaseProps<T> = {
|
|
18
18
|
columns: Column<T>[];
|
|
19
19
|
withHeader?: boolean;
|
|
20
|
-
withPagination
|
|
21
|
-
withTopPagination
|
|
20
|
+
withPagination?: boolean;
|
|
21
|
+
withTopPagination?: boolean;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
type WithoutPaginationProps = {
|
|
25
|
-
withPagination
|
|
25
|
+
withPagination?: false;
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
type WithoutTopPaginationProps = {
|
|
29
|
-
withTopPagination
|
|
29
|
+
withTopPagination?: false;
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
type PaginationProps = {
|