@trimble-oss/moduswebcomponents
Version:
Modus Web Components is a modern, accessible UI library built with Stencil JS that provides reusable web components following Trimble's Modus design system. This updated version focuses on improved flexibility, enhanced theming options, comprehensive cust
54 lines (53 loc) • 1.86 kB
TypeScript
import { EventEmitter } from '../../stencil-public-runtime';
import { ModusSize } from '../types';
/** Aria label values for pagination buttons */
export interface IAriaLabelValues {
/** Aria label for the first page button */
firstPage?: string;
/** Aria label for the last page button */
lastPage?: string;
/** Aria label for the next page button */
nextPage?: string;
/** Aria label for the page number button. Use {0} as placeholder for the page number */
page?: string;
/** Aria label for the previous page button */
previousPage?: string;
}
export interface IPageChange {
/** The number of the newly selected page */
newPage: number;
/** The number of the previously selected page */
prevPage: number;
}
/**
* Pagination component to navigate through pages of content
*/
export declare class ModusWcPagination {
private inheritedAttributes;
private readonly maxVisibleButtons;
/** Reference to the host element */
el: HTMLElement;
/** Aria label values for pagination buttons */
ariaLabelValues?: IAriaLabelValues;
/** Total number of pages */
count: number;
/** Custom CSS class to apply */
customClass?: string;
/** The next page button text. If not set, an icon control will be used. */
nextButtonText?: string;
/** The current page number */
page: number;
/** The previous page button text. If not set, an icon control will be used. */
prevButtonText?: string;
/** Size of the pagination buttons */
size: ModusSize;
/** Event emitted when page changes */
pageChange: EventEmitter<IPageChange>;
/** Internal state to track visible page numbers */
private visiblePages;
calculateVisiblePages(): void;
componentWillLoad(): void;
private getClasses;
private handlePageClick;
render(): any;
}