@rhds/elements
Version:
Red Hat Design System Elements
68 lines (67 loc) • 2.1 kB
TypeScript
import type { PropertyValues } from 'lit';
import { LitElement } from 'lit';
/**
* A paginator allows users to navigate between pages of related content.
*
* @summary Allows users to navigate content divided into pages
*
* @alias pagination
*
*/
export declare class RhPagination extends LitElement {
#private;
static readonly styles: CSSStyleSheet[];
private static instances;
/**
* Override `overflow` values set from HTML or JS.
* `overflow` should ideally be private, but because
* we can't do `::slotted(nav ol li)`, we need to reflect
* it to a host attribute, so that lightdom CSS can target
* the list items.
*/
overflow: 'start' | 'end' | 'both' | null;
/** Accessible label for the 'nav' element */
label: string;
/** Accessible label for the 'first page' button */
labelFirst: string;
/** Accessible label for the 'previous page' button */
labelPrevious: string;
/** Accessible label for the 'next page' button */
labelNext: string;
/** Accessible label for the 'last page' button */
labelLast: string;
/** Change pagination size to small */
size: 'sm' | null;
/** "Open" variant */
variant?: 'open' | null;
private input?;
private total;
private firstHref?;
private lastHref?;
private nextHref?;
private prevHref?;
private currentHref?;
connectedCallback(): void;
disconnectedCallback(): void;
update(changed: PropertyValues<this>): void;
updated(): void;
render(): import("lit-html").TemplateResult<1>;
/** Navigate to the first page */
first(): Promise<number>;
/** Navigate to the previous page */
prev(): Promise<number>;
/** Navigate to the next page */
next(): Promise<number>;
/** Navigate to the last page */
last(): Promise<number>;
/**
* Navigate to a specific page
* @param page
*/
go(page: 'first' | 'prev' | 'next' | 'last' | number): Promise<number>;
}
declare global {
interface HTMLElementTagNameMap {
'rh-pagination': RhPagination;
}
}