@likelion-design/ui 1.0.2 → 1.0.4

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.mts CHANGED
@@ -145,9 +145,7 @@ interface ChipProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>,
145
145
  /** Close 버튼 클릭 핸들러 */
146
146
  onClose?: (e: React.MouseEvent<HTMLButtonElement>) => void;
147
147
  }
148
- /** Chip 컴포넌트는 사용자가 직접 선택, 추가, 삭제할 수 있는 인터랙티브한 컴포넌트다. */
149
- declare const Chip: ({ type, size, variant, value, onChange, checked: checkedProp, defaultChecked, selectedValue, selectedValues, label, prefixIcon, suffixIcon, showClose, onClose, className, disabled, onClick, ...props }: ChipProps) => react_jsx_runtime.JSX.Element;
150
- interface ChipGroupProps {
148
+ interface ChipGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
151
149
  /** 선택된 값 (controlled) - 단일: string, 다중: string[] */
152
150
  value?: string | string[];
153
151
  /** 초기 선택 값 (uncontrolled) */
@@ -166,13 +164,20 @@ interface ChipGroupProps {
166
164
  disabled?: boolean;
167
165
  /** 자식 Chip 컴포넌트들 */
168
166
  children: React.ReactNode;
169
- /** 추가 CSS 클래스명 */
170
- className?: string;
171
167
  }
172
168
  /** Chip.Group은 여러 Chip을 그룹화하여 단일/다중 선택을 관리한다. */
173
169
  declare const ChipGroup: {
174
- ({ value: valueProp, defaultValue, onChange, multiple, type, size, variant, disabled, children, className, }: ChipGroupProps): react_jsx_runtime.JSX.Element;
170
+ ({ value: valueProp, defaultValue, onChange, multiple, type, size, variant, disabled, children, className, ...rest }: ChipGroupProps): react_jsx_runtime.JSX.Element;
171
+ displayName: string;
172
+ };
173
+ declare const Chip: {
174
+ ({ type, size, variant, value, onChange, checked: checkedProp, defaultChecked, selectedValue, selectedValues, label, prefixIcon, suffixIcon, showClose, onClose, className, disabled, onClick, ...props }: ChipProps): react_jsx_runtime.JSX.Element;
175
175
  displayName: string;
176
+ } & {
177
+ Group: {
178
+ ({ value: valueProp, defaultValue, onChange, multiple, type, size, variant, disabled, children, className, ...rest }: ChipGroupProps): react_jsx_runtime.JSX.Element;
179
+ displayName: string;
180
+ };
176
181
  };
177
182
 
178
183
  type DialogAlign = "center" | "left";
@@ -181,75 +186,120 @@ type DialogVariant = "alert" | "confirm";
181
186
  type DialogActionColor = ButtonColor;
182
187
  type DialogActionType = ButtonType;
183
188
  type DialogActionSize = Exclude<ButtonSize, "xlarge">;
184
- interface DialogProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
185
- /** Dialog 표시 여부 */
189
+ /** 기존 방식의 Action Item 정의 */
190
+ interface DialogActionItem {
191
+ label: string;
192
+ color?: DialogActionColor;
193
+ type?: DialogActionType;
194
+ size?: DialogActionSize;
195
+ prefixIcon?: React.ReactNode;
196
+ suffixIcon?: React.ReactNode;
197
+ loading?: boolean;
198
+ disabled?: boolean;
199
+ onClick?: () => void | Promise<void>;
200
+ /** 클릭 시 다이얼로그 닫기 여부 (기본값: true) */
201
+ closeOnClick?: boolean;
202
+ }
203
+ interface DialogProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title" | "content"> {
186
204
  open?: boolean;
187
- /** Dialog 타입 */
205
+ onClose?: () => void;
206
+ /** 오버레이 클릭 시 닫기 여부 (기본값: true) */
207
+ closeOnOverlayClick?: boolean;
208
+ /** ESC 키로 닫기 여부 (기본값: true) */
209
+ closeOnEsc?: boolean;
210
+ /** 다이얼로그 타입 (스타일링용) */
188
211
  variant?: DialogVariant;
189
- /** 타이틀 정렬 */
212
+ /** 정렬 (기본값: variant가 alert면 left, 아니면 center) */
190
213
  align?: DialogAlign;
191
- /** 타이틀 */
214
+ /** 다이얼로그 제목 */
192
215
  title?: React.ReactNode;
193
- /** 설명 텍스트 */
216
+ /** 다이얼로그 본문/설명 */
194
217
  description?: React.ReactNode;
195
- /** 아이콘 */
218
+ /** 다이얼로그 아이콘 */
196
219
  icon?: React.ReactNode;
197
- /** 하단 액션 영역 */
220
+ /** 하단 버튼 목록 (Compound Component 대신 사용 가능) */
198
221
  actionItems?: DialogActionItem[];
199
- /** 액션 레이아웃 */
222
+ /** actionItems 사용 시 버튼 레이아웃 */
200
223
  footerLayout?: DialogFooterLayout;
201
- /** 액션 클릭 닫기 핸들러 (internal) */
202
- onActionClose?: () => void;
224
+ /** 커스텀 컨텐츠 (헤더/푸터 없이 내용만 렌더링할 때 사용) */
225
+ content?: React.ReactNode;
226
+ className?: string;
227
+ children?: React.ReactNode;
203
228
  }
204
- interface DialogActionItem {
205
- /** 버튼 라벨 */
229
+ interface DialogHeaderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
230
+ title?: React.ReactNode;
231
+ icon?: React.ReactNode;
232
+ }
233
+ type DialogBodyProps = React.HTMLAttributes<HTMLDivElement>;
234
+ interface DialogFooterProps extends React.HTMLAttributes<HTMLDivElement> {
235
+ layout?: DialogFooterLayout;
236
+ }
237
+ interface DialogButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "type"> {
206
238
  label: string;
207
- /** 버튼 색상 */
208
- color?: DialogActionColor;
209
- /** 버튼 타입 */
210
- type?: DialogActionType;
211
- /** 버튼 크기 */
212
- size?: DialogActionSize;
213
- /** Prefix 아이콘 */
239
+ color?: ButtonColor;
240
+ type?: ButtonType;
241
+ size?: Exclude<ButtonSize, "xlarge">;
214
242
  prefixIcon?: React.ReactNode;
215
- /** Suffix 아이콘 */
216
243
  suffixIcon?: React.ReactNode;
217
- /** 로딩 상태 */
218
244
  loading?: boolean;
219
- /** 비활성화 */
220
245
  disabled?: boolean;
221
- /** 클릭 핸들러 */
222
- onClick?: () => void;
223
- /** 클릭 시 다이얼로그 닫기 */
246
+ /** 클릭 다이얼로그 닫기 여부 (기본값: false - 명시적으로 닫아야 함) */
224
247
  closeOnClick?: boolean;
225
248
  }
226
- interface DialogOpenOptions extends Omit<DialogProps, "open" | "onActionClose"> {
227
- /** 닫힐 호출 */
249
+ declare const Dialog: (({ open, onClose, closeOnOverlayClick, closeOnEsc, variant, align, title, description, icon, actionItems, footerLayout, content, className, children, ...props }: DialogProps) => react_jsx_runtime.JSX.Element | null) & {
250
+ Header: ({ title, icon, className, children, ...props }: DialogHeaderProps) => react_jsx_runtime.JSX.Element;
251
+ Body: ({ className, children, ...props }: DialogBodyProps) => react_jsx_runtime.JSX.Element;
252
+ Footer: ({ layout, className, children, ...props }: DialogFooterProps) => react_jsx_runtime.JSX.Element;
253
+ Button: ({ label, color, type, size, prefixIcon, suffixIcon, loading, disabled, onClick, closeOnClick, style, ...props }: DialogButtonProps) => react_jsx_runtime.JSX.Element;
254
+ };
255
+ interface DialogOptions {
256
+ id?: string;
257
+ variant?: DialogVariant;
258
+ align?: DialogAlign;
259
+ title?: React.ReactNode;
260
+ description?: React.ReactNode;
261
+ icon?: React.ReactNode;
262
+ buttons?: DialogActionItem[];
263
+ content?: React.ReactNode;
228
264
  onClose?: () => void;
229
- /** 오버레이 클릭 시 닫기 */
230
265
  closeOnOverlayClick?: boolean;
231
- /** ESC 키로 닫기 */
232
266
  closeOnEsc?: boolean;
233
267
  }
234
- /** Dialog 컴포넌트는 중요한 정보를 전달하고 확인을 받는 모달 레이아웃이다. */
235
- declare const Dialog: ({ open, variant, align, title, description, icon, actionItems, footerLayout, onActionClose, className, ...props }: DialogProps) => react_jsx_runtime.JSX.Element | null;
236
- /**
237
- * Dialog를 가장 간편하게 쓰기 위한 훅
238
- */
239
- declare function useDialog(): {
240
- openDialog: (options: DialogOpenOptions) => void;
241
- closeDialog: () => void;
242
- DialogContainer: () => React.ReactPortal | null;
243
- };
268
+ interface AlertOptions extends Omit<DialogOptions, "buttons" | "content"> {
269
+ confirmLabel?: string;
270
+ onConfirm?: () => void | Promise<void>;
271
+ }
272
+ interface ConfirmOptions extends Omit<DialogOptions, "buttons" | "content"> {
273
+ confirmLabel?: string;
274
+ cancelLabel?: string;
275
+ onConfirm?: () => void | Promise<void>;
276
+ onCancel?: () => void | Promise<void>;
277
+ }
278
+ interface DialogContextType {
279
+ open: (options: DialogOptions) => string;
280
+ close: (id: string) => void;
281
+ closeAll: () => void;
282
+ alert: (options: AlertOptions) => Promise<void>;
283
+ confirm: (options: ConfirmOptions) => Promise<boolean>;
284
+ }
285
+ declare const DialogProvider: ({ children }: {
286
+ children: React.ReactNode;
287
+ }) => react_jsx_runtime.JSX.Element;
288
+ declare function useDialog(): DialogContextType;
244
289
 
245
- type TextInputSize = "pc" | "mo";
290
+ type TextInputSize = "pc" | "mo" | "medium" | "small";
246
291
  type TextInputState = "default" | "error";
247
292
  interface TextInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "title"> {
248
293
  /** Title 텍스트 (있으면 표시) */
249
294
  title?: string;
250
295
  /** 필수 필드 표시 여부 */
251
296
  required?: boolean;
252
- /** Input 크기 (미지정 시 breakpoint 기준: tablet 미만 mo, 이상 pc). 지정 시 오버라이드 */
297
+ /**
298
+ * Input 크기
299
+ * - "pc" / "mo": 디바이스 기반 네이밍
300
+ * - "medium" / "small": 스토리/디자인 토큰 기반 네이밍 (pc ↔ medium, mo ↔ small)
301
+ * 미지정 시 breakpoint 기준: tablet 미만 mo(small), 이상 pc(medium). 지정 시 오버라이드
302
+ */
253
303
  size?: TextInputSize;
254
304
  /** Input 상태 (에러 상태) */
255
305
  error?: boolean;
@@ -685,6 +735,13 @@ interface SelectMenuItem {
685
735
  interface SelectMenuProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
686
736
  /** 메뉴 항목들 */
687
737
  items: SelectMenuItem[];
738
+ /**
739
+ * 메뉴 사이즈
740
+ * - "medium": Web~Tab 권장 사이즈
741
+ * - "small": Mo 권장 사이즈
742
+ * - 지정하지 않으면 breakpoint에 따라 자동 결정됨.
743
+ */
744
+ size?: "medium" | "small";
688
745
  /** 선택된 값 (controlled) */
689
746
  value?: string | string[];
690
747
  /** 초기 선택 값 (uncontrolled) */
@@ -721,9 +778,17 @@ declare const SelectMenuOverlay: {
721
778
  };
722
779
 
723
780
  type SelectHeaderType = "outlined" | "underlined";
781
+ type SelectHeaderSize = "medium" | "small";
724
782
  interface SelectHeaderProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "onChange" | "value"> {
725
783
  /** SelectHeader 타입 */
726
784
  type?: SelectHeaderType;
785
+ /**
786
+ * SelectHeader 사이즈
787
+ * - "medium": Web~Tab 권장 사이즈
788
+ * - "small": Mo 권장 사이즈
789
+ * - 지정하지 않으면 breakpoint에 따라 자동 결정됨.
790
+ */
791
+ size?: SelectHeaderSize;
727
792
  /** Title 텍스트 */
728
793
  title?: string;
729
794
  /** 필수 필드 표시 여부 */
@@ -754,6 +819,12 @@ interface SelectHeaderProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonEl
754
819
  onChange?: (value: string | string[] | undefined) => void;
755
820
  /** 다중 선택 허용 여부 (items 있을 때) */
756
821
  multiple?: boolean;
822
+ /** 래퍼(Wrapper)에 적용할 클래스 이름 */
823
+ wrapperClassName?: string;
824
+ /** 래퍼(Wrapper)에 적용할 인라인 스타일 */
825
+ wrapperStyle?: React.CSSProperties;
826
+ /** 너비 설정 (예: "100%", "300px"). 설정 시 max-width 제한이 해제됨 */
827
+ width?: string | number;
757
828
  }
758
829
  /** SelectHeader 컴포넌트는 선택된 값을 표시하고 드롭다운을 여는 헤더 컴포넌트다. items를 주면 클릭 시 메뉴가 열린다. */
759
830
  declare const SelectHeader: React.ForwardRefExoticComponent<SelectHeaderProps & React.RefAttributes<HTMLButtonElement>>;
@@ -947,27 +1018,30 @@ interface ToastOptions {
947
1018
  /** 좌우 여백 */
948
1019
  horizontalPadding?: number;
949
1020
  }
1021
+ interface ToastContextType {
1022
+ showToast: (message: string, options?: ToastOptions) => void;
1023
+ hideToast: (id: string) => void;
1024
+ }
950
1025
  /**
951
- * Toast를 사용하기 위한 커스텀 훅
1026
+ * ToastProvider
952
1027
  *
953
- * @returns {Object} Toast 관련 상태와 핸들러
954
- * @returns {function} showToast - Toast를 표시하는 함수
955
- * @returns {function} hideToast - Toast를 숨기는 함수
956
- * @returns {React.ReactNode} ToastContainer - Toast 컴포넌트들을 렌더링하는 컨테이너
1028
+ * 앱의 최상위(Root)에 선언하여 전역 Toast 기능을 제공합니다.
1029
+ * Portal을 사용하여 document.body에 Toast를 렌더링합니다.
1030
+ */
1031
+ declare const ToastProvider: ({ children }: {
1032
+ children: React.ReactNode;
1033
+ }) => react_jsx_runtime.JSX.Element;
1034
+ /**
1035
+ * useToast Hook
957
1036
  *
958
- * @example
959
- * const { showToast, ToastContainer } = useToast();
1037
+ * ToastProvider 내부의 컴포넌트에서 호출하여 사용합니다.
1038
+ * { showToast } 함수를 반환합니다.
960
1039
  *
961
- * <button onClick={() => showToast("성공했습니다!", { state: "success" })}>
962
- * Show Toast
963
- * </button>
964
- * {ToastContainer}
1040
+ * @example
1041
+ * const { showToast } = useToast();
1042
+ * showToast("메시지", { state: "success" });
965
1043
  */
966
- declare function useToast(): {
967
- showToast: (message: string, options?: ToastOptions) => void;
968
- hideToast: (id: string) => void;
969
- ToastContainer: react_jsx_runtime.JSX.Element | null;
970
- };
1044
+ declare function useToast(): ToastContextType;
971
1045
 
972
1046
  type LogoType = "likelion-eng" | "likelion-kr" | "bootcamp" | "symbol" | "favicon" | "og-image";
973
1047
  type LogoVariant = "primary" | "secondary" | "white";
@@ -1045,4 +1119,4 @@ declare const LAYOUT_SYSTEM: {
1045
1119
  };
1046
1120
  };
1047
1121
 
1048
- export { ActionButton, type ActionButtonProps, BREAKPOINTS, Badge, type BadgeProps, type BadgeType, type BadgeVariant, BreakpointProvider, ActionButton as Button, type ButtonColor, type ActionButtonProps as ButtonProps, type ButtonSize, type ButtonState, type ButtonType, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, Chip, ChipGroup, type ChipGroupProps, type ChipProps, type ChipSize, type ChipType, type ChipVariant, Dialog, type DialogActionColor, type DialogActionItem, type DialogActionSize, type DialogActionType, type DialogAlign, type DialogFooterLayout, type DialogOpenOptions, type DialogProps, type DialogVariant, IconButton, type IconButtonColor, type IconButtonProps, type IconButtonSize, type IconButtonState, type IconButtonType, LAYOUT_SYSTEM, Logo, type LogoProps, type LogoSize, type LogoType, type LogoVariant, MEDIA_QUERIES, Pagination, type PaginationProps, RadioButton, RadioButtonGroup, type RadioButtonGroupProps, type RadioButtonProps, SelectHeader, type SelectHeaderProps, type SelectHeaderType, SelectMenu, type SelectMenuItem, SelectMenuOverlay, type SelectMenuOverlayProps, type SelectMenuProps, TAILWIND_SCREENS, Tab, TabGroup, type TabGroupProps, type TabProps, type TabSize, type TabType, Tag, type TagProps, type TagSize, type TagState, type TagType, Text, type TextDecoration, TextInput, type TextInputProps, type TextInputSize, type TextInputState, type TextProps, type TextVariant, Toast, type ToastHorizontalAlign, type ToastOptions, type ToastPosition, type ToastProps, type ToastSize, type ToastState, Toggle, type ToggleProps, type ToggleSize, Tooltip, type TooltipPosition, type TooltipProps, type TooltipType, type UseCheckboxGroupOptions, type UseCheckboxGroupResult, useBreakpoint, useCheckboxGroup, useDialog, useMediaQuery, useToast };
1122
+ export { ActionButton, type ActionButtonProps, type AlertOptions, BREAKPOINTS, Badge, type BadgeProps, type BadgeType, type BadgeVariant, BreakpointProvider, ActionButton as Button, type ButtonColor, type ActionButtonProps as ButtonProps, type ButtonSize, type ButtonState, type ButtonType, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, Chip, ChipGroup, type ChipGroupProps, type ChipProps, type ChipSize, type ChipType, type ChipVariant, type ConfirmOptions, Dialog, type DialogActionColor, type DialogActionItem, type DialogActionSize, type DialogActionType, type DialogAlign, type DialogFooterLayout, type DialogOptions, type DialogProps, DialogProvider, type DialogVariant, IconButton, type IconButtonColor, type IconButtonProps, type IconButtonSize, type IconButtonState, type IconButtonType, LAYOUT_SYSTEM, Logo, type LogoProps, type LogoSize, type LogoType, type LogoVariant, MEDIA_QUERIES, Pagination, type PaginationProps, RadioButton, RadioButtonGroup, type RadioButtonGroupProps, type RadioButtonProps, SelectHeader, type SelectHeaderProps, type SelectHeaderType, SelectMenu, type SelectMenuItem, SelectMenuOverlay, type SelectMenuOverlayProps, type SelectMenuProps, TAILWIND_SCREENS, Tab, TabGroup, type TabGroupProps, type TabProps, type TabSize, type TabType, Tag, type TagProps, type TagSize, type TagState, type TagType, Text, type TextDecoration, TextInput, type TextInputProps, type TextInputSize, type TextInputState, type TextProps, type TextVariant, Toast, type ToastHorizontalAlign, type ToastOptions, type ToastPosition, type ToastProps, ToastProvider, type ToastSize, type ToastState, Toggle, type ToggleProps, type ToggleSize, Tooltip, type TooltipPosition, type TooltipProps, type TooltipType, type UseCheckboxGroupOptions, type UseCheckboxGroupResult, useBreakpoint, useCheckboxGroup, useDialog, useMediaQuery, useToast };
package/dist/index.d.ts CHANGED
@@ -145,9 +145,7 @@ interface ChipProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>,
145
145
  /** Close 버튼 클릭 핸들러 */
146
146
  onClose?: (e: React.MouseEvent<HTMLButtonElement>) => void;
147
147
  }
148
- /** Chip 컴포넌트는 사용자가 직접 선택, 추가, 삭제할 수 있는 인터랙티브한 컴포넌트다. */
149
- declare const Chip: ({ type, size, variant, value, onChange, checked: checkedProp, defaultChecked, selectedValue, selectedValues, label, prefixIcon, suffixIcon, showClose, onClose, className, disabled, onClick, ...props }: ChipProps) => react_jsx_runtime.JSX.Element;
150
- interface ChipGroupProps {
148
+ interface ChipGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
151
149
  /** 선택된 값 (controlled) - 단일: string, 다중: string[] */
152
150
  value?: string | string[];
153
151
  /** 초기 선택 값 (uncontrolled) */
@@ -166,13 +164,20 @@ interface ChipGroupProps {
166
164
  disabled?: boolean;
167
165
  /** 자식 Chip 컴포넌트들 */
168
166
  children: React.ReactNode;
169
- /** 추가 CSS 클래스명 */
170
- className?: string;
171
167
  }
172
168
  /** Chip.Group은 여러 Chip을 그룹화하여 단일/다중 선택을 관리한다. */
173
169
  declare const ChipGroup: {
174
- ({ value: valueProp, defaultValue, onChange, multiple, type, size, variant, disabled, children, className, }: ChipGroupProps): react_jsx_runtime.JSX.Element;
170
+ ({ value: valueProp, defaultValue, onChange, multiple, type, size, variant, disabled, children, className, ...rest }: ChipGroupProps): react_jsx_runtime.JSX.Element;
171
+ displayName: string;
172
+ };
173
+ declare const Chip: {
174
+ ({ type, size, variant, value, onChange, checked: checkedProp, defaultChecked, selectedValue, selectedValues, label, prefixIcon, suffixIcon, showClose, onClose, className, disabled, onClick, ...props }: ChipProps): react_jsx_runtime.JSX.Element;
175
175
  displayName: string;
176
+ } & {
177
+ Group: {
178
+ ({ value: valueProp, defaultValue, onChange, multiple, type, size, variant, disabled, children, className, ...rest }: ChipGroupProps): react_jsx_runtime.JSX.Element;
179
+ displayName: string;
180
+ };
176
181
  };
177
182
 
178
183
  type DialogAlign = "center" | "left";
@@ -181,75 +186,120 @@ type DialogVariant = "alert" | "confirm";
181
186
  type DialogActionColor = ButtonColor;
182
187
  type DialogActionType = ButtonType;
183
188
  type DialogActionSize = Exclude<ButtonSize, "xlarge">;
184
- interface DialogProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
185
- /** Dialog 표시 여부 */
189
+ /** 기존 방식의 Action Item 정의 */
190
+ interface DialogActionItem {
191
+ label: string;
192
+ color?: DialogActionColor;
193
+ type?: DialogActionType;
194
+ size?: DialogActionSize;
195
+ prefixIcon?: React.ReactNode;
196
+ suffixIcon?: React.ReactNode;
197
+ loading?: boolean;
198
+ disabled?: boolean;
199
+ onClick?: () => void | Promise<void>;
200
+ /** 클릭 시 다이얼로그 닫기 여부 (기본값: true) */
201
+ closeOnClick?: boolean;
202
+ }
203
+ interface DialogProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title" | "content"> {
186
204
  open?: boolean;
187
- /** Dialog 타입 */
205
+ onClose?: () => void;
206
+ /** 오버레이 클릭 시 닫기 여부 (기본값: true) */
207
+ closeOnOverlayClick?: boolean;
208
+ /** ESC 키로 닫기 여부 (기본값: true) */
209
+ closeOnEsc?: boolean;
210
+ /** 다이얼로그 타입 (스타일링용) */
188
211
  variant?: DialogVariant;
189
- /** 타이틀 정렬 */
212
+ /** 정렬 (기본값: variant가 alert면 left, 아니면 center) */
190
213
  align?: DialogAlign;
191
- /** 타이틀 */
214
+ /** 다이얼로그 제목 */
192
215
  title?: React.ReactNode;
193
- /** 설명 텍스트 */
216
+ /** 다이얼로그 본문/설명 */
194
217
  description?: React.ReactNode;
195
- /** 아이콘 */
218
+ /** 다이얼로그 아이콘 */
196
219
  icon?: React.ReactNode;
197
- /** 하단 액션 영역 */
220
+ /** 하단 버튼 목록 (Compound Component 대신 사용 가능) */
198
221
  actionItems?: DialogActionItem[];
199
- /** 액션 레이아웃 */
222
+ /** actionItems 사용 시 버튼 레이아웃 */
200
223
  footerLayout?: DialogFooterLayout;
201
- /** 액션 클릭 닫기 핸들러 (internal) */
202
- onActionClose?: () => void;
224
+ /** 커스텀 컨텐츠 (헤더/푸터 없이 내용만 렌더링할 때 사용) */
225
+ content?: React.ReactNode;
226
+ className?: string;
227
+ children?: React.ReactNode;
203
228
  }
204
- interface DialogActionItem {
205
- /** 버튼 라벨 */
229
+ interface DialogHeaderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
230
+ title?: React.ReactNode;
231
+ icon?: React.ReactNode;
232
+ }
233
+ type DialogBodyProps = React.HTMLAttributes<HTMLDivElement>;
234
+ interface DialogFooterProps extends React.HTMLAttributes<HTMLDivElement> {
235
+ layout?: DialogFooterLayout;
236
+ }
237
+ interface DialogButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "type"> {
206
238
  label: string;
207
- /** 버튼 색상 */
208
- color?: DialogActionColor;
209
- /** 버튼 타입 */
210
- type?: DialogActionType;
211
- /** 버튼 크기 */
212
- size?: DialogActionSize;
213
- /** Prefix 아이콘 */
239
+ color?: ButtonColor;
240
+ type?: ButtonType;
241
+ size?: Exclude<ButtonSize, "xlarge">;
214
242
  prefixIcon?: React.ReactNode;
215
- /** Suffix 아이콘 */
216
243
  suffixIcon?: React.ReactNode;
217
- /** 로딩 상태 */
218
244
  loading?: boolean;
219
- /** 비활성화 */
220
245
  disabled?: boolean;
221
- /** 클릭 핸들러 */
222
- onClick?: () => void;
223
- /** 클릭 시 다이얼로그 닫기 */
246
+ /** 클릭 다이얼로그 닫기 여부 (기본값: false - 명시적으로 닫아야 함) */
224
247
  closeOnClick?: boolean;
225
248
  }
226
- interface DialogOpenOptions extends Omit<DialogProps, "open" | "onActionClose"> {
227
- /** 닫힐 호출 */
249
+ declare const Dialog: (({ open, onClose, closeOnOverlayClick, closeOnEsc, variant, align, title, description, icon, actionItems, footerLayout, content, className, children, ...props }: DialogProps) => react_jsx_runtime.JSX.Element | null) & {
250
+ Header: ({ title, icon, className, children, ...props }: DialogHeaderProps) => react_jsx_runtime.JSX.Element;
251
+ Body: ({ className, children, ...props }: DialogBodyProps) => react_jsx_runtime.JSX.Element;
252
+ Footer: ({ layout, className, children, ...props }: DialogFooterProps) => react_jsx_runtime.JSX.Element;
253
+ Button: ({ label, color, type, size, prefixIcon, suffixIcon, loading, disabled, onClick, closeOnClick, style, ...props }: DialogButtonProps) => react_jsx_runtime.JSX.Element;
254
+ };
255
+ interface DialogOptions {
256
+ id?: string;
257
+ variant?: DialogVariant;
258
+ align?: DialogAlign;
259
+ title?: React.ReactNode;
260
+ description?: React.ReactNode;
261
+ icon?: React.ReactNode;
262
+ buttons?: DialogActionItem[];
263
+ content?: React.ReactNode;
228
264
  onClose?: () => void;
229
- /** 오버레이 클릭 시 닫기 */
230
265
  closeOnOverlayClick?: boolean;
231
- /** ESC 키로 닫기 */
232
266
  closeOnEsc?: boolean;
233
267
  }
234
- /** Dialog 컴포넌트는 중요한 정보를 전달하고 확인을 받는 모달 레이아웃이다. */
235
- declare const Dialog: ({ open, variant, align, title, description, icon, actionItems, footerLayout, onActionClose, className, ...props }: DialogProps) => react_jsx_runtime.JSX.Element | null;
236
- /**
237
- * Dialog를 가장 간편하게 쓰기 위한 훅
238
- */
239
- declare function useDialog(): {
240
- openDialog: (options: DialogOpenOptions) => void;
241
- closeDialog: () => void;
242
- DialogContainer: () => React.ReactPortal | null;
243
- };
268
+ interface AlertOptions extends Omit<DialogOptions, "buttons" | "content"> {
269
+ confirmLabel?: string;
270
+ onConfirm?: () => void | Promise<void>;
271
+ }
272
+ interface ConfirmOptions extends Omit<DialogOptions, "buttons" | "content"> {
273
+ confirmLabel?: string;
274
+ cancelLabel?: string;
275
+ onConfirm?: () => void | Promise<void>;
276
+ onCancel?: () => void | Promise<void>;
277
+ }
278
+ interface DialogContextType {
279
+ open: (options: DialogOptions) => string;
280
+ close: (id: string) => void;
281
+ closeAll: () => void;
282
+ alert: (options: AlertOptions) => Promise<void>;
283
+ confirm: (options: ConfirmOptions) => Promise<boolean>;
284
+ }
285
+ declare const DialogProvider: ({ children }: {
286
+ children: React.ReactNode;
287
+ }) => react_jsx_runtime.JSX.Element;
288
+ declare function useDialog(): DialogContextType;
244
289
 
245
- type TextInputSize = "pc" | "mo";
290
+ type TextInputSize = "pc" | "mo" | "medium" | "small";
246
291
  type TextInputState = "default" | "error";
247
292
  interface TextInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "title"> {
248
293
  /** Title 텍스트 (있으면 표시) */
249
294
  title?: string;
250
295
  /** 필수 필드 표시 여부 */
251
296
  required?: boolean;
252
- /** Input 크기 (미지정 시 breakpoint 기준: tablet 미만 mo, 이상 pc). 지정 시 오버라이드 */
297
+ /**
298
+ * Input 크기
299
+ * - "pc" / "mo": 디바이스 기반 네이밍
300
+ * - "medium" / "small": 스토리/디자인 토큰 기반 네이밍 (pc ↔ medium, mo ↔ small)
301
+ * 미지정 시 breakpoint 기준: tablet 미만 mo(small), 이상 pc(medium). 지정 시 오버라이드
302
+ */
253
303
  size?: TextInputSize;
254
304
  /** Input 상태 (에러 상태) */
255
305
  error?: boolean;
@@ -685,6 +735,13 @@ interface SelectMenuItem {
685
735
  interface SelectMenuProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
686
736
  /** 메뉴 항목들 */
687
737
  items: SelectMenuItem[];
738
+ /**
739
+ * 메뉴 사이즈
740
+ * - "medium": Web~Tab 권장 사이즈
741
+ * - "small": Mo 권장 사이즈
742
+ * - 지정하지 않으면 breakpoint에 따라 자동 결정됨.
743
+ */
744
+ size?: "medium" | "small";
688
745
  /** 선택된 값 (controlled) */
689
746
  value?: string | string[];
690
747
  /** 초기 선택 값 (uncontrolled) */
@@ -721,9 +778,17 @@ declare const SelectMenuOverlay: {
721
778
  };
722
779
 
723
780
  type SelectHeaderType = "outlined" | "underlined";
781
+ type SelectHeaderSize = "medium" | "small";
724
782
  interface SelectHeaderProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "onChange" | "value"> {
725
783
  /** SelectHeader 타입 */
726
784
  type?: SelectHeaderType;
785
+ /**
786
+ * SelectHeader 사이즈
787
+ * - "medium": Web~Tab 권장 사이즈
788
+ * - "small": Mo 권장 사이즈
789
+ * - 지정하지 않으면 breakpoint에 따라 자동 결정됨.
790
+ */
791
+ size?: SelectHeaderSize;
727
792
  /** Title 텍스트 */
728
793
  title?: string;
729
794
  /** 필수 필드 표시 여부 */
@@ -754,6 +819,12 @@ interface SelectHeaderProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonEl
754
819
  onChange?: (value: string | string[] | undefined) => void;
755
820
  /** 다중 선택 허용 여부 (items 있을 때) */
756
821
  multiple?: boolean;
822
+ /** 래퍼(Wrapper)에 적용할 클래스 이름 */
823
+ wrapperClassName?: string;
824
+ /** 래퍼(Wrapper)에 적용할 인라인 스타일 */
825
+ wrapperStyle?: React.CSSProperties;
826
+ /** 너비 설정 (예: "100%", "300px"). 설정 시 max-width 제한이 해제됨 */
827
+ width?: string | number;
757
828
  }
758
829
  /** SelectHeader 컴포넌트는 선택된 값을 표시하고 드롭다운을 여는 헤더 컴포넌트다. items를 주면 클릭 시 메뉴가 열린다. */
759
830
  declare const SelectHeader: React.ForwardRefExoticComponent<SelectHeaderProps & React.RefAttributes<HTMLButtonElement>>;
@@ -947,27 +1018,30 @@ interface ToastOptions {
947
1018
  /** 좌우 여백 */
948
1019
  horizontalPadding?: number;
949
1020
  }
1021
+ interface ToastContextType {
1022
+ showToast: (message: string, options?: ToastOptions) => void;
1023
+ hideToast: (id: string) => void;
1024
+ }
950
1025
  /**
951
- * Toast를 사용하기 위한 커스텀 훅
1026
+ * ToastProvider
952
1027
  *
953
- * @returns {Object} Toast 관련 상태와 핸들러
954
- * @returns {function} showToast - Toast를 표시하는 함수
955
- * @returns {function} hideToast - Toast를 숨기는 함수
956
- * @returns {React.ReactNode} ToastContainer - Toast 컴포넌트들을 렌더링하는 컨테이너
1028
+ * 앱의 최상위(Root)에 선언하여 전역 Toast 기능을 제공합니다.
1029
+ * Portal을 사용하여 document.body에 Toast를 렌더링합니다.
1030
+ */
1031
+ declare const ToastProvider: ({ children }: {
1032
+ children: React.ReactNode;
1033
+ }) => react_jsx_runtime.JSX.Element;
1034
+ /**
1035
+ * useToast Hook
957
1036
  *
958
- * @example
959
- * const { showToast, ToastContainer } = useToast();
1037
+ * ToastProvider 내부의 컴포넌트에서 호출하여 사용합니다.
1038
+ * { showToast } 함수를 반환합니다.
960
1039
  *
961
- * <button onClick={() => showToast("성공했습니다!", { state: "success" })}>
962
- * Show Toast
963
- * </button>
964
- * {ToastContainer}
1040
+ * @example
1041
+ * const { showToast } = useToast();
1042
+ * showToast("메시지", { state: "success" });
965
1043
  */
966
- declare function useToast(): {
967
- showToast: (message: string, options?: ToastOptions) => void;
968
- hideToast: (id: string) => void;
969
- ToastContainer: react_jsx_runtime.JSX.Element | null;
970
- };
1044
+ declare function useToast(): ToastContextType;
971
1045
 
972
1046
  type LogoType = "likelion-eng" | "likelion-kr" | "bootcamp" | "symbol" | "favicon" | "og-image";
973
1047
  type LogoVariant = "primary" | "secondary" | "white";
@@ -1045,4 +1119,4 @@ declare const LAYOUT_SYSTEM: {
1045
1119
  };
1046
1120
  };
1047
1121
 
1048
- export { ActionButton, type ActionButtonProps, BREAKPOINTS, Badge, type BadgeProps, type BadgeType, type BadgeVariant, BreakpointProvider, ActionButton as Button, type ButtonColor, type ActionButtonProps as ButtonProps, type ButtonSize, type ButtonState, type ButtonType, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, Chip, ChipGroup, type ChipGroupProps, type ChipProps, type ChipSize, type ChipType, type ChipVariant, Dialog, type DialogActionColor, type DialogActionItem, type DialogActionSize, type DialogActionType, type DialogAlign, type DialogFooterLayout, type DialogOpenOptions, type DialogProps, type DialogVariant, IconButton, type IconButtonColor, type IconButtonProps, type IconButtonSize, type IconButtonState, type IconButtonType, LAYOUT_SYSTEM, Logo, type LogoProps, type LogoSize, type LogoType, type LogoVariant, MEDIA_QUERIES, Pagination, type PaginationProps, RadioButton, RadioButtonGroup, type RadioButtonGroupProps, type RadioButtonProps, SelectHeader, type SelectHeaderProps, type SelectHeaderType, SelectMenu, type SelectMenuItem, SelectMenuOverlay, type SelectMenuOverlayProps, type SelectMenuProps, TAILWIND_SCREENS, Tab, TabGroup, type TabGroupProps, type TabProps, type TabSize, type TabType, Tag, type TagProps, type TagSize, type TagState, type TagType, Text, type TextDecoration, TextInput, type TextInputProps, type TextInputSize, type TextInputState, type TextProps, type TextVariant, Toast, type ToastHorizontalAlign, type ToastOptions, type ToastPosition, type ToastProps, type ToastSize, type ToastState, Toggle, type ToggleProps, type ToggleSize, Tooltip, type TooltipPosition, type TooltipProps, type TooltipType, type UseCheckboxGroupOptions, type UseCheckboxGroupResult, useBreakpoint, useCheckboxGroup, useDialog, useMediaQuery, useToast };
1122
+ export { ActionButton, type ActionButtonProps, type AlertOptions, BREAKPOINTS, Badge, type BadgeProps, type BadgeType, type BadgeVariant, BreakpointProvider, ActionButton as Button, type ButtonColor, type ActionButtonProps as ButtonProps, type ButtonSize, type ButtonState, type ButtonType, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, Chip, ChipGroup, type ChipGroupProps, type ChipProps, type ChipSize, type ChipType, type ChipVariant, type ConfirmOptions, Dialog, type DialogActionColor, type DialogActionItem, type DialogActionSize, type DialogActionType, type DialogAlign, type DialogFooterLayout, type DialogOptions, type DialogProps, DialogProvider, type DialogVariant, IconButton, type IconButtonColor, type IconButtonProps, type IconButtonSize, type IconButtonState, type IconButtonType, LAYOUT_SYSTEM, Logo, type LogoProps, type LogoSize, type LogoType, type LogoVariant, MEDIA_QUERIES, Pagination, type PaginationProps, RadioButton, RadioButtonGroup, type RadioButtonGroupProps, type RadioButtonProps, SelectHeader, type SelectHeaderProps, type SelectHeaderType, SelectMenu, type SelectMenuItem, SelectMenuOverlay, type SelectMenuOverlayProps, type SelectMenuProps, TAILWIND_SCREENS, Tab, TabGroup, type TabGroupProps, type TabProps, type TabSize, type TabType, Tag, type TagProps, type TagSize, type TagState, type TagType, Text, type TextDecoration, TextInput, type TextInputProps, type TextInputSize, type TextInputState, type TextProps, type TextVariant, Toast, type ToastHorizontalAlign, type ToastOptions, type ToastPosition, type ToastProps, ToastProvider, type ToastSize, type ToastState, Toggle, type ToggleProps, type ToggleSize, Tooltip, type TooltipPosition, type TooltipProps, type TooltipType, type UseCheckboxGroupOptions, type UseCheckboxGroupResult, useBreakpoint, useCheckboxGroup, useDialog, useMediaQuery, useToast };