@bigtablet/design-system 1.18.1 → 1.18.3
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.css +2 -0
- package/dist/index.d.ts +108 -9
- package/dist/index.js +1 -1
- package/dist/next.d.ts +6 -0
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -431,9 +431,11 @@
|
|
|
431
431
|
position: relative;
|
|
432
432
|
display: inline-flex;
|
|
433
433
|
align-items: center;
|
|
434
|
+
cursor: pointer;
|
|
434
435
|
}
|
|
435
436
|
.file_input:hover .file_input_label {
|
|
436
437
|
border-color: rgba(0, 0, 0, 0.08);
|
|
438
|
+
cursor: pointer;
|
|
437
439
|
}
|
|
438
440
|
.file_input_control {
|
|
439
441
|
position: absolute;
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,12 @@ interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
8
8
|
padding?: "none" | "sm" | "md" | "lg";
|
|
9
9
|
bordered?: boolean;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* 카드 컴포넌트를 렌더링한다.
|
|
13
|
+
* 그림자/패딩/테두리 옵션을 조합해 레이아웃 컨테이너를 구성한다.
|
|
14
|
+
* @param props 카드 속성
|
|
15
|
+
* @returns 렌더링된 카드 UI
|
|
16
|
+
*/
|
|
11
17
|
declare const Card: ({ heading, shadow, padding, bordered, className, children, ...props }: CardProps) => react_jsx_runtime.JSX.Element;
|
|
12
18
|
|
|
13
19
|
type AlertVariant = "info" | "success" | "warning" | "error";
|
|
@@ -26,16 +32,33 @@ interface AlertOptions {
|
|
|
26
32
|
interface AlertContextValue {
|
|
27
33
|
showAlert: (options: AlertOptions) => void;
|
|
28
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* AlertContext를 사용하는 훅.
|
|
37
|
+
* Provider 외부에서 호출되면 오류를 던진다.
|
|
38
|
+
* @returns alert 컨트롤러
|
|
39
|
+
*/
|
|
29
40
|
declare const useAlert: () => AlertContextValue;
|
|
41
|
+
/**
|
|
42
|
+
* 알림 모달을 제어하는 Provider를 렌더링한다.
|
|
43
|
+
* 내부 상태를 통해 AlertModal 표시와 확인/취소 흐름을 관리한다.
|
|
44
|
+
* @param props Provider 속성
|
|
45
|
+
* @returns 렌더링된 Provider와 모달
|
|
46
|
+
*/
|
|
30
47
|
declare const AlertProvider: React.FC<{
|
|
31
48
|
children: React.ReactNode;
|
|
32
49
|
}>;
|
|
33
50
|
|
|
34
51
|
interface SpinnerProps {
|
|
35
52
|
size?: number;
|
|
36
|
-
/**
|
|
53
|
+
/** 스피너 접근성 레이블 (기본값: "Loading") */
|
|
37
54
|
ariaLabel?: string;
|
|
38
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* 스피너를 렌더링한다.
|
|
58
|
+
* 크기와 접근성 레이블을 적용한 뒤 상태 표시용 요소를 반환한다.
|
|
59
|
+
* @param props 스피너 속성
|
|
60
|
+
* @returns 렌더링된 스피너 요소
|
|
61
|
+
*/
|
|
39
62
|
declare const Spinner: ({ size, ariaLabel }: SpinnerProps) => react_jsx_runtime.JSX.Element;
|
|
40
63
|
|
|
41
64
|
interface TopLoadingProps {
|
|
@@ -50,11 +73,23 @@ interface TopLoadingProps {
|
|
|
50
73
|
/** 프로그레스 바의 접근성 레이블 (기본값: "Page loading") */
|
|
51
74
|
ariaLabel?: string;
|
|
52
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* 상단 로딩바를 렌더링한다.
|
|
78
|
+
* 표시 여부와 진행률에 따라 determinate/indeterminate 상태를 구성한다.
|
|
79
|
+
* @param props 로딩바 속성
|
|
80
|
+
* @returns 렌더링된 로딩바 요소 또는 null
|
|
81
|
+
*/
|
|
53
82
|
declare const TopLoading: ({ progress, color, height, isLoading, ariaLabel, }: TopLoadingProps) => react_jsx_runtime.JSX.Element | null;
|
|
54
83
|
|
|
55
84
|
interface ToastProviderProps {
|
|
56
85
|
containerId?: string;
|
|
57
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* 토스트 컨테이너를 렌더링한다.
|
|
89
|
+
* 기본 옵션을 설정하고 전역 토스트 표시 영역을 제공한다.
|
|
90
|
+
* @param props 토스트 컨테이너 속성
|
|
91
|
+
* @returns 렌더링된 토스트 컨테이너
|
|
92
|
+
*/
|
|
58
93
|
declare const ToastProvider: ({ containerId }: ToastProviderProps) => react_jsx_runtime.JSX.Element;
|
|
59
94
|
|
|
60
95
|
declare const useToast: (containerId?: string) => {
|
|
@@ -68,14 +103,20 @@ declare const useToast: (containerId?: string) => {
|
|
|
68
103
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
69
104
|
variant?: "primary" | "secondary" | "ghost" | "danger";
|
|
70
105
|
size?: "sm" | "md" | "lg";
|
|
71
|
-
/**
|
|
106
|
+
/** 버튼이 컨테이너의 전체 너비를 차지할지 여부 */
|
|
72
107
|
fullWidth?: boolean;
|
|
73
108
|
/**
|
|
74
|
-
*
|
|
75
|
-
* @deprecated
|
|
109
|
+
* 버튼의 커스텀 너비
|
|
110
|
+
* @deprecated `fullWidth` 사용 또는 CSS로 처리
|
|
76
111
|
*/
|
|
77
112
|
width?: string;
|
|
78
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* 버튼을 렌더링한다.
|
|
116
|
+
* 전달된 props로 클래스 조합과 인라인 스타일을 계산한 뒤 버튼 요소를 반환한다.
|
|
117
|
+
* @param props 버튼 속성
|
|
118
|
+
* @returns 렌더링된 버튼 요소
|
|
119
|
+
*/
|
|
79
120
|
declare const Button: ({ variant, size, fullWidth, width, className, style, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
80
121
|
|
|
81
122
|
interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
@@ -83,18 +124,38 @@ interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>
|
|
|
83
124
|
size?: "sm" | "md" | "lg";
|
|
84
125
|
indeterminate?: boolean;
|
|
85
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* 체크박스를 렌더링한다.
|
|
129
|
+
* indeterminate 상태를 반영하고 라벨을 포함한 UI를 구성한다.
|
|
130
|
+
* @param props 체크박스 속성
|
|
131
|
+
* @param ref 입력 요소 참조
|
|
132
|
+
* @returns 렌더링된 체크박스 UI
|
|
133
|
+
*/
|
|
86
134
|
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
87
135
|
|
|
88
136
|
interface FileInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
89
137
|
label?: string;
|
|
90
138
|
onFiles?: (files: FileList | null) => void;
|
|
91
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* 파일 입력 컴포넌트를 렌더링한다.
|
|
142
|
+
* 내부 input 변경을 감지해 파일 목록을 콜백으로 전달한다.
|
|
143
|
+
* @param props 파일 입력 속성
|
|
144
|
+
* @returns 렌더링된 파일 입력 UI
|
|
145
|
+
*/
|
|
92
146
|
declare const FileInput: ({ label, onFiles, className, disabled, ...props }: FileInputProps) => react_jsx_runtime.JSX.Element;
|
|
93
147
|
|
|
94
148
|
interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
95
149
|
label?: React.ReactNode;
|
|
96
150
|
size?: "sm" | "md" | "lg";
|
|
97
151
|
}
|
|
152
|
+
/**
|
|
153
|
+
* 라디오 버튼을 렌더링한다.
|
|
154
|
+
* 크기별 클래스와 라벨을 조합해 UI를 구성한다.
|
|
155
|
+
* @param props 라디오 속성
|
|
156
|
+
* @param ref 입력 요소 참조
|
|
157
|
+
* @returns 렌더링된 라디오 UI
|
|
158
|
+
*/
|
|
98
159
|
declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
|
|
99
160
|
|
|
100
161
|
type SelectSize = "sm" | "md" | "lg";
|
|
@@ -119,6 +180,12 @@ interface SelectProps {
|
|
|
119
180
|
className?: string;
|
|
120
181
|
textAlign?: "left" | "center";
|
|
121
182
|
}
|
|
183
|
+
/**
|
|
184
|
+
* 셀렉트 컴포넌트를 렌더링한다.
|
|
185
|
+
* 제어형/비제어형 상태를 정리하고, 키보드/마우스 상호작용과 드롭다운 표시를 관리한다.
|
|
186
|
+
* @param props 셀렉트 속성
|
|
187
|
+
* @returns 렌더링된 셀렉트 UI
|
|
188
|
+
*/
|
|
122
189
|
declare const Select: ({ id, label, placeholder, options, value, onChange, defaultValue, disabled, size, variant, fullWidth, className, textAlign, }: SelectProps) => react_jsx_runtime.JSX.Element;
|
|
123
190
|
|
|
124
191
|
interface SwitchProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onChange"> {
|
|
@@ -127,9 +194,16 @@ interface SwitchProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>
|
|
|
127
194
|
onChange?: (checked: boolean) => void;
|
|
128
195
|
size?: "sm" | "md" | "lg";
|
|
129
196
|
disabled?: boolean;
|
|
130
|
-
/**
|
|
197
|
+
/** 스위치 접근성 레이블(스크린 리더용) */
|
|
131
198
|
ariaLabel: string;
|
|
132
199
|
}
|
|
200
|
+
/**
|
|
201
|
+
* 스위치를 렌더링한다.
|
|
202
|
+
* 제어형/비제어형 상태를 판별해 토글 로직을 수행하고 버튼 형태의 스위치 UI를 반환한다.
|
|
203
|
+
* @param props 스위치 속성
|
|
204
|
+
* @param ref 버튼 참조
|
|
205
|
+
* @returns 렌더링된 스위치 요소
|
|
206
|
+
*/
|
|
133
207
|
declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
|
|
134
208
|
|
|
135
209
|
type TextFieldVariant = "outline" | "filled" | "ghost";
|
|
@@ -149,6 +223,13 @@ interface TextFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElement
|
|
|
149
223
|
defaultValue?: string;
|
|
150
224
|
transformValue?: (value: string) => string;
|
|
151
225
|
}
|
|
226
|
+
/**
|
|
227
|
+
* 텍스트 필드를 렌더링한다.
|
|
228
|
+
* 제어형/비제어형 값을 동기화하고, 조합 입력(IME)을 고려해 변경 이벤트를 전달한다.
|
|
229
|
+
* @param props 텍스트 필드 속성
|
|
230
|
+
* @param ref 입력 요소 참조
|
|
231
|
+
* @returns 렌더링된 텍스트 필드 UI
|
|
232
|
+
*/
|
|
152
233
|
declare const TextField: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<HTMLInputElement>>;
|
|
153
234
|
|
|
154
235
|
type DatePickerMode = "year-month" | "year-month-day";
|
|
@@ -163,14 +244,20 @@ interface DatePickerProps {
|
|
|
163
244
|
minDate?: string;
|
|
164
245
|
selectableRange?: SelectableRange;
|
|
165
246
|
disabled?: boolean;
|
|
166
|
-
/**
|
|
247
|
+
/** 데이트 피커가 컨테이너의 전체 너비를 차지할지 여부 */
|
|
167
248
|
fullWidth?: boolean;
|
|
168
249
|
/**
|
|
169
|
-
*
|
|
170
|
-
* @deprecated
|
|
250
|
+
* 데이트 피커의 커스텀 너비
|
|
251
|
+
* @deprecated `fullWidth` 사용 또는 CSS로 처리
|
|
171
252
|
*/
|
|
172
253
|
width?: number | string;
|
|
173
254
|
}
|
|
255
|
+
/**
|
|
256
|
+
* 연/월/일 선택형 데이트 피커를 렌더링한다.
|
|
257
|
+
* 입력 값과 선택 범위를 기준으로 옵션을 계산하고, 선택 변경을 상위로 전달한다.
|
|
258
|
+
* @param props 데이트 피커 속성
|
|
259
|
+
* @returns 렌더링된 데이트 피커 UI
|
|
260
|
+
*/
|
|
174
261
|
declare const DatePicker: ({ label, value, onChange, mode, startYear, endYear, minDate, selectableRange, disabled, fullWidth, width, }: DatePickerProps) => react_jsx_runtime.JSX.Element;
|
|
175
262
|
|
|
176
263
|
interface PaginationProps {
|
|
@@ -178,6 +265,12 @@ interface PaginationProps {
|
|
|
178
265
|
totalPages: number;
|
|
179
266
|
onChange: (page: number) => void;
|
|
180
267
|
}
|
|
268
|
+
/**
|
|
269
|
+
* 페이지네이션을 렌더링한다.
|
|
270
|
+
* 이전/다음 버튼과 페이지 목록을 구성해 전달된 콜백으로 페이지 변경을 전달한다.
|
|
271
|
+
* @param props 페이지네이션 속성
|
|
272
|
+
* @returns 렌더링된 페이지네이션 UI
|
|
273
|
+
*/
|
|
181
274
|
declare const Pagination: ({ page, totalPages, onChange }: PaginationProps) => react_jsx_runtime.JSX.Element;
|
|
182
275
|
|
|
183
276
|
interface ModalProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
@@ -186,9 +279,15 @@ interface ModalProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title">
|
|
|
186
279
|
closeOnOverlay?: boolean;
|
|
187
280
|
width?: number | string;
|
|
188
281
|
title?: React.ReactNode;
|
|
189
|
-
/**
|
|
282
|
+
/** 모달 접근성 레이블(기본값: title 또는 "Dialog") */
|
|
190
283
|
ariaLabel?: string;
|
|
191
284
|
}
|
|
285
|
+
/**
|
|
286
|
+
* 모달을 렌더링한다.
|
|
287
|
+
* 포커스 트랩과 스크롤 잠금을 적용하고, 열림 상태에 따라 오버레이/패널을 구성한다.
|
|
288
|
+
* @param props 모달 속성
|
|
289
|
+
* @returns 열림 상태일 때 렌더링된 모달, 닫힘 상태면 null
|
|
290
|
+
*/
|
|
192
291
|
declare const Modal: ({ open, onClose, closeOnOverlay, width, title, children, className, ariaLabel, ...props }: ModalProps) => react_jsx_runtime.JSX.Element | null;
|
|
193
292
|
|
|
194
293
|
export { AlertProvider, Button, Card, Checkbox, DatePicker, FileInput, Modal, Pagination, Radio, Select, type SelectOption, Spinner, Switch, TextField, ToastProvider, TopLoading, useAlert, useToast };
|
package/dist/index.js
CHANGED
|
@@ -350,7 +350,7 @@ var FileInput = ({
|
|
|
350
350
|
disabled && "file_input_disabled",
|
|
351
351
|
className ?? ""
|
|
352
352
|
].filter(Boolean).join(" ");
|
|
353
|
-
return /* @__PURE__ */ jsxs("div", { className: rootClassName, children: [
|
|
353
|
+
return /* @__PURE__ */ jsxs("div", { style: { cursor: "pointer" }, className: rootClassName, children: [
|
|
354
354
|
/* @__PURE__ */ jsx(
|
|
355
355
|
"input",
|
|
356
356
|
{
|
package/dist/next.d.ts
CHANGED
|
@@ -26,6 +26,12 @@ interface SidebarProps {
|
|
|
26
26
|
match?: MatchMode;
|
|
27
27
|
brandHref?: string;
|
|
28
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* 사이드바를 렌더링한다.
|
|
31
|
+
* 활성 경로를 기준으로 메뉴 상태를 계산하고 그룹 열림/닫힘을 관리한다.
|
|
32
|
+
* @param props 사이드바 속성
|
|
33
|
+
* @returns 렌더링된 사이드바 UI
|
|
34
|
+
*/
|
|
29
35
|
declare const Sidebar: ({ items, activePath, onItemSelect, className, style, match, brandHref, }: SidebarProps) => react_jsx_runtime.JSX.Element;
|
|
30
36
|
|
|
31
37
|
export { Sidebar, type SidebarItem, type SidebarProps };
|