@bitrix24/b24ui-nuxt
Version:
Bitrix24 UI-Kit for developing web applications REST API for NUXT & VUE
110 lines (109 loc) • 4.33 kB
TypeScript
import type { PaginationRootProps, PaginationRootEmits } from 'reka-ui';
import type { VNode } from 'vue';
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?: {}): VNode[];
prev?(props?: {}): VNode[];
next?(props?: {}): VNode[];
last?(props?: {}): VNode[];
ellipsis?(props: {
b24ui: Pagination['b24ui'];
}): VNode[];
item?(props: {
page: number;
pageCount: number;
item: {
type: 'ellipsis';
} | {
type: 'page';
value: number;
};
index: number;
}): VNode[];
}
declare const _default: typeof __VLS_export;
export default _default;
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;
}>, {
color: "link" | "air-primary" | "air-primary-success" | "air-primary-alert" | "air-primary-copilot" | "air-secondary" | "air-secondary-alert" | "air-secondary-accent" | "air-secondary-accent-1" | "air-secondary-accent-2" | "air-tertiary" | "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | "air-secondary-no-accent" | "air-tertiary-accent" | "air-tertiary-no-accent" | "air-selection" | "air-boost";
activeColor: "link" | "air-primary" | "air-primary-success" | "air-primary-alert" | "air-primary-copilot" | "air-secondary" | "air-secondary-alert" | "air-secondary-accent" | "air-secondary-accent-1" | "air-secondary-accent-2" | "air-tertiary" | "default" | "danger" | "success" | "warning" | "primary" | "secondary" | "collab" | "ai" | "air-secondary-no-accent" | "air-tertiary-accent" | "air-tertiary-no-accent" | "air-selection" | "air-boost";
itemsPerPage: number;
showEdges: boolean;
siblingCount: number;
total: number;
showControls: boolean;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, PaginationSlots>;
type __VLS_WithSlots<T, S> = T & {
new (): {
$slots: S;
};
};