import React from "react"; import { Option } from "../../form"; import "./paginator.scss"; export type PaginatorProps = React.HTMLAttributes & { /** The total number of results (items not pages). */ count: number; /** The current page. */ page: number; /** The page size (items per page), required even if `pageSizeOptions` is not set. */ pageSize: number; /** Indicates whether the spinner should be shown (requires `labelLoading`). */ loading?: boolean; /** The options for the page size, can be omitted if no variable pages size is supported. */ pageSizeOptions?: Option[]; /** * Gets called when the selected page is changed * * If a `Promise` is returned and `labelLoading` is set: a spinner will be * shown after during the "pending" state of the returned `Promise`. * * This callback is debounced every 300 milliseconds. */ onPageChange?: (page: number) => Promise | void; /** Gets called when the selected page size is changed. */ onPageSizeChange?: (pageSize: number) => Promise | void; /** The current page range (accessible) label. */ labelCurrentPageRange?: string; /** The go to page (accessible) label. */ labelGoToPage?: string; /** * The loading (accessible) label, * @see onPageChange */ labelLoading?: string; /** The page size (accessible) label. */ labelPageSize?: string; /** The pagination (accessible) label. */ labelPagination?: string; /** The label for the page */ labelPageSelect?: string; /** The go to first page (accessible) label. */ labelFirst?: string; /** The go to previous page (accessible) label. */ labelPrevious?: string; /** The go to next page (accessible) label. */ labelNext?: string; /** The go to last page (accessible) label. */ labelLast?: string; }; /** * Paginator component, can be used to show and manipulate information about the * current page and pages in a set of object. * * The `onPageChange` callback is debounced and provided a mechanism for a * spinner to appear during load (see docs). */ export declare const Paginator: React.FC; export type PaginatorNavProps = { count: number; currentPage: number; labelPageSelect?: string; labelFirst?: string; labelPrevious?: string; labelNext?: string; labelLast?: string; pageSize: number; onPageSizeChange: (page: number) => void; }; export declare const PaginatorNav: React.FC; export type PaginatorMetaProps = { count: number; labelCurrentPageRange?: string; labelLoading?: string; loading: boolean; page: number; pageSize: number; }; export declare const PaginatorMeta: React.FC; export type PaginatorOptionsProps = { labelPageSize?: string; onPageSizeChange: React.ChangeEventHandler; pageSize: number; pageSizeOptions: Option[]; }; export declare const PaginatorOptions: React.FC;