import React from 'react'; import type { Spacing, WithStyleProps, ComponentStyle } from '@instructure/emotion'; import type { AsElementType, OtherHTMLAttributes, PropValidators } from '@instructure/shared-types'; import type { PaginationPageProps } from './PaginationButton/props'; import type { WithDeterministicIdProps } from '@instructure/ui-react-utils'; type ChildPage = React.ReactElement; type PaginationOwnProps = { /** * children of type Pagination.Page */ children?: ChildPage | ChildPage[]; /** * Disables interaction with all pages */ disabled?: boolean; /** * Displays "jump to first" and "jump to last" buttons. Always turned on with `input` variant. */ withFirstAndLastButton?: boolean; /** * Displays the unavailable navigation buttons as disabled instead of hiding them. Always turned on with `input` variant. */ showDisabledButtons?: boolean; /** * Visible label for component */ label?: React.ReactNode; /** * Accessible label for next button */ labelNext?: string; /** * Accessible label for previous button */ labelPrev?: string; /** * Accessible label for "jump to first" button */ labelFirst?: string; /** * Accessible label for "jump to last" button */ labelLast?: string; /** * Label for number input * * (__only__ for `input` variant) */ labelNumberInput?: (totalPageNumber: number) => React.ReactNode; /** * ScreenReaderLabel for number input * * (__only__ for `input` variant) */ screenReaderLabelNumberInput?: (currentPage: number, totalPageNumber: number) => string; /** * ScreenReaderLabel for page number buttons * * (__only__ for `full` and `compact variants) */ screenReaderLabelPageButton?: (currentPage: number, totalPageNumber: number) => string; /** * The compact variant truncates the page navigation to show only the first, * last, and pages immediately surrounding the current page. Fewer than 5 pages, * no next/previous arrow buttons will be shown, and all pages will be listed */ variant?: 'full' | 'compact' | 'input'; /** * Spacing token values can be found here: [Spacing Tokens](https://instructure.design/#layout-spacing/%23Tokens) * * Apply these values via familiar CSS-like shorthand. For example: `margin="space8 0 space12"`. */ margin?: Spacing; /** * the element type to render as */ as?: AsElementType; /** * provides a reference to the underlying html root element */ elementRef?: (element: Element | null) => void; /** * provides a reference to the html input element * * (__only__ for `input` variant) */ inputRef?: (inputElement: HTMLInputElement | null) => void; /** * For accessibility, Pagination sets focus on the first or last Pagination.Pages, respectively, when the Previous or Next arrow buttons are removed from the DOM. * Set this property to `false` to prevent this behavior. */ shouldHandleFocus?: boolean; /** * The total number of pages */ totalPageNumber?: number; /** * The current page number */ currentPage?: number; /** * The number of pages to display before and after the current page */ siblingCount?: number; /** * The number of always visible pages at the beginning and end * of the pagination component * */ boundaryCount?: number; /** * Called when page number is changed */ onPageChange?: (next: number, prev: number) => void; /** * Called when a page is hovered. */ onMouseEnter?: (page: number) => void; /** * Renders the visible pages */ renderPageIndicator?: (pageIndex: number, currentPage: number) => React.ReactNode; /** * The ellipsis * (e.g. "...") */ ellipsis?: React.ReactNode; }; type PropKeys = keyof PaginationOwnProps; type AllowedPropKeys = Readonly>; type PaginationProps = PaginationOwnProps & WithStyleProps & OtherHTMLAttributes & WithDeterministicIdProps; type PaginationStyle = ComponentStyle<'pagination' | 'pages' | 'pageIndicatorList'>; declare const propTypes: PropValidators; declare const allowedProps: AllowedPropKeys; type PaginationSnapshot = { lastFocusedButton?: HTMLButtonElement; }; export type { PaginationProps, PaginationStyle, PaginationSnapshot, ChildPage }; export { propTypes, allowedProps }; //# sourceMappingURL=props.d.ts.map