UNPKG

@bitrix24/b24ui-nuxt

Version:

Bitrix24 UI-Kit for developing web applications REST API for NUXT & VUE

101 lines (100 loc) 3.25 kB
import type { PaginationRootProps, PaginationRootEmits } from 'reka-ui'; import type { AppConfig } from '@nuxt/schema'; import theme from '#build/b24ui/pagination'; import type { ButtonProps, IconComponent } from '../types'; import type { ComponentConfig } from '../types/tv'; type Pagination = ComponentConfig<typeof theme, AppConfig, 'pagination'>; export interface PaginationProps extends Partial<Pick<PaginationRootProps, 'defaultPage' | 'disabled' | 'itemsPerPage' | 'page' | 'showEdges' | 'siblingCount' | 'total'>> { /** * The element or component this component should render as. * @defaultValue 'div' */ as?: any; /** * The icon to use for the first page control. * @defaultValue icons.chevronDoubleLeft * @IconComponent */ firstIcon?: IconComponent; /** * The icon to use for the previous page control. * @defaultValue icons.chevronLeft * @IconComponent */ prevIcon?: IconComponent; /** * The icon to use for the next page control. * @defaultValue icons.chevronRight * @IconComponent */ nextIcon?: IconComponent; /** * The icon to use for the last page control. * @defaultValue icons.chevronDoubleRight * @IconComponent */ lastIcon?: IconComponent; /** * The icon to use for the ellipsis control. * @defaultValue icons.ellipsis * @IconComponent */ ellipsisIcon?: IconComponent; /** * The color of the pagination controls. * @defaultValue 'air-secondary-no-accent' */ color?: ButtonProps['color']; /** * The color of the active pagination control. * @defaultValue 'air-primary' */ activeColor?: ButtonProps['color']; /** * Whether to show the first, previous, next, and last controls. * @defaultValue true */ showControls?: boolean; size?: ButtonProps['size']; /** * A function to render page controls as links. * @param page The page number to navigate to. */ to?: (page: number) => ButtonProps['to']; class?: any; b24ui?: Pagination['slots']; } export interface PaginationEmits extends PaginationRootEmits { } export interface PaginationSlots { first(props?: {}): any; prev(props?: {}): any; next(props?: {}): any; last(props?: {}): any; ellipsis(props: { b24ui: Pagination['b24ui']; }): any; item(props: { page: number; pageCount: number; item: { type: 'ellipsis'; } | { type: 'page'; value: number; }; index: number; }): any; } declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<PaginationProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, { "update:page": (value: number) => any; }, string, import("vue").PublicProps, Readonly<PaginationProps> & Readonly<{ "onUpdate:page"?: ((value: number) => any) | undefined; }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, PaginationSlots>; declare const _default: typeof __VLS_export; export default _default; type __VLS_WithSlots<T, S> = T & { new (): { $slots: S; }; };