import React from "react"; import type { AkselStatusColorRole } from "@navikt/ds-tokens/types"; import { AkselColor } from "../types"; import { PaginationItemProps, PaginationItemType } from "./PaginationItem"; interface RenderItemProps extends Pick { children: React.ReactNode; onClick: React.MouseEventHandler; page: number; size: Exclude; } export interface PaginationProps extends React.HTMLAttributes { /** * Current page. * * Pagination indexing starts at 1. */ page: number; /** * Number of always visible pages before and after the current page. * @default 1 */ siblingCount?: number; /** * Number of always visible pages at the beginning and end. * @default 1 */ boundaryCount?: number; /** * Callback when current page changes. */ onPageChange?: (page: number) => void; /** * Total number of pages. */ count: number; /** * Changes padding, height and font-size. * @default "medium" */ size?: "medium" | "small" | "xsmall"; /** * Display text alongside "previous" and "next" icons. * @default false */ prevNextTexts?: boolean; /** * Override pagination item rendering. * @default PaginationItem */ renderItem?: (item: RenderItemProps) => ReturnType; /** * Pagination heading. We recommend adding heading instead of `aria-label` to help assistive technologies with an extra navigation-stop. */ srHeading?: { tag: "h2" | "h3" | "h4" | "h5" | "h6"; text: string; }; /** * Overrides color. * * We have disallowed status-colors. * @default "neutral" * @see 🏷️ {@link AkselColor} * @see [📝 Documentation](https://aksel.nav.no/grunnleggende/styling/farger-tokens) * @private */ "data-color"?: Exclude; } interface PaginationType extends React.ForwardRefExoticComponent> { Item: PaginationItemType; } export declare const getSteps: ({ page, count, boundaryCount, siblingCount, }: Pick) => (string | number)[]; /** * A component that displays pagination controls. * * @see [📝 Documentation](https://aksel.nav.no/komponenter/core/pagination) * @see 🏷️ {@link PaginationProps} * * @example * ```jsx * * ``` */ export declare const Pagination: PaginationType; export default Pagination;