@devopness/ui-react 2.148.2 → 2.149.0

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.
@@ -0,0 +1,37 @@
1
+ import { MouseEventHandler } from 'react';
2
+ type PaginationProps = {
3
+ /** Disable all pagination actions */
4
+ disableAllActions?: boolean;
5
+ /** Disable only previous/back pagination actions */
6
+ disablePreviousActions?: boolean;
7
+ /** Disable only next/forward pagination actions */
8
+ disableNextActions?: boolean;
9
+ /** Hide first page and last page buttons */
10
+ hideFirstAndLastButton?: boolean;
11
+ /** Handler for navigating to first page */
12
+ firstPaginateAction: MouseEventHandler<HTMLButtonElement>;
13
+ /** Handler for navigating to previous page */
14
+ previousPaginateAction: MouseEventHandler<HTMLButtonElement>;
15
+ /** Handler for navigating to next page */
16
+ nextPaginateAction: MouseEventHandler<HTMLButtonElement>;
17
+ /** Handler for navigating to last page */
18
+ lastPaginateAction: MouseEventHandler<HTMLButtonElement>;
19
+ };
20
+ /**
21
+ * Pagination controls for navigating through paginated content
22
+ *
23
+ * @example
24
+ * ```jsx
25
+ * <Pagination
26
+ * firstPaginateAction={() => goToPage(1)}
27
+ * previousPaginateAction={() => goToPage(currentPage - 1)}
28
+ * nextPaginateAction={() => goToPage(currentPage + 1)}
29
+ * lastPaginateAction={() => goToPage(totalPages)}
30
+ * disableNextActions={currentPage === totalPages}
31
+ * disablePreviousActions={currentPage === 1}
32
+ * />
33
+ * ```
34
+ */
35
+ declare const Pagination: ({ disableAllActions, disablePreviousActions, disableNextActions, hideFirstAndLastButton, firstPaginateAction, previousPaginateAction, nextPaginateAction, lastPaginateAction, }: PaginationProps) => import("react/jsx-runtime").JSX.Element;
36
+ export type { PaginationProps };
37
+ export { Pagination };
@@ -0,0 +1,6 @@
1
+ type PaginationContentProps = {
2
+ hideFirstAndLastButton: boolean;
3
+ };
4
+ declare const ContainerPagination: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
5
+ declare const PaginationContent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, PaginationContentProps>> & string;
6
+ export { ContainerPagination, PaginationContent };
@@ -0,0 +1 @@
1
+ export * from './Pagination';
@@ -3,3 +3,4 @@ export type { IconProps } from './Icon';
3
3
  export { Icon as IconComponent } from './Icon';
4
4
  export * from './Link';
5
5
  export * from './Tooltip';
6
+ export * from './Pagination';