@1d1s/design-system 1.4.1 → 2.0.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.
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Pagination/Pagination.d.ts +28 -0
- package/dist/components/Pagination/index.d.ts +1 -0
- package/dist/components/TextField/TextArea.d.ts +1 -0
- package/dist/components/TextField/TextField.d.ts +2 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.es.js +157 -157
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
declare const buttonVariants: (props?: ({
|
|
3
|
-
variant?: "
|
|
4
|
-
size?: "
|
|
3
|
+
variant?: "primary" | "secondary" | "soft" | "ghost" | "danger" | null | undefined;
|
|
4
|
+
size?: "sm" | "md" | "lg" | "xs" | "xl" | "icon" | null | undefined;
|
|
5
5
|
pill?: boolean | null | undefined;
|
|
6
6
|
fullWidth?: boolean | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -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';
|
|
@@ -22,6 +22,8 @@ export interface TextFieldProps extends Omit<React.InputHTMLAttributes<HTMLInput
|
|
|
22
22
|
multiline?: boolean;
|
|
23
23
|
rows?: number;
|
|
24
24
|
cols?: number;
|
|
25
|
+
/** 우하단 글자수 카운터 (multiline 전용). `maxLength`와 함께 쓰면 `n/max` 표시 */
|
|
26
|
+
count?: boolean;
|
|
25
27
|
}
|
|
26
28
|
/**
|
|
27
29
|
* TextField v3.1
|
|
@@ -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';
|