@sytechui/pagination 2.2.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +24 -0
- package/dist/chunk-5S65XA6Q.mjs +82 -0
- package/dist/chunk-BIG4ST5P.mjs +217 -0
- package/dist/chunk-BNRXGTRW.mjs +18 -0
- package/dist/chunk-MA7OMMHX.mjs +18 -0
- package/dist/chunk-RL6XUYZP.mjs +235 -0
- package/dist/index.d.mts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +589 -0
- package/dist/index.mjs +27 -0
- package/dist/pagination-cursor.d.mts +12 -0
- package/dist/pagination-cursor.d.ts +12 -0
- package/dist/pagination-cursor.js +37 -0
- package/dist/pagination-cursor.mjs +7 -0
- package/dist/pagination-item.d.mts +11 -0
- package/dist/pagination-item.d.ts +11 -0
- package/dist/pagination-item.js +113 -0
- package/dist/pagination-item.mjs +8 -0
- package/dist/pagination.d.mts +13 -0
- package/dist/pagination.d.ts +13 -0
- package/dist/pagination.js +570 -0
- package/dist/pagination.mjs +11 -0
- package/dist/use-pagination-item.d.mts +53 -0
- package/dist/use-pagination-item.d.ts +53 -0
- package/dist/use-pagination-item.js +105 -0
- package/dist/use-pagination-item.mjs +7 -0
- package/dist/use-pagination.d.mts +374 -0
- package/dist/use-pagination.d.ts +374 -0
- package/dist/use-pagination.js +269 -0
- package/dist/use-pagination.mjs +9 -0
- package/package.json +63 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/use-pagination-item.ts
|
|
22
|
+
var use_pagination_item_exports = {};
|
|
23
|
+
__export(use_pagination_item_exports, {
|
|
24
|
+
usePaginationItem: () => usePaginationItem
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(use_pagination_item_exports);
|
|
27
|
+
var import_react = require("react");
|
|
28
|
+
var import_utils = require("@react-aria/utils");
|
|
29
|
+
var import_shared_utils = require("@sytechui/shared-utils");
|
|
30
|
+
var import_react_utils = require("@sytechui/react-utils");
|
|
31
|
+
var import_interactions = require("@react-aria/interactions");
|
|
32
|
+
var import_focus = require("@react-aria/focus");
|
|
33
|
+
var import_theme = require("@sytechui/theme");
|
|
34
|
+
function usePaginationItem(props) {
|
|
35
|
+
const {
|
|
36
|
+
as,
|
|
37
|
+
ref,
|
|
38
|
+
value,
|
|
39
|
+
children,
|
|
40
|
+
isActive,
|
|
41
|
+
isDisabled,
|
|
42
|
+
onPress,
|
|
43
|
+
onClick,
|
|
44
|
+
getAriaLabel,
|
|
45
|
+
className,
|
|
46
|
+
...otherProps
|
|
47
|
+
} = props;
|
|
48
|
+
const isLink = !!(props == null ? void 0 : props.href);
|
|
49
|
+
const Component = as || isLink ? "a" : "li";
|
|
50
|
+
const shouldFilterDOMProps = typeof Component === "string";
|
|
51
|
+
const domRef = (0, import_react_utils.useDOMRef)(ref);
|
|
52
|
+
const router = (0, import_utils.useRouter)();
|
|
53
|
+
const ariaLabel = (0, import_react.useMemo)(
|
|
54
|
+
() => isActive ? `${getAriaLabel == null ? void 0 : getAriaLabel(value)} active` : getAriaLabel == null ? void 0 : getAriaLabel(value),
|
|
55
|
+
[value, isActive]
|
|
56
|
+
);
|
|
57
|
+
const { isPressed, pressProps } = (0, import_interactions.usePress)({
|
|
58
|
+
isDisabled,
|
|
59
|
+
onPress
|
|
60
|
+
});
|
|
61
|
+
const { focusProps, isFocused, isFocusVisible } = (0, import_focus.useFocusRing)({});
|
|
62
|
+
const { isHovered, hoverProps } = (0, import_interactions.useHover)({ isDisabled });
|
|
63
|
+
const getItemProps = (props2 = {}) => {
|
|
64
|
+
return {
|
|
65
|
+
ref: domRef,
|
|
66
|
+
role: "button",
|
|
67
|
+
tabIndex: isDisabled ? -1 : 0,
|
|
68
|
+
"aria-label": ariaLabel,
|
|
69
|
+
"aria-current": (0, import_shared_utils.dataAttr)(isActive),
|
|
70
|
+
"aria-disabled": (0, import_shared_utils.dataAttr)(isDisabled),
|
|
71
|
+
"data-disabled": (0, import_shared_utils.dataAttr)(isDisabled),
|
|
72
|
+
"data-active": (0, import_shared_utils.dataAttr)(isActive),
|
|
73
|
+
"data-focus": (0, import_shared_utils.dataAttr)(isFocused),
|
|
74
|
+
"data-hover": (0, import_shared_utils.dataAttr)(isHovered),
|
|
75
|
+
"data-pressed": (0, import_shared_utils.dataAttr)(isPressed),
|
|
76
|
+
"data-focus-visible": (0, import_shared_utils.dataAttr)(isFocusVisible),
|
|
77
|
+
...(0, import_shared_utils.mergeProps)(
|
|
78
|
+
props2,
|
|
79
|
+
pressProps,
|
|
80
|
+
focusProps,
|
|
81
|
+
hoverProps,
|
|
82
|
+
(0, import_react_utils.filterDOMProps)(otherProps, {
|
|
83
|
+
enabled: shouldFilterDOMProps
|
|
84
|
+
})
|
|
85
|
+
),
|
|
86
|
+
className: (0, import_theme.cn)(className, props2.className),
|
|
87
|
+
onClick: (e) => {
|
|
88
|
+
(0, import_shared_utils.chain)(pressProps == null ? void 0 : pressProps.onClick, onClick)(e);
|
|
89
|
+
(0, import_utils.handleLinkClick)(e, router, props2.href, props2.routerOptions);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
return {
|
|
94
|
+
Component,
|
|
95
|
+
children,
|
|
96
|
+
ariaLabel,
|
|
97
|
+
isFocused,
|
|
98
|
+
isFocusVisible,
|
|
99
|
+
getItemProps
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
103
|
+
0 && (module.exports = {
|
|
104
|
+
usePaginationItem
|
|
105
|
+
});
|
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
2
|
+
import * as _sytechui_system from '@sytechui/system';
|
|
3
|
+
import { HTMLHeroUIProps, PropGetter } from '@sytechui/system';
|
|
4
|
+
import { SlotsToClasses, PaginationSlots, PaginationVariantProps } from '@sytechui/theme';
|
|
5
|
+
import { Ref, Key, ReactNode } from 'react';
|
|
6
|
+
import { PaginationItemValue, UsePaginationProps as UsePaginationProps$1 } from '@sytechui/use-pagination';
|
|
7
|
+
import { PressEvent } from '@react-types/shared';
|
|
8
|
+
|
|
9
|
+
type PaginationItemRenderProps = {
|
|
10
|
+
/**
|
|
11
|
+
* The pagination item ref.
|
|
12
|
+
*/
|
|
13
|
+
ref?: Ref<any>;
|
|
14
|
+
/**
|
|
15
|
+
* React key.
|
|
16
|
+
*/
|
|
17
|
+
key?: Key;
|
|
18
|
+
/**
|
|
19
|
+
* The pagination item value.
|
|
20
|
+
*/
|
|
21
|
+
children?: ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* The pagination item value.
|
|
24
|
+
*/
|
|
25
|
+
value: PaginationItemValue;
|
|
26
|
+
/**
|
|
27
|
+
* The pagination item index.
|
|
28
|
+
*/
|
|
29
|
+
index: number;
|
|
30
|
+
/**
|
|
31
|
+
* Calculated pagination item position. This includes the dots.
|
|
32
|
+
*/
|
|
33
|
+
page: number;
|
|
34
|
+
/**
|
|
35
|
+
* The pagination total number of pages.
|
|
36
|
+
*/
|
|
37
|
+
total: number;
|
|
38
|
+
/**
|
|
39
|
+
* The active page number.
|
|
40
|
+
*/
|
|
41
|
+
activePage: number;
|
|
42
|
+
/**
|
|
43
|
+
* Whether the pagination item is active.
|
|
44
|
+
*/
|
|
45
|
+
isActive: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Whether the item is before the active page.
|
|
48
|
+
*/
|
|
49
|
+
isBefore: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Whether the pagination item is the first item in the pagination.
|
|
52
|
+
*/
|
|
53
|
+
isFirst: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Whether the pagination item is the last item in the pagination.
|
|
56
|
+
*/
|
|
57
|
+
isLast: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Whether the pagination item is the next item in the pagination.
|
|
60
|
+
*/
|
|
61
|
+
isNext: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Number of pages that are added or subtracted on the '...' button.
|
|
64
|
+
* @default 5
|
|
65
|
+
*/
|
|
66
|
+
dotsJump: number;
|
|
67
|
+
/**
|
|
68
|
+
* Whether the pagination item is the previous item in the pagination.
|
|
69
|
+
*/
|
|
70
|
+
isPrevious: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* The pagination item className.
|
|
73
|
+
*/
|
|
74
|
+
className: string;
|
|
75
|
+
/**
|
|
76
|
+
* Callback to go to the next page.
|
|
77
|
+
*/
|
|
78
|
+
onNext: () => void;
|
|
79
|
+
/**
|
|
80
|
+
* Callback to go to the previous page.
|
|
81
|
+
*/
|
|
82
|
+
onPrevious: () => void;
|
|
83
|
+
/**
|
|
84
|
+
* Callback to go to the page.
|
|
85
|
+
*/
|
|
86
|
+
setPage: (page: number) => void;
|
|
87
|
+
/**
|
|
88
|
+
* Callback fired when the item is clicked.
|
|
89
|
+
* @param e PressEvent
|
|
90
|
+
*/
|
|
91
|
+
onPress?: (e: PressEvent) => void;
|
|
92
|
+
/**
|
|
93
|
+
* Function to get the aria-label of the item.
|
|
94
|
+
*/
|
|
95
|
+
getAriaLabel?: (page?: PaginationItemValue) => string | undefined;
|
|
96
|
+
};
|
|
97
|
+
interface Props extends Omit<HTMLHeroUIProps<"nav">, "onChange"> {
|
|
98
|
+
/**
|
|
99
|
+
* Ref to the DOM node.
|
|
100
|
+
*/
|
|
101
|
+
ref?: Ref<HTMLElement>;
|
|
102
|
+
/**
|
|
103
|
+
* Number of pages that are added or subtracted on the '...' button.
|
|
104
|
+
* @default 5
|
|
105
|
+
*/
|
|
106
|
+
dotsJump?: number;
|
|
107
|
+
/**
|
|
108
|
+
* Non disable next/previous controls
|
|
109
|
+
* @default false
|
|
110
|
+
*/
|
|
111
|
+
loop?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Whether the pagination should display controls (left/right arrows).
|
|
114
|
+
* @default true
|
|
115
|
+
*/
|
|
116
|
+
showControls?: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Render a custom pagination item.
|
|
119
|
+
* @param props Pagination item props
|
|
120
|
+
* @returns ReactNode
|
|
121
|
+
*/
|
|
122
|
+
renderItem?: (props: PaginationItemRenderProps) => ReactNode;
|
|
123
|
+
/**
|
|
124
|
+
* Function to get the aria-label of the item. If not provided, pagination will use the default one.
|
|
125
|
+
*/
|
|
126
|
+
getItemAriaLabel?: (page?: string | PaginationItemValue) => string;
|
|
127
|
+
/**
|
|
128
|
+
* Classname or List of classes to change the classNames of the element.
|
|
129
|
+
* if `className` is passed, it will be added to the base slot.
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* ```ts
|
|
133
|
+
* <Pagination classNames={{
|
|
134
|
+
* base:"base-classes",
|
|
135
|
+
* prev: "prev-classes", // prev button classes
|
|
136
|
+
* item: "item-classes",
|
|
137
|
+
* next: "next-classes", // next button classes
|
|
138
|
+
* cursor: "cursor-classes", // this is the one that moves when an item is selected
|
|
139
|
+
* forwardIcon: "forward-icon-classes", // forward icon
|
|
140
|
+
* ellipsis: "ellipsis-classes", // ellipsis icon
|
|
141
|
+
* chevronNext: "chevron-next-classes", // chevron next icon
|
|
142
|
+
* }} />
|
|
143
|
+
* ```
|
|
144
|
+
*/
|
|
145
|
+
classNames?: SlotsToClasses<PaginationSlots>;
|
|
146
|
+
}
|
|
147
|
+
type UsePaginationProps = Props & UsePaginationProps$1 & PaginationVariantProps;
|
|
148
|
+
declare const CURSOR_TRANSITION_TIMEOUT = 300;
|
|
149
|
+
declare function usePagination(originalProps: UsePaginationProps): {
|
|
150
|
+
Component: _sytechui_system.As<any>;
|
|
151
|
+
showControls: boolean;
|
|
152
|
+
dotsJump: number;
|
|
153
|
+
slots: {
|
|
154
|
+
base: (slotProps?: ({
|
|
155
|
+
size?: "md" | "sm" | "lg" | undefined;
|
|
156
|
+
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
157
|
+
radius?: "none" | "md" | "full" | "sm" | "lg" | undefined;
|
|
158
|
+
isDisabled?: boolean | undefined;
|
|
159
|
+
disableAnimation?: boolean | undefined;
|
|
160
|
+
variant?: "flat" | "bordered" | "faded" | "light" | undefined;
|
|
161
|
+
isCompact?: boolean | undefined;
|
|
162
|
+
showShadow?: boolean | undefined;
|
|
163
|
+
disableCursorAnimation?: boolean | undefined;
|
|
164
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
165
|
+
wrapper: (slotProps?: ({
|
|
166
|
+
size?: "md" | "sm" | "lg" | undefined;
|
|
167
|
+
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
168
|
+
radius?: "none" | "md" | "full" | "sm" | "lg" | undefined;
|
|
169
|
+
isDisabled?: boolean | undefined;
|
|
170
|
+
disableAnimation?: boolean | undefined;
|
|
171
|
+
variant?: "flat" | "bordered" | "faded" | "light" | undefined;
|
|
172
|
+
isCompact?: boolean | undefined;
|
|
173
|
+
showShadow?: boolean | undefined;
|
|
174
|
+
disableCursorAnimation?: boolean | undefined;
|
|
175
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
176
|
+
item: (slotProps?: ({
|
|
177
|
+
size?: "md" | "sm" | "lg" | undefined;
|
|
178
|
+
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
179
|
+
radius?: "none" | "md" | "full" | "sm" | "lg" | undefined;
|
|
180
|
+
isDisabled?: boolean | undefined;
|
|
181
|
+
disableAnimation?: boolean | undefined;
|
|
182
|
+
variant?: "flat" | "bordered" | "faded" | "light" | undefined;
|
|
183
|
+
isCompact?: boolean | undefined;
|
|
184
|
+
showShadow?: boolean | undefined;
|
|
185
|
+
disableCursorAnimation?: boolean | undefined;
|
|
186
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
187
|
+
prev: (slotProps?: ({
|
|
188
|
+
size?: "md" | "sm" | "lg" | undefined;
|
|
189
|
+
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
190
|
+
radius?: "none" | "md" | "full" | "sm" | "lg" | undefined;
|
|
191
|
+
isDisabled?: boolean | undefined;
|
|
192
|
+
disableAnimation?: boolean | undefined;
|
|
193
|
+
variant?: "flat" | "bordered" | "faded" | "light" | undefined;
|
|
194
|
+
isCompact?: boolean | undefined;
|
|
195
|
+
showShadow?: boolean | undefined;
|
|
196
|
+
disableCursorAnimation?: boolean | undefined;
|
|
197
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
198
|
+
next: (slotProps?: ({
|
|
199
|
+
size?: "md" | "sm" | "lg" | undefined;
|
|
200
|
+
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
201
|
+
radius?: "none" | "md" | "full" | "sm" | "lg" | undefined;
|
|
202
|
+
isDisabled?: boolean | undefined;
|
|
203
|
+
disableAnimation?: boolean | undefined;
|
|
204
|
+
variant?: "flat" | "bordered" | "faded" | "light" | undefined;
|
|
205
|
+
isCompact?: boolean | undefined;
|
|
206
|
+
showShadow?: boolean | undefined;
|
|
207
|
+
disableCursorAnimation?: boolean | undefined;
|
|
208
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
209
|
+
cursor: (slotProps?: ({
|
|
210
|
+
size?: "md" | "sm" | "lg" | undefined;
|
|
211
|
+
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
212
|
+
radius?: "none" | "md" | "full" | "sm" | "lg" | undefined;
|
|
213
|
+
isDisabled?: boolean | undefined;
|
|
214
|
+
disableAnimation?: boolean | undefined;
|
|
215
|
+
variant?: "flat" | "bordered" | "faded" | "light" | undefined;
|
|
216
|
+
isCompact?: boolean | undefined;
|
|
217
|
+
showShadow?: boolean | undefined;
|
|
218
|
+
disableCursorAnimation?: boolean | undefined;
|
|
219
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
220
|
+
forwardIcon: (slotProps?: ({
|
|
221
|
+
size?: "md" | "sm" | "lg" | undefined;
|
|
222
|
+
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
223
|
+
radius?: "none" | "md" | "full" | "sm" | "lg" | undefined;
|
|
224
|
+
isDisabled?: boolean | undefined;
|
|
225
|
+
disableAnimation?: boolean | undefined;
|
|
226
|
+
variant?: "flat" | "bordered" | "faded" | "light" | undefined;
|
|
227
|
+
isCompact?: boolean | undefined;
|
|
228
|
+
showShadow?: boolean | undefined;
|
|
229
|
+
disableCursorAnimation?: boolean | undefined;
|
|
230
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
231
|
+
ellipsis: (slotProps?: ({
|
|
232
|
+
size?: "md" | "sm" | "lg" | undefined;
|
|
233
|
+
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
234
|
+
radius?: "none" | "md" | "full" | "sm" | "lg" | undefined;
|
|
235
|
+
isDisabled?: boolean | undefined;
|
|
236
|
+
disableAnimation?: boolean | undefined;
|
|
237
|
+
variant?: "flat" | "bordered" | "faded" | "light" | undefined;
|
|
238
|
+
isCompact?: boolean | undefined;
|
|
239
|
+
showShadow?: boolean | undefined;
|
|
240
|
+
disableCursorAnimation?: boolean | undefined;
|
|
241
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
242
|
+
chevronNext: (slotProps?: ({
|
|
243
|
+
size?: "md" | "sm" | "lg" | undefined;
|
|
244
|
+
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
245
|
+
radius?: "none" | "md" | "full" | "sm" | "lg" | undefined;
|
|
246
|
+
isDisabled?: boolean | undefined;
|
|
247
|
+
disableAnimation?: boolean | undefined;
|
|
248
|
+
variant?: "flat" | "bordered" | "faded" | "light" | undefined;
|
|
249
|
+
isCompact?: boolean | undefined;
|
|
250
|
+
showShadow?: boolean | undefined;
|
|
251
|
+
disableCursorAnimation?: boolean | undefined;
|
|
252
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
253
|
+
} & {
|
|
254
|
+
base: (slotProps?: ({
|
|
255
|
+
size?: "md" | "sm" | "lg" | undefined;
|
|
256
|
+
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
257
|
+
radius?: "none" | "md" | "full" | "sm" | "lg" | undefined;
|
|
258
|
+
isDisabled?: boolean | undefined;
|
|
259
|
+
disableAnimation?: boolean | undefined;
|
|
260
|
+
variant?: "flat" | "bordered" | "faded" | "light" | undefined;
|
|
261
|
+
isCompact?: boolean | undefined;
|
|
262
|
+
showShadow?: boolean | undefined;
|
|
263
|
+
disableCursorAnimation?: boolean | undefined;
|
|
264
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
265
|
+
wrapper: (slotProps?: ({
|
|
266
|
+
size?: "md" | "sm" | "lg" | undefined;
|
|
267
|
+
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
268
|
+
radius?: "none" | "md" | "full" | "sm" | "lg" | undefined;
|
|
269
|
+
isDisabled?: boolean | undefined;
|
|
270
|
+
disableAnimation?: boolean | undefined;
|
|
271
|
+
variant?: "flat" | "bordered" | "faded" | "light" | undefined;
|
|
272
|
+
isCompact?: boolean | undefined;
|
|
273
|
+
showShadow?: boolean | undefined;
|
|
274
|
+
disableCursorAnimation?: boolean | undefined;
|
|
275
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
276
|
+
item: (slotProps?: ({
|
|
277
|
+
size?: "md" | "sm" | "lg" | undefined;
|
|
278
|
+
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
279
|
+
radius?: "none" | "md" | "full" | "sm" | "lg" | undefined;
|
|
280
|
+
isDisabled?: boolean | undefined;
|
|
281
|
+
disableAnimation?: boolean | undefined;
|
|
282
|
+
variant?: "flat" | "bordered" | "faded" | "light" | undefined;
|
|
283
|
+
isCompact?: boolean | undefined;
|
|
284
|
+
showShadow?: boolean | undefined;
|
|
285
|
+
disableCursorAnimation?: boolean | undefined;
|
|
286
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
287
|
+
prev: (slotProps?: ({
|
|
288
|
+
size?: "md" | "sm" | "lg" | undefined;
|
|
289
|
+
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
290
|
+
radius?: "none" | "md" | "full" | "sm" | "lg" | undefined;
|
|
291
|
+
isDisabled?: boolean | undefined;
|
|
292
|
+
disableAnimation?: boolean | undefined;
|
|
293
|
+
variant?: "flat" | "bordered" | "faded" | "light" | undefined;
|
|
294
|
+
isCompact?: boolean | undefined;
|
|
295
|
+
showShadow?: boolean | undefined;
|
|
296
|
+
disableCursorAnimation?: boolean | undefined;
|
|
297
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
298
|
+
next: (slotProps?: ({
|
|
299
|
+
size?: "md" | "sm" | "lg" | undefined;
|
|
300
|
+
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
301
|
+
radius?: "none" | "md" | "full" | "sm" | "lg" | undefined;
|
|
302
|
+
isDisabled?: boolean | undefined;
|
|
303
|
+
disableAnimation?: boolean | undefined;
|
|
304
|
+
variant?: "flat" | "bordered" | "faded" | "light" | undefined;
|
|
305
|
+
isCompact?: boolean | undefined;
|
|
306
|
+
showShadow?: boolean | undefined;
|
|
307
|
+
disableCursorAnimation?: boolean | undefined;
|
|
308
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
309
|
+
cursor: (slotProps?: ({
|
|
310
|
+
size?: "md" | "sm" | "lg" | undefined;
|
|
311
|
+
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
312
|
+
radius?: "none" | "md" | "full" | "sm" | "lg" | undefined;
|
|
313
|
+
isDisabled?: boolean | undefined;
|
|
314
|
+
disableAnimation?: boolean | undefined;
|
|
315
|
+
variant?: "flat" | "bordered" | "faded" | "light" | undefined;
|
|
316
|
+
isCompact?: boolean | undefined;
|
|
317
|
+
showShadow?: boolean | undefined;
|
|
318
|
+
disableCursorAnimation?: boolean | undefined;
|
|
319
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
320
|
+
forwardIcon: (slotProps?: ({
|
|
321
|
+
size?: "md" | "sm" | "lg" | undefined;
|
|
322
|
+
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
323
|
+
radius?: "none" | "md" | "full" | "sm" | "lg" | undefined;
|
|
324
|
+
isDisabled?: boolean | undefined;
|
|
325
|
+
disableAnimation?: boolean | undefined;
|
|
326
|
+
variant?: "flat" | "bordered" | "faded" | "light" | undefined;
|
|
327
|
+
isCompact?: boolean | undefined;
|
|
328
|
+
showShadow?: boolean | undefined;
|
|
329
|
+
disableCursorAnimation?: boolean | undefined;
|
|
330
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
331
|
+
ellipsis: (slotProps?: ({
|
|
332
|
+
size?: "md" | "sm" | "lg" | undefined;
|
|
333
|
+
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
334
|
+
radius?: "none" | "md" | "full" | "sm" | "lg" | undefined;
|
|
335
|
+
isDisabled?: boolean | undefined;
|
|
336
|
+
disableAnimation?: boolean | undefined;
|
|
337
|
+
variant?: "flat" | "bordered" | "faded" | "light" | undefined;
|
|
338
|
+
isCompact?: boolean | undefined;
|
|
339
|
+
showShadow?: boolean | undefined;
|
|
340
|
+
disableCursorAnimation?: boolean | undefined;
|
|
341
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
342
|
+
chevronNext: (slotProps?: ({
|
|
343
|
+
size?: "md" | "sm" | "lg" | undefined;
|
|
344
|
+
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
345
|
+
radius?: "none" | "md" | "full" | "sm" | "lg" | undefined;
|
|
346
|
+
isDisabled?: boolean | undefined;
|
|
347
|
+
disableAnimation?: boolean | undefined;
|
|
348
|
+
variant?: "flat" | "bordered" | "faded" | "light" | undefined;
|
|
349
|
+
isCompact?: boolean | undefined;
|
|
350
|
+
showShadow?: boolean | undefined;
|
|
351
|
+
disableCursorAnimation?: boolean | undefined;
|
|
352
|
+
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
353
|
+
} & {};
|
|
354
|
+
classNames: SlotsToClasses<"prev" | "next" | "base" | "cursor" | "wrapper" | "ellipsis" | "chevronNext" | "item" | "forwardIcon"> | undefined;
|
|
355
|
+
loop: boolean;
|
|
356
|
+
total: number;
|
|
357
|
+
range: PaginationItemValue[];
|
|
358
|
+
activePage: number;
|
|
359
|
+
getItemRef: (node: HTMLElement | null, value: number) => void;
|
|
360
|
+
disableAnimation: boolean;
|
|
361
|
+
disableCursorAnimation: boolean;
|
|
362
|
+
setPage: (pageNumber: number) => void;
|
|
363
|
+
onPrevious: () => void;
|
|
364
|
+
onNext: () => void;
|
|
365
|
+
renderItem: ((props: PaginationItemRenderProps) => ReactNode) | undefined;
|
|
366
|
+
getBaseProps: PropGetter;
|
|
367
|
+
getWrapperProps: PropGetter;
|
|
368
|
+
getItemProps: PropGetter;
|
|
369
|
+
getCursorProps: PropGetter;
|
|
370
|
+
getItemAriaLabel: (page?: string | PaginationItemValue) => string | undefined;
|
|
371
|
+
};
|
|
372
|
+
type UsePaginationReturn = ReturnType<typeof usePagination>;
|
|
373
|
+
|
|
374
|
+
export { CURSOR_TRANSITION_TIMEOUT, type PaginationItemRenderProps, type UsePaginationProps, type UsePaginationReturn, usePagination };
|