@loadsmart/loadsmart-ui 5.2.0 → 5.3.1

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.
Files changed (28) hide show
  1. package/dist/components/Icon/Icon.d.ts +1 -0
  2. package/dist/components/TablePagination/RowsPerPage.d.ts +4 -0
  3. package/dist/components/TablePagination/TablePagination.d.ts +4 -0
  4. package/dist/components/TablePagination/TablePagination.stories.d.ts +5 -0
  5. package/dist/components/TablePagination/TablePagination.styles.d.ts +5 -0
  6. package/dist/components/TablePagination/TablePagination.test.d.ts +1 -0
  7. package/dist/components/TablePagination/TablePagination.types.d.ts +50 -0
  8. package/dist/components/TablePagination/TablePaginationActions.d.ts +11 -0
  9. package/dist/components/TablePagination/index.d.ts +2 -0
  10. package/dist/index.d.ts +2 -0
  11. package/dist/index.js +444 -438
  12. package/dist/index.js.map +1 -1
  13. package/dist/utils/toolset/keyboard.d.ts +4 -0
  14. package/package.json +1 -1
  15. package/src/components/Card/Card.tsx +0 -5
  16. package/src/components/Icon/Icon.tsx +2 -0
  17. package/src/components/Icon/assets/caret-right-last.svg +4 -0
  18. package/src/components/TablePagination/RowsPerPage.tsx +76 -0
  19. package/src/components/TablePagination/TablePagination.stories.tsx +37 -0
  20. package/src/components/TablePagination/TablePagination.styles.ts +13 -0
  21. package/src/components/TablePagination/TablePagination.test.tsx +112 -0
  22. package/src/components/TablePagination/TablePagination.tsx +51 -0
  23. package/src/components/TablePagination/TablePagination.types.ts +59 -0
  24. package/src/components/TablePagination/TablePaginationActions.tsx +144 -0
  25. package/src/components/TablePagination/index.ts +2 -0
  26. package/src/components/Tag/Tag.tsx +1 -1
  27. package/src/index.ts +3 -0
  28. 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,4 @@
1
+ /// <reference types="react" />
2
+ import type { TablePaginationProps } from './TablePagination.types';
3
+ declare function TablePagination(props: TablePaginationProps): JSX.Element;
4
+ export default TablePagination;
@@ -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,50 @@
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
+ onRowsPerPageChange: (rowsPerPage: number) => void;
25
+ /**
26
+ * The number of rows per page.
27
+ * @default 50
28
+ */
29
+ rowsPerPage?: number;
30
+ /**
31
+ * The zero-based index of the current page.
32
+ */
33
+ page: number;
34
+ /**
35
+ * Customizes the options of the rows per page select field.
36
+ * @default [10, 25, 50, 100]
37
+ */
38
+ rowsPerPageOptions?: number[];
39
+ /**
40
+ * Disable all the pagination actions
41
+ */
42
+ disabled?: boolean;
43
+ }
44
+ export declare type TablePaginationActionsProps = Omit<TablePaginationProps, 'labelRowsPerPage' | 'onRowsPerPageChange' | 'rowsPerPageOptions' | 'rowsPerPage'> & {
45
+ rowsPerPage: number;
46
+ };
47
+ export declare type RowsPerPageProps = Omit<TablePaginationProps, 'rowsPerPageOptions' | 'onPageChange' | 'rowsPerPage'> & {
48
+ rowsPerPageOptions: number[];
49
+ rowsPerPage: number;
50
+ };
@@ -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;
@@ -0,0 +1,2 @@
1
+ export { default as TablePagination } from './TablePagination';
2
+ export type { TablePaginationProps } from './TablePagination.types';
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';