UNPKG

@empathyco/x-components

Version:
125 lines 3.43 kB
import type { Dictionary } from '@empathyco/x-utils'; import type { PropType } from 'vue'; interface PageItem { value: number | string; isSelected: boolean; } /** * Component that renders a pagination control with buttons for navigating * between pages. It displays the current page, allows selecting other pages, * and emits events when a page is selected. * * @public */ declare const _default: import("vue").DefineComponent<{ /** * CSS classes to customize the prev/next buttons. */ buttonClasses: { type: PropType<(string | Dictionary<boolean>)[]>; default: () => never[]; }; /** * The current page number. */ currentPage: { type: NumberConstructor; required: true; }; /** * The string content of the hidden pages. */ hiddenPage: { type: StringConstructor; default: string; }; /** * CSS classes to customize the page items. */ itemClasses: { type: PropType<(isSelected: boolean) => string | Dictionary<boolean> | (string | Dictionary<boolean>)[]>; default: () => never[]; }; /** * The number of pages to show before and after the current page. */ range: { type: NumberConstructor; default: number; }; /** * The class of the scroll container to scroll to top when a page is selected. */ scrollTarget: { type: StringConstructor; default: string; }; /** * The total number of pages. */ totalPages: { type: NumberConstructor; required: true; }; }, { visiblePages: import("vue").ComputedRef<PageItem[]>; selectPage: (page: number | string) => void; }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ /** * CSS classes to customize the prev/next buttons. */ buttonClasses: { type: PropType<(string | Dictionary<boolean>)[]>; default: () => never[]; }; /** * The current page number. */ currentPage: { type: NumberConstructor; required: true; }; /** * The string content of the hidden pages. */ hiddenPage: { type: StringConstructor; default: string; }; /** * CSS classes to customize the page items. */ itemClasses: { type: PropType<(isSelected: boolean) => string | Dictionary<boolean> | (string | Dictionary<boolean>)[]>; default: () => never[]; }; /** * The number of pages to show before and after the current page. */ range: { type: NumberConstructor; default: number; }; /** * The class of the scroll container to scroll to top when a page is selected. */ scrollTarget: { type: StringConstructor; default: string; }; /** * The total number of pages. */ totalPages: { type: NumberConstructor; required: true; }; }>>, { buttonClasses: (string | Dictionary<boolean>)[]; hiddenPage: string; itemClasses: (isSelected: boolean) => string | Dictionary<boolean> | (string | Dictionary<boolean>)[]; range: number; scrollTarget: string; }, {}>; export default _default; //# sourceMappingURL=page-selector.vue?vue&type=script&lang.d.ts.map