import { type IEventEmitter } from '@breadstone/mosaik-elements'; import type { IPaginatedEventDetail } from '../../../events/PaginatorEvents'; import { CustomElement } from '../../Abstracts/CustomElement'; import { IPaginatorElementProps } from './IPaginatorElementProps'; import { PaginatorElementIntl } from './PaginatorElementIntl'; declare const PaginatorElement_base: (abstract new (...args: Array) => import("../../../Behaviors/Themeable").IThemeableProps) & (abstract new (...args: Array) => import("../../../Behaviors/Disableable").IDisableableProps) & (abstract new (...args: Array) => import("../../../Behaviors/Variantable").IVariantableProps) & (abstract new (...args: Array) => import("../../../Behaviors/Appearanceable").IAppearanceableProps) & typeof CustomElement & import("../../../Behaviors/Themeable").IThemeableCtor; /** * Paginator - A component that provides pagination controls for navigating through large datasets. * * @description The Paginator component is designed to allow users to navigate through paginated content. It typically includes controls like "Next", "Previous", and page numbers, enabling users to move between different pages of a dataset without needing to load everything at once. * * @name Paginator * @element mosaik-paginator * @category UI Components * * @slot previous - The slot for the "Previous" button in the paginator. * @slot next - The slot for the "Next" button in the paginator. * @slot pages - The slot for the page number buttons. * * @csspart container - The main container element. * @csspart first - The first page button. * @csspart previous - The previous page button. * @csspart pages-container - The container for the page number buttons. * @csspart page - Individual page button. * @csspart next - The next page button. * @csspart last - The last page button. * @csspart range-container - The container for the page range display. * @csspart range - The range display showing current page range. * @csspart size-selector-container - The container for the page size selector. * @csspart size-selector - The page size selector itself. * * @cssprop {String} --paginator-font-family - The font-family property for the paginator text. * @cssprop {String} --paginator-font-size - The font-size property for the paginator text. * @cssprop {String} --paginator-font-line-height - The line-height property for the paginator text. * @cssprop {String} --paginator-font-weight - The font-weight property for the paginator text. * @cssprop {String} --paginator-font-letter-spacing - The letter-spacing property for the paginator text. * @cssprop {String} --paginator-font-text-decoration - The text-decoration property for the paginator text. * @cssprop {String} --paginator-font-text-transform - The text-transform property for the paginator text. * @cssprop {Color} --paginator-background-color - The background-color property for the paginator. * @cssprop {Color} --paginator-border-color - The border-color property for the paginator. * @cssprop {Color} --paginator-foreground-color - The foreground-color property for the paginator. * @cssprop {String} --paginator-border-width - The border-width property for the paginator. * @cssprop {String} --paginator-border-radius - The border-radius property for the paginator. * @cssprop {String} --paginator-border-style - The border-style property for the paginator. * @cssprop {String} --paginator-shadow - The shadow property for the paginator. * @cssprop {String} --paginator-gap - The gap property between paginator elements. * * @dependency {ButtonElement} - The Button element used for pagination controls. * @dependency {TextElement} - The Text element used for displaying page numbers. * @dependency {SelectElement} - The Select element used for selecting page sizes. * * @fires pageChanged {PageChangedEvent} - Fired when the current page changes. * @fires pageSizeChanged {PageSizeChangedEvent} - Fired when the page size changes. * * @example * Basic paginator: * ```html * * ``` * * @example * Paginator with page size selector: * ```html * * * ``` * * @public */ export declare class PaginatorElement extends PaginatorElement_base implements IPaginatorElementProps { private readonly _intl; private readonly _pageChanged; private readonly _pageSizeChanged; private _total; private _size; private _sizes; private _showSizes; private _currentPage; private _showFirstLastButtons; /** * @public */ constructor(); /** * Returns the `is` property. * The `is` property represents natural name of this element. * * @public * @static * @readonly */ static get is(): string; /** * Gets or sets the `total` property. * * @public * @attr */ get total(): number; set total(value: number); /** * Gets or sets the `size` property. * * @public * @attr */ get size(): number; set size(value: number); /** * Gets or sets the `sizes` property. * * @public * @attr */ get sizes(): Array; set sizes(value: Array); /** * Gets or sets the `showSizes` property. * * @public * @attr */ get showSizes(): boolean; set showSizes(value: boolean); /** * Returns the `intl` property. * * @public * @readonly */ get intl(): PaginatorElementIntl; /** * Gets or sets the `currentPage` property (0-based index). * * @public * @attr */ get currentPage(): number; set currentPage(value: number); /** * Gets or sets the `showFirstLastButtons` property. * * @public * @attr */ get showFirstLastButtons(): boolean; set showFirstLastButtons(value: boolean); /** * Gets the total number of pages. * * @public * @readonly */ get totalPages(): number; /** * Gets the start index of the current page range (1-based). * * @public * @readonly */ get rangeStart(): number; /** * Gets the end index of the current page range (1-based). * * @public * @readonly */ get rangeEnd(): number; /** * Gets a value indicating whether there is a previous page. * * @public * @readonly */ get hasPreviousPage(): boolean; /** * Gets a value indicating whether there is a next page. * * @public * @readonly */ get hasNextPage(): boolean; /** * Called when the page changes. * Provides reference to the `IEventEmitter` as event argument. * * @public * @eventProperty * @readonly */ get pageChanged(): IEventEmitter; /** * Called when the page size changes. * Provides reference to the `IEventEmitter` as event argument. * * @public * @eventProperty * @readonly */ get pageSizeChanged(): IEventEmitter; /** * Navigates to the first page. * * @public */ goToFirstPage(): void; /** * Navigates to the last page. * * @public */ goToLastPage(): void; /** * Navigates to the next page. * * @public */ goToNextPage(): void; /** * Navigates to the previous page. * * @public */ goToPreviousPage(): void; /** * Navigates to a specific page (0-based index). * * @public * @param pageIndex - The page index to navigate to. */ goToPage(pageIndex: number): void; /** * Changes the page size and resets to the first page. * * @public * @param newSize - The new page size. */ changePageSize(newSize: number): void; /** * Calculates the page buttons for pagination. * * @private * @template * @param total - Total number of items. * @param size - Number of items per page. * @returns An array of page numbers. */ calculatePages(total: number, size: number): Array; } /** * @public */ export declare namespace PaginatorElement { type Props = IPaginatorElementProps; } /** * @public */ declare global { interface HTMLElementTagNameMap { 'mosaik-paginator': PaginatorElement; } } export {}; //# sourceMappingURL=PaginatorElement.d.ts.map