@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
120 lines (119 loc) • 4.57 kB
TypeScript
import { ReactNodeOrFunction } from "../../utils/index.types.js";
import { ThemeProps, WithoutThemeProps } from "../../core/system/index.types.js";
import { Component, HTMLStyledProps } from "../../core/components/index.types.js";
import "../../core/index.js";
import { ButtonGroupRootProps } from "../button/button-group.js";
import { IconButtonProps } from "../button/icon-button.js";
import { PaginationStyle } from "./pagination.style.js";
import { Page, UsePaginationProps } from "./use-pagination.js";
import "../../index.js";
import * as react2630 from "react";
import { FC, ReactNode } from "react";
//#region src/components/pagination/pagination.d.ts
interface PaginationRootProps extends WithoutThemeProps<Omit<ButtonGroupRootProps, "onChange" | "page">, PaginationStyle>, ThemeProps<PaginationStyle>, Omit<UsePaginationProps, "boundaries" | "siblings"> {
/**
* Number of elements visible on the left/right edges.
*
* @default 1
*/
boundaries?: number;
/** Number of siblings displayed on the left/right side of selected page.
*
* @default 1
*/
siblings?: number;
/**
* If `true`, display the control buttons.
*
* @default true
*/
withControls?: boolean;
/**
* If `true`, display the edge buttons.
*
* @default false
*/
withEdges?: boolean;
/**
* Props for next of the control button element.
*/
controlNextProps?: PaginationItemProps;
/**
* Props for previous of the control button element.
*/
controlPrevProps?: PaginationItemProps;
/**
* Props for control button element.
*/
controlProps?: PaginationItemProps;
/**
* Props for end of the edge button element.
*/
edgeEndProps?: PaginationItemProps;
/**
* Props for edge button element.
*/
edgeProps?: PaginationItemProps;
/**
* Props for start of the edge button element.
*/
edgeStartProps?: PaginationItemProps;
/**
* Props for ellipsis of the element.
*/
ellipsisProps?: PaginationItemProps;
/**
* Props for item of the button element.
*/
itemProps?: PaginationItemProps;
}
declare const PaginationPropsContext: react2630.Context<Partial<PaginationRootProps> | undefined>, usePaginationPropsContext: () => Partial<PaginationRootProps> | undefined;
/**
* `Pagination` is a component for managing the pagination and navigation of content.
*
* @see https://yamada-ui.com/docs/components/pagination
*/
declare const PaginationRoot: Component<"nav", PaginationRootProps>;
interface PaginationItemsProps {
/**
* The function used to generate children.
* it will be called with page number or `"ellipsis"`.
*/
children?: (page: Page) => ReactNode;
/**
* The function used to generate children.
* it will be called with page number or `"ellipsis"`.
*/
render?: (page: Page) => ReactNode;
}
declare const PaginationItems: FC<PaginationItemsProps>;
interface PaginationItemProps extends IconButtonProps {}
declare const PaginationItem: Component<"button", PaginationItemProps>;
interface PaginationTextProps extends Omit<HTMLStyledProps<"span">, "children"> {
/**
* The children of the text.
* if function, it will be called with `{ page: number; total: number }`.
*/
children?: ReactNodeOrFunction<{
page: number;
total: number;
}>;
/**
* The format of the text.
*
* @default 'compact'
*/
format?: "compact" | "short";
}
declare const PaginationText: Component<"span", PaginationTextProps>;
interface PaginationStartTriggerProps extends HTMLStyledProps<"button"> {}
declare const PaginationStartTrigger: Component<"button", PaginationStartTriggerProps>;
interface PaginationEndTriggerProps extends HTMLStyledProps<"button"> {}
declare const PaginationEndTrigger: Component<"button", PaginationEndTriggerProps>;
interface PaginationPrevTriggerProps extends HTMLStyledProps<"button"> {}
declare const PaginationPrevTrigger: Component<"button", PaginationPrevTriggerProps>;
interface PaginationNextTriggerProps extends HTMLStyledProps<"button"> {}
declare const PaginationNextTrigger: Component<"button", PaginationNextTriggerProps>;
//#endregion
export { PaginationEndTrigger, PaginationEndTriggerProps, PaginationItem, PaginationItemProps, PaginationItems, PaginationItemsProps, PaginationNextTrigger, PaginationNextTriggerProps, PaginationPrevTrigger, PaginationPrevTriggerProps, PaginationPropsContext, PaginationRoot, PaginationRootProps, PaginationStartTrigger, PaginationStartTriggerProps, PaginationText, PaginationTextProps, usePaginationPropsContext };
//# sourceMappingURL=pagination.d.ts.map