UNPKG

@esri/calcite-components

Version:

Web Components for Esri's Calcite Design System.

76 lines (75 loc) 2.85 kB
/// <reference path="../../index.d.ts" /> import type { PublicLitElement as LitElement } from "@arcgis/lumina"; import type { NumberingSystem } from "../../utils/locale.js"; import type { Scale } from "../interfaces.js"; /** * @cssproperty [--calcite-pagination-color] - Specifies the component's item color. * @cssproperty [--calcite-pagination-color-hover] - Specifies the component's item color when hovered or selected. * @cssproperty [--calcite-pagination-color-border-hover] - Specifies the component's item bottom border color when hovered. * @cssproperty [--calcite-pagination-color-border-active] - Specifies the component's item bottom border color when selected. * @cssproperty [--calcite-pagination-background-color] - Specifies the component's item background color when active. * @cssproperty [--calcite-pagination-icon-color-background-hover] - Specifies the component's chevron item background color when hovered. */ export abstract class Pagination extends LitElement { /** * When `true`, number values are displayed with a group separator corresponding to the language and country format. * * @default false */ accessor groupSeparator: boolean; /** Overrides individual strings used by the component. */ accessor messageOverrides: { next?: string; previous?: string; first?: string; last?: string; }; /** Specifies the Unicode numeral system used by the component for localization. */ accessor numberingSystem: NumberingSystem; /** * Specifies the number of items per page. * * @default 20 */ accessor pageSize: number; /** * Specifies the size of the component. * * @default "m" */ accessor scale: Scale; /** * Specifies the starting item number. * * @default 1 */ accessor startItem: number; /** * Specifies the total number of items. * * @default 0 */ accessor totalItems: number; /** * Set a specified page as active. * * @param page */ goTo(page: number | "start" | "end"): Promise<void>; /** Go to the next page of results. */ nextPage(): Promise<void>; /** Go to the previous page of results. */ previousPage(): Promise<void>; /** * Sets focus on the component's first focusable element. * * @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component. * @mdn [focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options) */ setFocus(options?: FocusOptions): Promise<void>; /** Emits when the selected page changes. */ readonly calcitePaginationChange: import("@arcgis/lumina").TargetedEvent<this, void>; readonly "@eventTypes": { calcitePaginationChange: Pagination["calcitePaginationChange"]["detail"]; }; }