@loadsmart/loadsmart-ui 5.2.1 → 5.3.2
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/components/Icon/Icon.d.ts +1 -0
- package/dist/components/TablePagination/RowsPerPage.d.ts +4 -0
- package/dist/components/TablePagination/TablePagination.d.ts +4 -0
- package/dist/components/TablePagination/TablePagination.stories.d.ts +5 -0
- package/dist/components/TablePagination/TablePagination.styles.d.ts +5 -0
- package/dist/components/TablePagination/TablePagination.test.d.ts +1 -0
- package/dist/components/TablePagination/TablePagination.types.d.ts +53 -0
- package/dist/components/TablePagination/TablePaginationActions.d.ts +11 -0
- package/dist/components/TablePagination/index.d.ts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +444 -438
- package/dist/index.js.map +1 -1
- package/dist/utils/toolset/keyboard.d.ts +4 -0
- package/package.json +1 -1
- package/src/components/Card/Card.tsx +0 -5
- package/src/components/Icon/Icon.tsx +2 -0
- package/src/components/Icon/assets/caret-right-last.svg +4 -0
- package/src/components/TablePagination/RowsPerPage.tsx +76 -0
- package/src/components/TablePagination/TablePagination.stories.tsx +42 -0
- package/src/components/TablePagination/TablePagination.styles.ts +13 -0
- package/src/components/TablePagination/TablePagination.test.tsx +111 -0
- package/src/components/TablePagination/TablePagination.tsx +46 -0
- package/src/components/TablePagination/TablePagination.types.ts +62 -0
- package/src/components/TablePagination/TablePaginationActions.tsx +144 -0
- package/src/components/TablePagination/index.ts +2 -0
- package/src/index.ts +3 -0
- package/src/utils/toolset/keyboard.ts +4 -0
|
@@ -21,6 +21,7 @@ declare const icons: {
|
|
|
21
21
|
upload: JSX.Element;
|
|
22
22
|
warning: JSX.Element;
|
|
23
23
|
'dots-horizontal': JSX.Element;
|
|
24
|
+
'caret-right-last': JSX.Element;
|
|
24
25
|
};
|
|
25
26
|
declare const Icon: (props: GenericIconProps<import("../IconFactory").IconMapping>) => JSX.Element;
|
|
26
27
|
export declare type IconProps = GenericIconProps<typeof icons>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { RowsPerPageProps } from './TablePagination.types';
|
|
3
|
+
declare function RowsPerPage({ page, rowsPerPage, onRowsPerPageChange, labelRowsPerPage, count, rowsPerPageOptions, disabled, }: RowsPerPageProps): JSX.Element;
|
|
4
|
+
export default RowsPerPage;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/react/types-6-0';
|
|
2
|
+
import type { TablePaginationProps } from './TablePagination.types';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react/types-6-0").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Playground: Story<TablePaginationProps>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const NoPaddingButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../Button").ButtonProps & import("react").RefAttributes<HTMLButtonElement>>, any, {
|
|
3
|
+
variant: "tertiary";
|
|
4
|
+
scale: "small";
|
|
5
|
+
}, "scale" | "variant">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { GroupProps } from "../Layout/Group";
|
|
2
|
+
export interface TablePaginationProps extends GroupProps {
|
|
3
|
+
/**
|
|
4
|
+
* The pagination variant
|
|
5
|
+
* @default 'default'
|
|
6
|
+
*/
|
|
7
|
+
variant?: 'compact' | 'default';
|
|
8
|
+
/**
|
|
9
|
+
* The total number of paginated items
|
|
10
|
+
*/
|
|
11
|
+
count: number;
|
|
12
|
+
/**
|
|
13
|
+
* Customize the rows per page label.
|
|
14
|
+
* @default 'Rows per page:'
|
|
15
|
+
*/
|
|
16
|
+
labelRowsPerPage?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Callback fired when the page is changed.
|
|
19
|
+
*/
|
|
20
|
+
onPageChange: (page: number) => void;
|
|
21
|
+
/**
|
|
22
|
+
* Callback fired when the number of rows per page is changed.
|
|
23
|
+
*
|
|
24
|
+
* Note: Resetting the page to zero after the number of rows per page is changed isn't part of
|
|
25
|
+
* the component and has to be implemented where it's necessary
|
|
26
|
+
*/
|
|
27
|
+
onRowsPerPageChange: (rowsPerPage: number) => void;
|
|
28
|
+
/**
|
|
29
|
+
* The number of rows per page.
|
|
30
|
+
* @default 50
|
|
31
|
+
*/
|
|
32
|
+
rowsPerPage?: number;
|
|
33
|
+
/**
|
|
34
|
+
* The zero-based index of the current page.
|
|
35
|
+
*/
|
|
36
|
+
page: number;
|
|
37
|
+
/**
|
|
38
|
+
* Customizes the options of the rows per page select field.
|
|
39
|
+
* @default [10, 25, 50, 100]
|
|
40
|
+
*/
|
|
41
|
+
rowsPerPageOptions?: number[];
|
|
42
|
+
/**
|
|
43
|
+
* Disable all the pagination actions
|
|
44
|
+
*/
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
}
|
|
47
|
+
export declare type TablePaginationActionsProps = Omit<TablePaginationProps, 'labelRowsPerPage' | 'onRowsPerPageChange' | 'rowsPerPageOptions' | 'rowsPerPage'> & {
|
|
48
|
+
rowsPerPage: number;
|
|
49
|
+
};
|
|
50
|
+
export declare type RowsPerPageProps = Omit<TablePaginationProps, 'rowsPerPageOptions' | 'onPageChange' | 'rowsPerPage'> & {
|
|
51
|
+
rowsPerPageOptions: number[];
|
|
52
|
+
rowsPerPage: number;
|
|
53
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TablePaginationActionsProps } from "./TablePagination.types";
|
|
3
|
+
import { IconProps } from "../Icon";
|
|
4
|
+
export declare const ActionIcon: import("styled-components").StyledComponent<(props: import("../IconFactory").IconProps<import("../IconFactory").IconMapping>) => JSX.Element, any, {
|
|
5
|
+
color: "neutral-darker";
|
|
6
|
+
size: "16";
|
|
7
|
+
} & IconProps & {
|
|
8
|
+
rotate?: number | undefined;
|
|
9
|
+
}, "size" | "color">;
|
|
10
|
+
declare function TablePaginationActions({ variant, disabled, onPageChange, page, count, rowsPerPage, }: TablePaginationActionsProps): JSX.Element;
|
|
11
|
+
export default TablePaginationActions;
|
package/dist/index.d.ts
CHANGED
|
@@ -92,3 +92,5 @@ export type { ErrorMessageProps } from './components/ErrorMessage';
|
|
|
92
92
|
export { DragDropFileProvider, useDragDropFileContext, } from './components/DragDropFile/DragDropFile.context';
|
|
93
93
|
export { default as DragDropFile } from './components/DragDropFile/DragDropFile';
|
|
94
94
|
export type { FileStatus, FileWithStatus, DropZoneProps, DragDropFileProviderProps, DragDropFileContextValue, } from './components/DragDropFile/types';
|
|
95
|
+
export { TablePagination } from './components/TablePagination';
|
|
96
|
+
export type { TablePaginationProps } from './components/TablePagination';
|