@1d1s/design-system 1.4.1 → 1.5.0

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.
@@ -0,0 +1,28 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from "react";
3
+ declare const itemVariants: (props?: ({
4
+ size?: "sm" | "md" | "lg" | null | undefined;
5
+ active?: boolean | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ export interface PaginationProps extends Omit<React.HTMLAttributes<HTMLElement>, "onChange">, VariantProps<typeof itemVariants> {
8
+ /** 전체 페이지 수 */
9
+ count: number;
10
+ /** 현재 페이지 (1-indexed, controlled) */
11
+ page?: number;
12
+ /** 초기 페이지 (1-indexed, uncontrolled) */
13
+ defaultPage?: number;
14
+ onPageChange?(page: number): void;
15
+ /** 현재 페이지 양옆에 노출할 형제 페이지 수 (기본 1) */
16
+ siblingCount?: number;
17
+ }
18
+ /**
19
+ * Pagination
20
+ * 페이지 번호 + 이전/다음 화살표. 페이지 수가 많으면 "…"로 축약한다.
21
+ *
22
+ * @example
23
+ * ```tsx
24
+ * <Pagination count={20} defaultPage={1} onPageChange={(p) => fetchPage(p)} />
25
+ * ```
26
+ */
27
+ export declare function Pagination({ count, page, defaultPage, onPageChange, siblingCount, size, className, ...props }: PaginationProps): React.ReactElement;
28
+ export {};
@@ -0,0 +1 @@
1
+ export * from './Pagination';
@@ -25,6 +25,7 @@ export type { IconName, IconProps } from './Icons/Icon';
25
25
  export * from './ImagePicker';
26
26
  export * from './ImagePlaceholder';
27
27
  export * from './PageWatermark';
28
+ export * from './Pagination';
28
29
  export * from './ProgressBar';
29
30
  export * from './Radio';
30
31
  export * from './ScheduleCalendar';