@ssa-ui-kit/core 1.0.17 → 1.0.18
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/Pagination/Pagination.d.ts +1 -1
- package/dist/components/Pagination/PaginationContext.d.ts +1 -1
- package/dist/components/Pagination/components/RowsPerPageDropdown/RowsPerPageDropdown.d.ts +2 -0
- package/dist/components/Pagination/components/RowsPerPageDropdown/index.d.ts +2 -0
- package/dist/components/Pagination/components/RowsPerPageDropdown/types.d.ts +9 -0
- package/dist/components/Pagination/components/index.d.ts +1 -0
- package/dist/components/Pagination/constants.d.ts +6 -0
- package/dist/components/Pagination/styles.d.ts +7 -0
- package/dist/components/Pagination/types.d.ts +10 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Pagination/Pagination.spec.tsx +2 -1
- package/src/components/Pagination/Pagination.stories.tsx +16 -2
- package/src/components/Pagination/Pagination.tsx +85 -43
- package/src/components/Pagination/PaginationContext.tsx +4 -1
- package/src/components/Pagination/components/RowsPerPageDropdown/RowsPerPageDropdown.tsx +70 -0
- package/src/components/Pagination/components/RowsPerPageDropdown/index.ts +2 -0
- package/src/components/Pagination/components/RowsPerPageDropdown/types.ts +7 -0
- package/src/components/Pagination/components/index.ts +1 -0
- package/src/components/Pagination/constants.ts +18 -0
- package/src/components/Pagination/styles.tsx +25 -0
- package/src/components/Pagination/types.ts +10 -0
- package/tsbuildcache +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { PaginationProps } from './types';
|
|
2
|
-
declare const Pagination: ({ pagesCount, className, as, ariaLabel, isDisabled, }: PaginationProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
|
2
|
+
declare const Pagination: ({ pagesCount, className, as, ariaLabel, isDisabled, pageNumberPlaceholder, isPageSettingVisible, isRowPerPageVisible, rowPerPageProps, manualPageNumberProps, }: PaginationProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
|
3
3
|
export default Pagination;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { PaginationContextProps, PaginationContextProviderProps } from './types';
|
|
2
2
|
export declare const PaginationContext: import("react").Context<PaginationContextProps>;
|
|
3
3
|
export declare const usePaginationContext: () => PaginationContextProps;
|
|
4
|
-
export declare const PaginationContextProvider: ({ selectedPage, children, }: PaginationContextProviderProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
|
4
|
+
export declare const PaginationContextProvider: ({ selectedPage, defaultPerPage, children, }: PaginationContextProviderProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './RowsPerPageDropdown';
|
|
@@ -2,3 +2,10 @@ import { Theme } from '@emotion/react';
|
|
|
2
2
|
export declare const pageBtnStyles: (theme: Theme) => import("@emotion/react").SerializedStyles;
|
|
3
3
|
export declare const selectedPageBtnStyles: (theme: Theme) => import("@emotion/react").SerializedStyles;
|
|
4
4
|
export declare const arrowBtnStyles: (theme: Theme) => import("@emotion/react").SerializedStyles;
|
|
5
|
+
export declare const PaginationNav: import("@emotion/styled").StyledComponent<{
|
|
6
|
+
theme?: Theme;
|
|
7
|
+
as?: React.ElementType;
|
|
8
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
9
|
+
export declare const PageNumberInput: import("@emotion/styled").StyledComponent<import("../Input/types").InputProps & import("react").RefAttributes<HTMLInputElement> & {
|
|
10
|
+
theme?: Theme;
|
|
11
|
+
}, {}, {}>;
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import { CommonProps } from '../../types/emotion';
|
|
2
|
+
import { InputProps } from '../Input/types';
|
|
3
|
+
import { RowsPerPageDropdownProps } from './components/RowsPerPageDropdown/types';
|
|
2
4
|
export interface PaginationProps extends CommonProps {
|
|
3
5
|
pagesCount: number;
|
|
4
6
|
ariaLabel?: string;
|
|
5
7
|
isDisabled?: boolean;
|
|
8
|
+
pageNumberPlaceholder?: string;
|
|
9
|
+
isPageSettingVisible?: boolean;
|
|
10
|
+
isRowPerPageVisible?: boolean;
|
|
11
|
+
rowPerPageProps?: RowsPerPageDropdownProps;
|
|
12
|
+
manualPageNumberProps?: InputProps;
|
|
6
13
|
}
|
|
7
14
|
export interface PaginationButtonsProps {
|
|
8
15
|
range: number[];
|
|
@@ -24,9 +31,12 @@ export interface PageButtonProps {
|
|
|
24
31
|
}
|
|
25
32
|
export interface PaginationContextProps {
|
|
26
33
|
page?: number;
|
|
34
|
+
perPage: number;
|
|
27
35
|
setPage: React.Dispatch<React.SetStateAction<number | undefined>>;
|
|
36
|
+
setPerPage: React.Dispatch<React.SetStateAction<number>>;
|
|
28
37
|
}
|
|
29
38
|
export interface PaginationContextProviderProps {
|
|
30
39
|
selectedPage?: number;
|
|
40
|
+
defaultPerPage?: number;
|
|
31
41
|
children: React.ReactNode;
|
|
32
42
|
}
|