@bigtablet/design-system 1.18.4 → 1.18.6
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/index.d.ts +72 -0
- package/dist/next.d.ts +16 -0
- package/package.json +8 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,9 +3,13 @@ import * as React from 'react';
|
|
|
3
3
|
import * as react_toastify from 'react-toastify';
|
|
4
4
|
|
|
5
5
|
interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
/** 카드 상단에 표시할 제목 */
|
|
6
7
|
heading?: React.ReactNode;
|
|
8
|
+
/** 카드 그림자 크기 (기본값: "sm") */
|
|
7
9
|
shadow?: "none" | "sm" | "md" | "lg";
|
|
10
|
+
/** 카드 내부 여백 (기본값: "md") */
|
|
8
11
|
padding?: "none" | "sm" | "md" | "lg";
|
|
12
|
+
/** 테두리 표시 여부 (기본값: false) */
|
|
9
13
|
bordered?: boolean;
|
|
10
14
|
}
|
|
11
15
|
/**
|
|
@@ -19,14 +23,23 @@ declare const Card: ({ heading, shadow, padding, bordered, className, children,
|
|
|
19
23
|
type AlertVariant = "info" | "success" | "warning" | "error";
|
|
20
24
|
type AlertActionsAlign = "left" | "center" | "right";
|
|
21
25
|
interface AlertOptions {
|
|
26
|
+
/** 알림 스타일 변형 (기본값: "info") */
|
|
22
27
|
variant?: AlertVariant;
|
|
28
|
+
/** 알림 제목 */
|
|
23
29
|
title?: React.ReactNode;
|
|
30
|
+
/** 알림 본문 메시지 */
|
|
24
31
|
message?: React.ReactNode;
|
|
32
|
+
/** 확인 버튼 텍스트 (기본값: "확인") */
|
|
25
33
|
confirmText?: string;
|
|
34
|
+
/** 취소 버튼 텍스트 (기본값: "취소") */
|
|
26
35
|
cancelText?: string;
|
|
36
|
+
/** 취소 버튼 표시 여부 (기본값: false) */
|
|
27
37
|
showCancel?: boolean;
|
|
38
|
+
/** 액션 버튼 정렬 (기본값: "right") */
|
|
28
39
|
actionsAlign?: AlertActionsAlign;
|
|
40
|
+
/** 확인 버튼 클릭 시 호출되는 콜백 */
|
|
29
41
|
onConfirm?: () => void;
|
|
42
|
+
/** 취소 버튼 클릭 시 호출되는 콜백 */
|
|
30
43
|
onCancel?: () => void;
|
|
31
44
|
}
|
|
32
45
|
interface AlertContextValue {
|
|
@@ -49,6 +62,7 @@ declare const AlertProvider: React.FC<{
|
|
|
49
62
|
}>;
|
|
50
63
|
|
|
51
64
|
interface SpinnerProps {
|
|
65
|
+
/** 스피너 크기(px) (기본값: 24) */
|
|
52
66
|
size?: number;
|
|
53
67
|
/** 스피너 접근성 레이블 (기본값: "Loading") */
|
|
54
68
|
ariaLabel?: string;
|
|
@@ -82,6 +96,7 @@ interface TopLoadingProps {
|
|
|
82
96
|
declare const TopLoading: ({ progress, color, height, isLoading, ariaLabel, }: TopLoadingProps) => react_jsx_runtime.JSX.Element | null;
|
|
83
97
|
|
|
84
98
|
interface ToastProviderProps {
|
|
99
|
+
/** 토스트 컨테이너 식별자 (기본값: "default") */
|
|
85
100
|
containerId?: string;
|
|
86
101
|
}
|
|
87
102
|
/**
|
|
@@ -101,7 +116,9 @@ declare const useToast: (containerId?: string) => {
|
|
|
101
116
|
};
|
|
102
117
|
|
|
103
118
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
119
|
+
/** 버튼 스타일 변형 (기본값: "primary") */
|
|
104
120
|
variant?: "primary" | "secondary" | "ghost" | "danger";
|
|
121
|
+
/** 버튼 크기 (기본값: "md") */
|
|
105
122
|
size?: "sm" | "md" | "lg";
|
|
106
123
|
/** 버튼이 컨테이너의 전체 너비를 차지할지 여부 */
|
|
107
124
|
fullWidth?: boolean;
|
|
@@ -120,8 +137,11 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
120
137
|
declare const Button: ({ variant, size, fullWidth, width, className, style, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
121
138
|
|
|
122
139
|
interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
140
|
+
/** 체크박스 옆에 표시할 라벨 */
|
|
123
141
|
label?: React.ReactNode;
|
|
142
|
+
/** 체크박스 크기 (기본값: "md") */
|
|
124
143
|
size?: "sm" | "md" | "lg";
|
|
144
|
+
/** 중간 선택(indeterminate) 상태 여부 */
|
|
125
145
|
indeterminate?: boolean;
|
|
126
146
|
}
|
|
127
147
|
/**
|
|
@@ -134,7 +154,9 @@ interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>
|
|
|
134
154
|
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
135
155
|
|
|
136
156
|
interface FileInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
157
|
+
/** 파일 선택 버튼 라벨 텍스트 (기본값: "파일 선택") */
|
|
137
158
|
label?: string;
|
|
159
|
+
/** 파일 선택 시 호출되는 콜백 */
|
|
138
160
|
onFiles?: (files: FileList | null) => void;
|
|
139
161
|
}
|
|
140
162
|
/**
|
|
@@ -146,7 +168,9 @@ interface FileInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
|
146
168
|
declare const FileInput: ({ label, onFiles, className, disabled, ...props }: FileInputProps) => react_jsx_runtime.JSX.Element;
|
|
147
169
|
|
|
148
170
|
interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
171
|
+
/** 라디오 버튼 옆에 표시할 라벨 */
|
|
149
172
|
label?: React.ReactNode;
|
|
173
|
+
/** 라디오 버튼 크기 (기본값: "md") */
|
|
150
174
|
size?: "sm" | "md" | "lg";
|
|
151
175
|
}
|
|
152
176
|
/**
|
|
@@ -166,18 +190,31 @@ interface SelectOption {
|
|
|
166
190
|
disabled?: boolean;
|
|
167
191
|
}
|
|
168
192
|
interface SelectProps {
|
|
193
|
+
/** 셀렉트 요소의 id (미입력 시 자동 생성) */
|
|
169
194
|
id?: string;
|
|
195
|
+
/** 셀렉트 위에 표시할 라벨 텍스트 */
|
|
170
196
|
label?: string;
|
|
197
|
+
/** 선택 전 표시할 플레이스홀더 (기본값: "Select…") */
|
|
171
198
|
placeholder?: string;
|
|
199
|
+
/** 표시할 옵션 목록 */
|
|
172
200
|
options: SelectOption[];
|
|
201
|
+
/** 제어형 선택 값 */
|
|
173
202
|
value?: string | null;
|
|
203
|
+
/** 값 변경 시 호출되는 콜백. 선택된 값과 전체 옵션 객체를 인자로 전달합니다. */
|
|
174
204
|
onChange?: (value: string | null, option?: SelectOption | null) => void;
|
|
205
|
+
/** 비제어형 초기 선택 값 */
|
|
175
206
|
defaultValue?: string | null;
|
|
207
|
+
/** 비활성화 여부 */
|
|
176
208
|
disabled?: boolean;
|
|
209
|
+
/** 셀렉트 크기 (기본값: "md") */
|
|
177
210
|
size?: SelectSize;
|
|
211
|
+
/** 셀렉트 스타일 변형 (기본값: "outline") */
|
|
178
212
|
variant?: SelectVariant;
|
|
213
|
+
/** 컨테이너 전체 너비 차지 여부 */
|
|
179
214
|
fullWidth?: boolean;
|
|
215
|
+
/** 루트 요소에 추가할 className */
|
|
180
216
|
className?: string;
|
|
217
|
+
/** 선택된 값 텍스트 정렬 (기본값: "left") */
|
|
181
218
|
textAlign?: "left" | "center";
|
|
182
219
|
}
|
|
183
220
|
/**
|
|
@@ -189,10 +226,15 @@ interface SelectProps {
|
|
|
189
226
|
declare const Select: ({ id, label, placeholder, options, value, onChange, defaultValue, disabled, size, variant, fullWidth, className, textAlign, }: SelectProps) => react_jsx_runtime.JSX.Element;
|
|
190
227
|
|
|
191
228
|
interface SwitchProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onChange"> {
|
|
229
|
+
/** 제어형 스위치 상태 */
|
|
192
230
|
checked?: boolean;
|
|
231
|
+
/** 비제어형 초기 스위치 상태 */
|
|
193
232
|
defaultChecked?: boolean;
|
|
233
|
+
/** 상태 변경 시 호출되는 콜백 */
|
|
194
234
|
onChange?: (checked: boolean) => void;
|
|
235
|
+
/** 스위치 크기 (기본값: "md") */
|
|
195
236
|
size?: "sm" | "md" | "lg";
|
|
237
|
+
/** 비활성화 여부 */
|
|
196
238
|
disabled?: boolean;
|
|
197
239
|
/** 스위치 접근성 레이블(스크린 리더용) */
|
|
198
240
|
ariaLabel: string;
|
|
@@ -209,18 +251,31 @@ declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAtt
|
|
|
209
251
|
type TextFieldVariant = "outline" | "filled" | "ghost";
|
|
210
252
|
type TextFieldSize = "sm" | "md" | "lg";
|
|
211
253
|
interface TextFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "onChange" | "value" | "defaultValue"> {
|
|
254
|
+
/** 입력 필드 위에 표시할 라벨 텍스트 */
|
|
212
255
|
label?: string;
|
|
256
|
+
/** 입력 필드 아래에 표시할 도움말 텍스트 */
|
|
213
257
|
helperText?: string;
|
|
258
|
+
/** 에러 상태 여부 */
|
|
214
259
|
error?: boolean;
|
|
260
|
+
/** 성공 상태 여부 */
|
|
215
261
|
success?: boolean;
|
|
262
|
+
/** 입력 필드 스타일 변형 (기본값: "outline") */
|
|
216
263
|
variant?: TextFieldVariant;
|
|
264
|
+
/** 입력 필드 크기 (기본값: "md") */
|
|
217
265
|
size?: TextFieldSize;
|
|
266
|
+
/** 입력 필드 왼쪽에 표시할 아이콘 */
|
|
218
267
|
leftIcon?: React.ReactNode;
|
|
268
|
+
/** 입력 필드 오른쪽에 표시할 아이콘 */
|
|
219
269
|
rightIcon?: React.ReactNode;
|
|
270
|
+
/** 컨테이너 전체 너비 차지 여부 */
|
|
220
271
|
fullWidth?: boolean;
|
|
272
|
+
/** 값 변경 시 호출되는 콜백 (IME 조합 완료 후 실행) */
|
|
221
273
|
onChangeAction?: (value: string) => void;
|
|
274
|
+
/** 제어형 입력 값 */
|
|
222
275
|
value?: string;
|
|
276
|
+
/** 비제어형 초기 입력 값 */
|
|
223
277
|
defaultValue?: string;
|
|
278
|
+
/** 입력값 변환 함수 (예: 숫자만 허용, 대문자 변환) */
|
|
224
279
|
transformValue?: (value: string) => string;
|
|
225
280
|
}
|
|
226
281
|
/**
|
|
@@ -235,14 +290,23 @@ declare const TextField: React.ForwardRefExoticComponent<TextFieldProps & React.
|
|
|
235
290
|
type DatePickerMode = "year-month" | "year-month-day";
|
|
236
291
|
type SelectableRange = "all" | "until-today";
|
|
237
292
|
interface DatePickerProps {
|
|
293
|
+
/** 데이트 피커 위에 표시할 라벨 텍스트 */
|
|
238
294
|
label?: string;
|
|
295
|
+
/** 제어형 날짜 값 ("YYYY-MM" 또는 "YYYY-MM-DD" 형식) */
|
|
239
296
|
value?: string;
|
|
297
|
+
/** 날짜 변경 시 호출되는 콜백. `mode` 값에 따라 "YYYY-MM" 또는 "YYYY-MM-DD" 형식의 문자열이 전달됩니다. */
|
|
240
298
|
onChange: (value: string) => void;
|
|
299
|
+
/** 선택 모드 (기본값: "year-month-day") */
|
|
241
300
|
mode?: DatePickerMode;
|
|
301
|
+
/** 연도 선택 범위 시작 (기본값: 1950) */
|
|
242
302
|
startYear?: number;
|
|
303
|
+
/** 연도 선택 범위 끝 (기본값: 현재 연도 + 10) */
|
|
243
304
|
endYear?: number;
|
|
305
|
+
/** 선택 가능한 최소 날짜 ("YYYY-MM-DD" 형식) */
|
|
244
306
|
minDate?: string;
|
|
307
|
+
/** 선택 가능한 날짜 범위 ("all": 제한 없음, "until-today": 오늘까지) */
|
|
245
308
|
selectableRange?: SelectableRange;
|
|
309
|
+
/** 비활성화 여부 */
|
|
246
310
|
disabled?: boolean;
|
|
247
311
|
/** 데이트 피커가 컨테이너의 전체 너비를 차지할지 여부 */
|
|
248
312
|
fullWidth?: boolean;
|
|
@@ -261,8 +325,11 @@ interface DatePickerProps {
|
|
|
261
325
|
declare const DatePicker: ({ label, value, onChange, mode, startYear, endYear, minDate, selectableRange, disabled, fullWidth, width, }: DatePickerProps) => react_jsx_runtime.JSX.Element;
|
|
262
326
|
|
|
263
327
|
interface PaginationProps {
|
|
328
|
+
/** 현재 페이지 번호 (1-based) */
|
|
264
329
|
page: number;
|
|
330
|
+
/** 전체 페이지 수 */
|
|
265
331
|
totalPages: number;
|
|
332
|
+
/** 페이지 변경 시 호출되는 콜백 */
|
|
266
333
|
onChange: (page: number) => void;
|
|
267
334
|
}
|
|
268
335
|
/**
|
|
@@ -274,10 +341,15 @@ interface PaginationProps {
|
|
|
274
341
|
declare const Pagination: ({ page, totalPages, onChange }: PaginationProps) => react_jsx_runtime.JSX.Element;
|
|
275
342
|
|
|
276
343
|
interface ModalProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
344
|
+
/** 모달 열림 여부 */
|
|
277
345
|
open: boolean;
|
|
346
|
+
/** 모달 닫기 콜백 */
|
|
278
347
|
onClose?: () => void;
|
|
348
|
+
/** 오버레이 클릭 시 닫기 여부 (기본값: true) */
|
|
279
349
|
closeOnOverlay?: boolean;
|
|
350
|
+
/** 모달 패널 너비 (기본값: 520) */
|
|
280
351
|
width?: number | string;
|
|
352
|
+
/** 모달 헤더에 표시할 제목 */
|
|
281
353
|
title?: React.ReactNode;
|
|
282
354
|
/** 모달 접근성 레이블(기본값: title 또는 "Dialog") */
|
|
283
355
|
ariaLabel?: string;
|
package/dist/next.d.ts
CHANGED
|
@@ -4,26 +4,42 @@ import { LucideIcon } from 'lucide-react';
|
|
|
4
4
|
|
|
5
5
|
type MatchMode = "startsWith" | "exact";
|
|
6
6
|
interface SidebarLinkItem {
|
|
7
|
+
/** 항목 타입 (생략 시 "link"로 간주) */
|
|
7
8
|
type?: "link";
|
|
9
|
+
/** 링크 경로 */
|
|
8
10
|
href: string;
|
|
11
|
+
/** 메뉴 항목에 표시할 라벨 */
|
|
9
12
|
label: React.ReactNode;
|
|
13
|
+
/** 메뉴 항목 앞에 표시할 아이콘 */
|
|
10
14
|
icon?: LucideIcon;
|
|
11
15
|
}
|
|
12
16
|
interface SidebarGroupItem {
|
|
17
|
+
/** 항목 타입 ("group"으로 고정) */
|
|
13
18
|
type: "group";
|
|
19
|
+
/** 그룹 고유 식별자 */
|
|
14
20
|
id: string;
|
|
21
|
+
/** 그룹 헤더에 표시할 라벨 */
|
|
15
22
|
label: React.ReactNode;
|
|
23
|
+
/** 그룹 헤더 앞에 표시할 아이콘 */
|
|
16
24
|
icon?: LucideIcon;
|
|
25
|
+
/** 그룹 하위 링크 항목 목록 */
|
|
17
26
|
children: SidebarLinkItem[];
|
|
18
27
|
}
|
|
19
28
|
type SidebarItem = SidebarLinkItem | SidebarGroupItem;
|
|
20
29
|
interface SidebarProps {
|
|
30
|
+
/** 사이드바에 표시할 메뉴 항목 목록 */
|
|
21
31
|
items?: SidebarItem[];
|
|
32
|
+
/** 현재 활성 경로 (활성 메뉴 항목 하이라이트에 사용) */
|
|
22
33
|
activePath?: string;
|
|
34
|
+
/** 메뉴 항목 클릭 시 호출되는 콜백 */
|
|
23
35
|
onItemSelect?: (href: string) => void;
|
|
36
|
+
/** 루트 요소에 추가할 className */
|
|
24
37
|
className?: string;
|
|
38
|
+
/** 루트 요소에 적용할 인라인 스타일 */
|
|
25
39
|
style?: React.CSSProperties;
|
|
40
|
+
/** 활성 경로 매칭 방식 (기본값: "startsWith") */
|
|
26
41
|
match?: MatchMode;
|
|
42
|
+
/** 브랜드 로고 클릭 시 이동할 경로 (기본값: "/main") */
|
|
27
43
|
brandHref?: string;
|
|
28
44
|
}
|
|
29
45
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigtablet/design-system",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.6",
|
|
4
4
|
"description": "Bigtablet Design System UI Components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -114,5 +114,12 @@
|
|
|
114
114
|
"publishConfig": {
|
|
115
115
|
"access": "public",
|
|
116
116
|
"registry": "https://registry.npmjs.org/"
|
|
117
|
+
},
|
|
118
|
+
"pnpm": {
|
|
119
|
+
"overrides": {
|
|
120
|
+
"rollup": "^4.59.0",
|
|
121
|
+
"lodash": "^4.17.23",
|
|
122
|
+
"lodash-es": "^4.17.23"
|
|
123
|
+
}
|
|
117
124
|
}
|
|
118
125
|
}
|