@mondrianai/runyourai-design-system 0.0.21 → 0.0.23
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 +318 -20
- package/dist/index.d.ts +318 -20
- package/dist/index.js +1553 -940
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1575 -952
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { ReactNode } from 'react';
|
|
3
|
-
import { Accordion as Accordion$1, AlertDialog as AlertDialog$1, Checkbox as Checkbox$1, Collapsible as Collapsible$1, Menubar as Menubar$1, Slider as Slider$1, Switch as Switch$1, Tooltip as Tooltip$1 } from 'radix-ui';
|
|
3
|
+
import { Accordion as Accordion$1, AlertDialog as AlertDialog$1, Checkbox as Checkbox$1, Collapsible as Collapsible$1, Menubar as Menubar$1, Slider as Slider$1, Switch as Switch$1, Tooltip as Tooltip$1, Popover as Popover$1 } from 'radix-ui';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
6
|
import { VariantProps } from 'class-variance-authority';
|
|
7
7
|
import { OTPInput } from 'input-otp';
|
|
8
8
|
import * as _radix_ui_react_context from '@radix-ui/react-context';
|
|
9
|
-
import { RowSelectionState, OnChangeFn, SortingState } from '@tanstack/react-table';
|
|
10
|
-
export { OnChangeFn, PaginationState, RowSelectionState, SortingState } from '@tanstack/react-table';
|
|
9
|
+
import { RowSelectionState, OnChangeFn, SortingState, ColumnFiltersState } from '@tanstack/react-table';
|
|
10
|
+
export { ColumnFiltersState, OnChangeFn, PaginationState, RowSelectionState, SortingState } from '@tanstack/react-table';
|
|
11
|
+
import { ExternalToast, ToasterProps } from 'sonner';
|
|
11
12
|
|
|
12
13
|
declare const Accordion: React$1.ForwardRefExoticComponent<(Accordion$1.AccordionSingleProps | Accordion$1.AccordionMultipleProps) & React$1.RefAttributes<HTMLDivElement>>;
|
|
13
14
|
declare const AccordionItem: React$1.ForwardRefExoticComponent<Omit<Accordion$1.AccordionItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -112,7 +113,7 @@ declare function BreadcrumbSeparator({ iconName, className, ...props }: React__d
|
|
|
112
113
|
}): react_jsx_runtime.JSX.Element;
|
|
113
114
|
|
|
114
115
|
declare const buttonVariants: (props?: ({
|
|
115
|
-
variant?: "link" | "primary" | "secondary" | "outline" | "ghost" | "destructive" | null | undefined;
|
|
116
|
+
variant?: "link" | "primary" | "secondary" | "outline" | "ghost" | "destructive" | "ghostDestructive" | null | undefined;
|
|
116
117
|
size?: "rounded" | "default" | "icon" | "pill" | null | undefined;
|
|
117
118
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
118
119
|
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
@@ -173,9 +174,24 @@ declare function Drawer({ open, onOpenChange, trigger, title, description, foote
|
|
|
173
174
|
|
|
174
175
|
type DropdownMenuItemConfig = {
|
|
175
176
|
type?: 'default' | 'checkbox' | 'radio';
|
|
176
|
-
|
|
177
|
-
|
|
177
|
+
/**
|
|
178
|
+
* 아이템 콘텐츠. 문자열뿐 아니라 임의 노드(아이콘 + 텍스트 + 트레일링 배지 등)를
|
|
179
|
+
* 넣을 수 있다. 문자열이 아닌 경우 React key·타입어헤드를 위해
|
|
180
|
+
* `value`·`textValue`를 함께 지정하는 것을 권장한다.
|
|
181
|
+
*/
|
|
182
|
+
label: React$1.ReactNode;
|
|
183
|
+
/**
|
|
184
|
+
* 타입어헤드(키보드 입력으로 항목 이동) 매칭용 텍스트.
|
|
185
|
+
* label이 문자열이 아닐 때 지정한다. 미지정 시 label의 textContent가 사용된다.
|
|
186
|
+
*/
|
|
187
|
+
textValue?: string;
|
|
188
|
+
/** radio 아이템의 선택값 / React key. 미지정 시 문자열 label 또는 index를 사용 */
|
|
178
189
|
value?: string;
|
|
190
|
+
/**
|
|
191
|
+
* 현재 선택된 항목 강조. default 아이템에 selected 배경(bg-accent)을 적용한다.
|
|
192
|
+
* (checkbox/radio는 자체 체크 상태로 강조되므로 무시된다)
|
|
193
|
+
*/
|
|
194
|
+
selected?: boolean;
|
|
179
195
|
icon?: React$1.ReactNode;
|
|
180
196
|
onClick?: () => void;
|
|
181
197
|
onCheckedChange?: (checked: boolean) => void;
|
|
@@ -188,7 +204,13 @@ type DropdownMenuItemConfig = {
|
|
|
188
204
|
subGroups?: DropdownMenuGroupConfig[];
|
|
189
205
|
};
|
|
190
206
|
type DropdownMenuGroupConfig = {
|
|
207
|
+
/** 문자열 그룹 헤더. 커스텀 렌더링이 필요하면 `header`를 사용한다. */
|
|
191
208
|
label?: string;
|
|
209
|
+
/**
|
|
210
|
+
* 커스텀 그룹 헤더(ReactNode). 지정 시 `label` 대신 렌더링되며,
|
|
211
|
+
* 게이지·설명 등 자유로운 헤더를 구성할 수 있다. (포커스 대상이 아님)
|
|
212
|
+
*/
|
|
213
|
+
header?: React$1.ReactNode;
|
|
192
214
|
items: DropdownMenuItemConfig[];
|
|
193
215
|
separator?: boolean;
|
|
194
216
|
/** radio 그룹의 현재 선택값 (controlled) */
|
|
@@ -519,7 +541,7 @@ declare function Input({ className, type, ...props }: React$1.ComponentProps<"in
|
|
|
519
541
|
|
|
520
542
|
declare function InputGroup({ className, ...props }: React$1.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
521
543
|
declare const inputGroupAddonVariants: (props?: ({
|
|
522
|
-
align?: "inline-
|
|
544
|
+
align?: "inline-end" | "inline-start" | "block-end" | "block-start" | null | undefined;
|
|
523
545
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
524
546
|
declare function InputGroupAddon({ className, align, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>): react_jsx_runtime.JSX.Element;
|
|
525
547
|
declare const inputGroupButtonVariants: (props?: ({
|
|
@@ -570,6 +592,24 @@ declare function MarkdownMessage({ content, isStreaming, footerMeta, className,
|
|
|
570
592
|
className?: string;
|
|
571
593
|
}): react_jsx_runtime.JSX.Element;
|
|
572
594
|
|
|
595
|
+
/**
|
|
596
|
+
* footer 취소/확인 버튼 커스터마이즈 묶음.
|
|
597
|
+
* onClick(취소=onCancel, 확인=onConfirm)은 Modal 레벨에서 처리하므로 제외.
|
|
598
|
+
*/
|
|
599
|
+
interface ModalButtonProps {
|
|
600
|
+
/** 버튼 레이블 */
|
|
601
|
+
label?: string;
|
|
602
|
+
/** 텍스트 앞 아이콘 */
|
|
603
|
+
iconStart?: React$1.ReactNode;
|
|
604
|
+
/** 텍스트 뒤 아이콘 */
|
|
605
|
+
iconEnd?: React$1.ReactNode;
|
|
606
|
+
/** 비활성화 */
|
|
607
|
+
disabled?: boolean;
|
|
608
|
+
/** 로딩 상태 (스피너 표시, 클릭 불가) */
|
|
609
|
+
isLoading?: boolean;
|
|
610
|
+
/** 버튼에 추가할 className */
|
|
611
|
+
className?: string;
|
|
612
|
+
}
|
|
573
613
|
interface ModalProps {
|
|
574
614
|
id?: string;
|
|
575
615
|
/**
|
|
@@ -600,10 +640,10 @@ interface ModalProps {
|
|
|
600
640
|
showCloseButton?: boolean;
|
|
601
641
|
/** 모달 본문 */
|
|
602
642
|
children?: React$1.ReactNode;
|
|
603
|
-
/** 취소 버튼
|
|
604
|
-
|
|
605
|
-
/** 확인 버튼
|
|
606
|
-
|
|
643
|
+
/** 취소 버튼 커스터마이즈 (label 기본: "취소") */
|
|
644
|
+
cancelButtonProps?: ModalButtonProps;
|
|
645
|
+
/** 확인 버튼 커스터마이즈 (label 기본: "확인") */
|
|
646
|
+
confirmButtonProps?: ModalButtonProps;
|
|
607
647
|
/**
|
|
608
648
|
* 확인 버튼 콜백.
|
|
609
649
|
* Promise를 반환하면 resolve될 때까지 loading 상태를 내부에서 자동 처리하고
|
|
@@ -612,15 +652,12 @@ interface ModalProps {
|
|
|
612
652
|
onConfirm?: () => void | Promise<void>;
|
|
613
653
|
/** 취소/닫기 시 콜백 (cancel 버튼, X 버튼, ESC, 오버레이 클릭) */
|
|
614
654
|
onCancel?: () => void;
|
|
615
|
-
/** 확인 버튼 비활성화 */
|
|
616
|
-
confirmDisabled?: boolean;
|
|
617
|
-
isLoading?: boolean;
|
|
618
655
|
/** 오버레이 클릭 시 닫기 (기본: true) */
|
|
619
656
|
closeOnOverlayClick?: boolean;
|
|
620
657
|
/** 모달 패널에 추가할 className */
|
|
621
658
|
className?: string;
|
|
622
659
|
}
|
|
623
|
-
declare function Modal({ id, trigger, open: openProp, onOpenChange, variant, title, description, showCloseButton, children,
|
|
660
|
+
declare function Modal({ id, trigger, open: openProp, onOpenChange, variant, title, description, showCloseButton, children, cancelButtonProps, confirmButtonProps, onConfirm, onCancel, closeOnOverlayClick, className, }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
624
661
|
|
|
625
662
|
declare const Menubar: React$1.ForwardRefExoticComponent<Omit<Menubar$1.MenubarProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
626
663
|
declare const MenubarMenu: {
|
|
@@ -701,7 +738,21 @@ interface SearchInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputEle
|
|
|
701
738
|
/** onChange를 지연 호출할 ms. 지정하면 내부 draft 상태로 즉시 표시하고, 입력 완료 후 지연 커밋. */
|
|
702
739
|
debounce?: number;
|
|
703
740
|
}
|
|
704
|
-
|
|
741
|
+
/**
|
|
742
|
+
* ref로 노출되는 명령형 핸들.
|
|
743
|
+
* debounce 모드에서 부모가 "현재 value와 같은 값으로 리셋"해야 할 때 사용한다.
|
|
744
|
+
* (props value가 그대로면 동기화 effect가 발화하지 않으므로 prop만으로는 초기화 불가)
|
|
745
|
+
*/
|
|
746
|
+
interface SearchInputHandle {
|
|
747
|
+
/**
|
|
748
|
+
* 표시값·pending 커밋·예약된 debounce 타이머를 원자적으로 초기화한다.
|
|
749
|
+
* next 미지정 시 빈 문자열로 비운다. onChange는 호출하지 않는다.
|
|
750
|
+
*/
|
|
751
|
+
reset: (next?: string) => void;
|
|
752
|
+
/** 내부 input에 포커스 */
|
|
753
|
+
focus: () => void;
|
|
754
|
+
}
|
|
755
|
+
declare const SearchInput: React$1.ForwardRefExoticComponent<SearchInputProps & React$1.RefAttributes<SearchInputHandle>>;
|
|
705
756
|
|
|
706
757
|
interface SelectOption {
|
|
707
758
|
value: string;
|
|
@@ -738,6 +789,14 @@ interface MultiSelectProps extends SelectBase {
|
|
|
738
789
|
onValueChange?: (value: string[]) => void;
|
|
739
790
|
}
|
|
740
791
|
type SelectProps = SingleSelectProps | MultiSelectProps;
|
|
792
|
+
/**
|
|
793
|
+
* 단일/다중 선택 셀렉트. multi-select를 위해 radix Select가 아니라 Popover 위에
|
|
794
|
+
* 커스텀 listbox를 렌더한다. 접근성은 WAI-ARIA listbox 패턴으로 직접 구현했다:
|
|
795
|
+
* - 열린 상태에서 listbox에 포커스가 이동하고 `aria-activedescendant`로 활성 옵션을 연결한다.
|
|
796
|
+
* - 키보드: ↑/↓/Home/End 이동, Enter/Space 선택(다중은 토글), Esc 닫힘, 타입어헤드 점프.
|
|
797
|
+
* - 역할: 컨테이너 `role="listbox"`(+다중 시 `aria-multiselectable`), 옵션 `role="option"`+`aria-selected`.
|
|
798
|
+
* 배경·설계 근거: {@link ../../../docs/todo/select-a11y-keyboard-aria.md}
|
|
799
|
+
*/
|
|
741
800
|
declare function Select(props: SelectProps): react_jsx_runtime.JSX.Element;
|
|
742
801
|
|
|
743
802
|
type SheetSide = 'top' | 'right' | 'bottom' | 'left';
|
|
@@ -1008,15 +1067,79 @@ declare function Pagination({ currentPage, totalPages, onPageChange, simple, pre
|
|
|
1008
1067
|
|
|
1009
1068
|
type SortDirection = 'ASC' | 'DESC' | null;
|
|
1010
1069
|
interface TableColumn<T> {
|
|
1011
|
-
|
|
1070
|
+
/**
|
|
1071
|
+
* 컬럼 식별자(antd Table의 dataIndex에 대응).
|
|
1072
|
+
* - T의 실제 필드명은 IDE 자동완성으로 제안된다(Extract<keyof T, string>).
|
|
1073
|
+
* - 파생·가상 컬럼(예: 파일명에서 도출한 '유형')은 임의 문자열도 허용((string & {})).
|
|
1074
|
+
* 실제 값 추출은 sortValue/filterValue/cell의 (row: T)가 담당하므로 key는 식별자일 뿐이다.
|
|
1075
|
+
*/
|
|
1076
|
+
key: Extract<keyof T, string> | (string & {});
|
|
1012
1077
|
header: string;
|
|
1013
1078
|
sortable?: boolean;
|
|
1014
1079
|
/** 정렬 기준값 추출. sortable=true 시 필수 */
|
|
1015
1080
|
sortValue?: (row: T) => string | number;
|
|
1081
|
+
/**
|
|
1082
|
+
* true이면 헤더에 필터 아이콘을 노출하고, 체크박스로 여러 값을 다중 선택해
|
|
1083
|
+
* 해당 컬럼을 필터링할 수 있다. (sortable과 독립적으로 함께 사용 가능)
|
|
1084
|
+
*/
|
|
1085
|
+
filterable?: boolean;
|
|
1086
|
+
/**
|
|
1087
|
+
* 필터 기준값 추출. filterable=true 시 필수.
|
|
1088
|
+
* 반환한 문자열이 "선택된 옵션 value"와 일치하는 행만 통과한다.
|
|
1089
|
+
* (sortValue와 독립 — 정렬·필터 기준을 다르게 둘 수 있다)
|
|
1090
|
+
*/
|
|
1091
|
+
filterValue?: (row: T) => string;
|
|
1092
|
+
/**
|
|
1093
|
+
* 필터 체크박스 옵션 목록. 미제공 시 data에서 filterValue 고유값을 자동 도출한다.
|
|
1094
|
+
* - label: 체크박스에 표시할 텍스트
|
|
1095
|
+
* - value: filterValue 반환값과 매칭되는 값
|
|
1096
|
+
*/
|
|
1097
|
+
filterOptions?: {
|
|
1098
|
+
label: string;
|
|
1099
|
+
value: string;
|
|
1100
|
+
}[];
|
|
1101
|
+
/**
|
|
1102
|
+
* 초기 선택 필터값. 지정 시 첫 렌더부터 이 값들로 필터가 걸린 상태로 시작한다.
|
|
1103
|
+
* (정렬의 defaultSorting과 대칭)
|
|
1104
|
+
*/
|
|
1105
|
+
defaultFilter?: string[];
|
|
1016
1106
|
/** 헤더·셀 text-align. 기본값 "left" */
|
|
1017
1107
|
align?: 'left' | 'center' | 'right';
|
|
1018
1108
|
cellClassName?: string;
|
|
1019
1109
|
headerClassName?: string;
|
|
1110
|
+
/**
|
|
1111
|
+
* 고정 px 너비. 컨테이너가 넓어져도 이 컬럼은 늘어나지 않는다.
|
|
1112
|
+
* (grow와 함께 주면 width가 우선해 고정으로 처리된다)
|
|
1113
|
+
*
|
|
1114
|
+
* ⚠️ 한 테이블에서 width/minWidth/grow 중 하나라도 쓰면 그 테이블은 "flex 레이아웃"으로
|
|
1115
|
+
* 전환된다. 이때 컬럼 너비는 이 세 prop으로만 정하고, headerClassName의 w-[..] 같은
|
|
1116
|
+
* 너비 클래스는 무시된다(정렬·색상 등 다른 스타일에는 계속 headerClassName 사용 가능).
|
|
1117
|
+
*
|
|
1118
|
+
* @example width: 124 // 항상 124px 고정
|
|
1119
|
+
*/
|
|
1120
|
+
width?: number;
|
|
1121
|
+
/**
|
|
1122
|
+
* 가변 컬럼의 최소 px 너비(floor). 남은 공간이 부족해도 이 값 아래로는 줄어들지 않고,
|
|
1123
|
+
* 대신 테이블이 가로로 넘쳐 스크롤된다. grow와 함께 사용한다.
|
|
1124
|
+
*/
|
|
1125
|
+
minWidth?: number;
|
|
1126
|
+
/**
|
|
1127
|
+
* 가변 컬럼의 성장 가중치. 고정 컬럼(width)을 뺀 "남은 폭"을 grow 비율대로 나눠 갖는다.
|
|
1128
|
+
* (각 컬럼의 minWidth를 먼저 보장한 뒤, 그 위로 남는 여백만 grow 비율로 분배)
|
|
1129
|
+
*
|
|
1130
|
+
* - width/minWidth/grow를 아무것도 지정하지 않은 컬럼은 grow:1로 취급된다
|
|
1131
|
+
* → 여러 개면 남은 폭을 1:1로 균등 분배(headerClassName 없이 나열하던 기존 동작과 동일).
|
|
1132
|
+
* - 한 테이블에서 width(고정)와 grow(가변)를 섞어 쓸 수 있다.
|
|
1133
|
+
*
|
|
1134
|
+
* @example
|
|
1135
|
+
* // 남는 폭을 name : group : members = 3 : 1 : 1 로 분배.
|
|
1136
|
+
* // 각 컬럼은 minWidth 이하로는 줄지 않고, 그 아래로 좁아지면 가로 스크롤.
|
|
1137
|
+
* { key: 'name', grow: 3, minWidth: 180 }
|
|
1138
|
+
* { key: 'group', grow: 1, minWidth: 128 }
|
|
1139
|
+
* { key: 'members', grow: 1, minWidth: 128 }
|
|
1140
|
+
* { key: 'date', width: 136 } // 고정 컬럼은 늘어나지 않음
|
|
1141
|
+
*/
|
|
1142
|
+
grow?: number;
|
|
1020
1143
|
/**
|
|
1021
1144
|
* true이면 셀 내용을 한 줄로 잘라내고 hover 시 tooltip으로 전체 내용을 표시.
|
|
1022
1145
|
* tooltip에 표시할 텍스트를 별도로 지정하려면 ellipsisTooltip을 함께 사용.
|
|
@@ -1099,6 +1222,12 @@ interface TableProps<T> {
|
|
|
1099
1222
|
* 빈 배열(정렬 해제)은 전달되지 않으므로 항상 최소 1개 항목 보장.
|
|
1100
1223
|
*/
|
|
1101
1224
|
onSortingChange?: (sorting: SortingState) => void;
|
|
1225
|
+
/**
|
|
1226
|
+
* 필터 상태 변경 콜백. 서버사이드 필터 연동에 사용.
|
|
1227
|
+
* 내부 상태는 그대로 유지되며, 변경될 때마다 현재 전체 필터 배열을 전달한다.
|
|
1228
|
+
* (필터 전체 해제 시 빈 배열이 전달된다)
|
|
1229
|
+
*/
|
|
1230
|
+
onColumnFiltersChange?: (filters: ColumnFiltersState) => void;
|
|
1102
1231
|
className?: string;
|
|
1103
1232
|
/**
|
|
1104
1233
|
* 설정 시 tbody 영역만 스크롤되고 thead가 상단에 고정됩니다.
|
|
@@ -1109,10 +1238,14 @@ interface TableProps<T> {
|
|
|
1109
1238
|
declare function SortIcon({ direction }: {
|
|
1110
1239
|
direction: SortDirection;
|
|
1111
1240
|
}): react_jsx_runtime.JSX.Element;
|
|
1112
|
-
declare function Table<T>({ columns, data, rowKey, pagination, defaultSorting, loading, empty, enableRowSelection, rowSelection: rowSelectionProp, onRowSelectionChange, rowActions, onRowClick, isRowDisabled, onSortingChange, className, maxHeight, }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
1241
|
+
declare function Table<T>({ columns, data, rowKey, pagination, defaultSorting, loading, empty, enableRowSelection, rowSelection: rowSelectionProp, onRowSelectionChange, rowActions, onRowClick, isRowDisabled, onSortingChange, onColumnFiltersChange, className, maxHeight, }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
1113
1242
|
|
|
1114
1243
|
declare const TooltipProvider: React$1.FC<Tooltip$1.TooltipProviderProps>;
|
|
1115
|
-
interface
|
|
1244
|
+
interface TooltipSizeProps {
|
|
1245
|
+
/** 말풍선 최대 너비 (숫자는 px). @default 280 */
|
|
1246
|
+
maxWidth?: number | string;
|
|
1247
|
+
}
|
|
1248
|
+
interface TooltipProps extends Pick<React$1.ComponentPropsWithoutRef<typeof Tooltip$1.Root>, 'open' | 'defaultOpen' | 'onOpenChange' | 'delayDuration'>, Omit<React$1.ComponentPropsWithoutRef<typeof Tooltip$1.Content>, 'children' | 'content'>, TooltipSizeProps {
|
|
1116
1249
|
/** 툴팁 말풍선에 표시할 내용 */
|
|
1117
1250
|
content: React$1.ReactNode;
|
|
1118
1251
|
/** 호버 시 툴팁을 여는 트리거 요소 (asChild로 렌더링) */
|
|
@@ -1136,6 +1269,170 @@ declare function UserMessageBubble({ content }: {
|
|
|
1136
1269
|
content: string;
|
|
1137
1270
|
}): react_jsx_runtime.JSX.Element;
|
|
1138
1271
|
|
|
1272
|
+
type PopoverContentProps = React$1.ComponentPropsWithoutRef<typeof Popover$1.Content>;
|
|
1273
|
+
interface PopoverProps extends Pick<React$1.ComponentPropsWithoutRef<typeof Popover$1.Root>, 'open' | 'defaultOpen' | 'onOpenChange'> {
|
|
1274
|
+
/** 팝오버를 여는 트리거 요소 (asChild 로 렌더링) */
|
|
1275
|
+
triggerNode: React$1.ReactNode;
|
|
1276
|
+
/** 팝오버 내부에 표시할 내용 */
|
|
1277
|
+
children: React$1.ReactNode;
|
|
1278
|
+
/** 트리거 상호작용 방식. @default 'click' */
|
|
1279
|
+
trigger?: 'click' | 'hover';
|
|
1280
|
+
/** 트리거 기준 표시 방향. @default 'bottom' */
|
|
1281
|
+
side?: PopoverContentProps['side'];
|
|
1282
|
+
/** 트리거 기준 정렬. @default 'center' */
|
|
1283
|
+
align?: PopoverContentProps['align'];
|
|
1284
|
+
/** 트리거와의 거리(px). @default 8 */
|
|
1285
|
+
sideOffset?: number;
|
|
1286
|
+
/** align 축 오프셋(px). @default 0 */
|
|
1287
|
+
alignOffset?: number;
|
|
1288
|
+
/** 팝오버 컨테이너 추가 클래스(폭·패딩 등 오버라이드) */
|
|
1289
|
+
className?: string;
|
|
1290
|
+
/** 팝오버 컨테이너 인라인 스타일 */
|
|
1291
|
+
style?: React$1.CSSProperties;
|
|
1292
|
+
/** trigger='click' 의 모달 동작(바깥 상호작용 차단). @default false */
|
|
1293
|
+
modal?: boolean;
|
|
1294
|
+
/** trigger='hover' 일 때 열림 지연(ms) */
|
|
1295
|
+
openDelay?: number;
|
|
1296
|
+
/** trigger='hover' 일 때 닫힘 지연(ms) */
|
|
1297
|
+
closeDelay?: number;
|
|
1298
|
+
/** Portal 대상 컨테이너. 미지정 시 document.body */
|
|
1299
|
+
container?: HTMLElement | null;
|
|
1300
|
+
}
|
|
1301
|
+
declare function Popover({ triggerNode, children, trigger, open, defaultOpen, onOpenChange, side, align, sideOffset, alignOffset, className, style, modal, openDelay, closeDelay, container, }: PopoverProps): react_jsx_runtime.JSX.Element;
|
|
1302
|
+
|
|
1303
|
+
/** antd `message`의 success/warning/info/error 를 커버하는 토스트 유형. */
|
|
1304
|
+
type ToastType = 'success' | 'warning' | 'info' | 'error';
|
|
1305
|
+
/**
|
|
1306
|
+
* DS `toast()` 옵션 — sonner 옵션 전부가 아니라 사용처에서 자주 쓰는 것만 노출한다.
|
|
1307
|
+
* (그 외 세부 제어는 `<Toaster />` prop으로 전역 설정)
|
|
1308
|
+
*/
|
|
1309
|
+
type ToastOptions = {
|
|
1310
|
+
/** 토스트 유형(아이콘·색). 미지정 시 중립(기본). */
|
|
1311
|
+
type?: ToastType;
|
|
1312
|
+
/** 제목 아래 보조 설명 문구 */
|
|
1313
|
+
description?: React$1.ReactNode;
|
|
1314
|
+
/**
|
|
1315
|
+
* 떠 있는 시간(ms). 미지정 시 `<Toaster />` 기본값(sonner 기본 4000ms).
|
|
1316
|
+
* `Infinity`를 주면 사용자가 닫기 전까지 유지된다.
|
|
1317
|
+
*/
|
|
1318
|
+
duration?: number;
|
|
1319
|
+
/** 표시 위치. 미지정 시 `<Toaster />` 기본값(top-center). */
|
|
1320
|
+
position?: ExternalToast['position'];
|
|
1321
|
+
/** 토스트 컨테이너에 추가할 클래스 */
|
|
1322
|
+
className?: string;
|
|
1323
|
+
};
|
|
1324
|
+
type ToastMessage = React$1.ReactNode;
|
|
1325
|
+
/** type을 제외한 옵션 — 편의 메서드/핸들에서 사용(유형은 메서드가 이미 결정). */
|
|
1326
|
+
type ToastMethodOptions = Omit<ToastOptions, 'type'>;
|
|
1327
|
+
declare function baseToast(message: ToastMessage, options?: ToastOptions): string | number;
|
|
1328
|
+
/** `toast.promise` 문구 설정 — 성공/실패 문구는 결과·에러로 만드는 함수도 허용. */
|
|
1329
|
+
type ToastPromiseMessages<T> = {
|
|
1330
|
+
/** 로딩 중 문구 */
|
|
1331
|
+
loading: ToastMessage;
|
|
1332
|
+
/** 성공 시 문구(또는 결과값으로 만드는 함수) */
|
|
1333
|
+
success: ToastMessage | ((data: T) => ToastMessage);
|
|
1334
|
+
/** 실패 시 문구(또는 에러로 만드는 함수) */
|
|
1335
|
+
error: ToastMessage | ((error: unknown) => ToastMessage);
|
|
1336
|
+
/** 보조 설명(선택) */
|
|
1337
|
+
description?: ToastMessage;
|
|
1338
|
+
};
|
|
1339
|
+
/**
|
|
1340
|
+
* Promise(또는 async 함수)의 진행 상태를 로딩→성공/실패 토스트로 자동 전환한다.
|
|
1341
|
+
* 하나의 토스트가 상태에 따라 아이콘/문구만 바뀌므로 외부에서 id를 들고
|
|
1342
|
+
* 수동으로 갱신할 필요가 없다.
|
|
1343
|
+
*
|
|
1344
|
+
* @remarks
|
|
1345
|
+
* react-query와 함께 쓸 때는 **`mutateAsync`를 넘겨야** 로딩 토스트가 보인다.
|
|
1346
|
+
* `mutate`는 `void`를 반환해 Promise가 아니므로 로딩 상태를 추적할 수 없다.
|
|
1347
|
+
* (로딩 없이 콜백으로만 처리하려면 `toast.loading()`이 반환하는 핸들을 참고.)
|
|
1348
|
+
*
|
|
1349
|
+
* @example
|
|
1350
|
+
* // ✅ react-query — mutateAsync 사용 (로딩 O)
|
|
1351
|
+
* const { mutateAsync, isPending } = useMutation({ mutationFn: saveModel });
|
|
1352
|
+
* const onSave = () =>
|
|
1353
|
+
* toast.promise(mutateAsync(payload), {
|
|
1354
|
+
* loading: '저장 중입니다...',
|
|
1355
|
+
* success: (data) => `${data.name} 저장되었습니다`,
|
|
1356
|
+
* error: (e) => `저장 실패: ${String(e)}`,
|
|
1357
|
+
* });
|
|
1358
|
+
* // 버튼 중복 클릭 방지에만 isPending 사용: <Button disabled={isPending} …/>
|
|
1359
|
+
*
|
|
1360
|
+
* @example
|
|
1361
|
+
* // 일반 Promise / async 함수도 동일하게 동작
|
|
1362
|
+
* toast.promise(() => fetch('/api').then((r) => r.json()), {
|
|
1363
|
+
* loading: '불러오는 중...',
|
|
1364
|
+
* success: '완료',
|
|
1365
|
+
* error: '실패',
|
|
1366
|
+
* });
|
|
1367
|
+
*/
|
|
1368
|
+
declare function promiseToast<T>(promise: Promise<T> | (() => Promise<T>), messages: ToastPromiseMessages<T>): string | number;
|
|
1369
|
+
/**
|
|
1370
|
+
* 이미 떠 있는 하나의 토스트를 이후 상태로 갱신하는 핸들.
|
|
1371
|
+
* `toast.loading()`이 반환하며, `{ id }`를 옵션으로 넘겨 다시 지정할 필요 없이
|
|
1372
|
+
* 같은 토스트를 성공/실패 등으로 전환한다.
|
|
1373
|
+
*/
|
|
1374
|
+
type ToastHandle = {
|
|
1375
|
+
/** 이 토스트의 id (직접 참조가 필요할 때만 사용) */
|
|
1376
|
+
readonly id: string | number;
|
|
1377
|
+
/** 같은 토스트를 성공 상태로 전환 */
|
|
1378
|
+
success: (message: ToastMessage, options?: ToastMethodOptions) => void;
|
|
1379
|
+
/** 같은 토스트를 실패 상태로 전환 */
|
|
1380
|
+
error: (message: ToastMessage, options?: ToastMethodOptions) => void;
|
|
1381
|
+
/** 같은 토스트를 경고 상태로 전환 */
|
|
1382
|
+
warning: (message: ToastMessage, options?: ToastMethodOptions) => void;
|
|
1383
|
+
/** 같은 토스트를 정보 상태로 전환 */
|
|
1384
|
+
info: (message: ToastMessage, options?: ToastMethodOptions) => void;
|
|
1385
|
+
/** 로딩 문구만 갱신 */
|
|
1386
|
+
loading: (message: ToastMessage, options?: ToastMethodOptions) => void;
|
|
1387
|
+
/** 중립(기본) 문구로 갱신 */
|
|
1388
|
+
message: (message: ToastMessage, options?: ToastMethodOptions) => void;
|
|
1389
|
+
/** 이 토스트 닫기 */
|
|
1390
|
+
dismiss: () => void;
|
|
1391
|
+
};
|
|
1392
|
+
/**
|
|
1393
|
+
* 토스트를 띄운다. 사용처의 antd `message.{success|warning|info|error}` 패턴을 대체한다.
|
|
1394
|
+
* 렌더 지점인 `<Toaster />`는 앱 루트에 한 번만 마운트하면 된다(RyaiDsProvider에 포함).
|
|
1395
|
+
*
|
|
1396
|
+
* @example
|
|
1397
|
+
* toast('저장되었습니다'); // 중립(기본)
|
|
1398
|
+
* toast('복사되었습니다', { type: 'success' }); // 유형 지정
|
|
1399
|
+
* toast.success('복사되었습니다'); // antd message 스타일 편의 메서드
|
|
1400
|
+
* toast.error('삭제에 실패했습니다', { description: '잠시 후 다시 시도해 주세요.' });
|
|
1401
|
+
*/
|
|
1402
|
+
declare const toast: typeof baseToast & {
|
|
1403
|
+
success: (message: ToastMessage, options?: ToastMethodOptions) => string | number;
|
|
1404
|
+
warning: (message: ToastMessage, options?: ToastMethodOptions) => string | number;
|
|
1405
|
+
info: (message: ToastMessage, options?: ToastMethodOptions) => string | number;
|
|
1406
|
+
error: (message: ToastMessage, options?: ToastMethodOptions) => string | number;
|
|
1407
|
+
/**
|
|
1408
|
+
* 로딩 스피너 토스트를 띄우고, 이후 상태로 전환할 수 있는 핸들을 돌려준다.
|
|
1409
|
+
* `{ id }`를 다시 넘길 필요 없이 핸들 메서드로 같은 토스트를 갱신한다.
|
|
1410
|
+
*
|
|
1411
|
+
* Promise를 받을 수 있으면 `toast.promise`가 더 간단하다. 이 API는 react-query의
|
|
1412
|
+
* `mutate`처럼 Promise가 없는 콜백 방식에서 유용하다.
|
|
1413
|
+
*
|
|
1414
|
+
* @example
|
|
1415
|
+
* // react-query — mutate(콜백) 방식
|
|
1416
|
+
* const t = toast.loading('저장 중입니다...');
|
|
1417
|
+
* mutate(payload, {
|
|
1418
|
+
* onSuccess: () => t.success('저장되었습니다'),
|
|
1419
|
+
* onError: () => t.error('저장 실패'),
|
|
1420
|
+
* });
|
|
1421
|
+
*/
|
|
1422
|
+
loading: (message: ToastMessage, options?: ToastMethodOptions) => ToastHandle;
|
|
1423
|
+
/** Promise/async 함수를 받아 로딩→성공/실패로 자동 전환. */
|
|
1424
|
+
promise: typeof promiseToast;
|
|
1425
|
+
/** id로 특정 토스트를 닫는다. 인자 없으면 전체 닫기. */
|
|
1426
|
+
dismiss: (id?: number | string) => string | number;
|
|
1427
|
+
};
|
|
1428
|
+
/**
|
|
1429
|
+
* 토스트 렌더 지점. 앱 루트에 한 번만 마운트한다.
|
|
1430
|
+
* 배경/글자/테두리 색은 팔레트·시맨틱 토큰(CSS 변수)만 사용하고,
|
|
1431
|
+
* 유형별 색상은 아이콘에만 적용한다(Alert 컴포넌트와 동일 원칙).
|
|
1432
|
+
* position 기본값은 antd `message`와 유사한 top-center.
|
|
1433
|
+
*/
|
|
1434
|
+
declare function Toaster({ position, ...props }: ToasterProps): react_jsx_runtime.JSX.Element;
|
|
1435
|
+
|
|
1139
1436
|
/**
|
|
1140
1437
|
* 디자인 시스템 전역 Provider 묶음.
|
|
1141
1438
|
* layout.tsx (Server Component) 안에서 children을 감싸는 용도.
|
|
@@ -1144,6 +1441,7 @@ declare function UserMessageBubble({ content }: {
|
|
|
1144
1441
|
* - TooltipProvider: Radix Tooltip 전역 설정
|
|
1145
1442
|
* · delayDuration — hover → open 지연 시간 (ms)
|
|
1146
1443
|
* · skipDelayDuration — 빠르게 연속 이동 시 딜레이 스킵 임계치 (ms)
|
|
1444
|
+
* - Toaster: sonner 토스트 렌더 지점(앱 루트 1회 마운트). `toast()`로 호출한다.
|
|
1147
1445
|
*/
|
|
1148
1446
|
declare function RyaiDsProvider({ children }: {
|
|
1149
1447
|
children: React.ReactNode;
|
|
@@ -1656,4 +1954,4 @@ declare function WordFileIcon({ className }: {
|
|
|
1656
1954
|
className?: string;
|
|
1657
1955
|
}): react_jsx_runtime.JSX.Element;
|
|
1658
1956
|
|
|
1659
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AgentBlogIcon, AgentCsIcon, AgentDataIcon, AgentHrIcon, AgentMailIcon, AgentTrendIcon, AiAgentIcon, AiBuilderIcon, AiCloudIcon, AiDatacenterIcon, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AlignJustifyIcon, AlignLeftIcon, ArrowDownIcon, Avatar, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, type AvatarProps, type AvatarSize, BADGE_VARIANT_STYLES, Badge, type BadgeProps, type BadgeVariant, BlockquoteIcon, BoldIcon, BookOpenIcon, BookUpIcon, Breadcrumb, Button, type ButtonProps, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CheckboxCard, type CheckboxCardProps, type CheckboxProps, ChevronsUpDownIcon, ChoiceCardGroup, type ChoiceCardGroupProps, ChoiceCardItem, type ChoiceCardItemProps, CircleCheckFillIcon, CircleHelpIcon, CircleIndicator, type CircleIndicatorProps, CircleOutlineIcon, ClaudeIcon, CodeIcon, CodeSquareIcon, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleRoot, CollapsibleTrigger, type CollapsibleWorkspace, Combobox, type ComboboxOption, type ComboboxProps, CreditIcon, DataSection, type DataSectionProps, DatePicker, type DatePickerLocale, type DatePickerMode, type DatePickerProps, type DateRange, DeepSeekIcon, type DisabledDateRule, DownloadIcon, Drawer, type DrawerProps, DriveIcon, DropdownMenu, type DropdownMenuGroupConfig, type DropdownMenuItemConfig, type DropdownMenuProps, Empty, EmptyTrayIcon, Field, FieldDivider, type FieldProps, FieldRow, type FieldRowProps, FieldSection, type FieldSectionProps, FileCodeIcon, FileSearchIcon, FileTypeCornerIcon, FolderAmberIcon, FolderBlueIcon, FolderClosedIcon, FolderGreenIcon, FolderVioletIcon, GeminiIcon, GoogleIcon, HangulFileIcon, Header, type HeaderNavItem, type HeaderProps, HeadingIcon, HtmlFileIcon, ICON_NODES, Icon, type IconProps, ImageIcon, ImportIcon, IndentIcon, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, ItalicIcon, KbCard, type KbCardMetadataItem, type KbCardProps, KeyRoundIcon, type LanguageItem, LayersIcon, LayoutGridIcon, LineChartIcon, LinkIcon, ListIcon, ListOrderedIcon, MarkdownFileIcon, MarkdownMessage, Menubar, MenubarContent, MenubarGroup, MenubarItem, MenubarMenu, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MessageCircleIcon, MessageFooter, type MessageFooterProps, MessagesSquareIcon, Modal, type ModalProps, MyPageIcon, type NavDropdownItem, type NotificationItem, NumberBadge, type NumberBadgeProps, OpenAiIcon, OutdentIcon, Pagination, type PaginationProps, PanelLeftIcon, PdfFileIcon, PenLineIcon, PencilLineIcon, PresentationIcon, Progress, type ProgressProps, type ProgressThreshold, RefreshCwIcon, RyaiDsProvider, RyaiLogoIcon, SearchInput, type SearchInputProps, SegmentedControl, Select, type SelectGroup, type SelectOption, type SelectProps, Sheet, SheetFileIcon, type SheetProps, ShoppingBagIcon, Sidebar, SidebarLink, type SidebarMainMenuItem, type SidebarSubMenuItem, type SidebarUtilityItem, Skeleton, type SkeletonProps, SlideFileIcon, Slider, SmileIcon, type SortDirection, SortIcon, SparklesIcon, SquareCheckIcon, SquareCheckOutlineIcon, StarIcon, Stepper, type StepperProps, StrikethroughIcon, Switch, SwitchField, type SwitchFieldProps, type TabItem, Table, type TableColumn, type TablePaginationConfig, TablePropertiesIcon, type TableProps, type TableSortingItem, Tabs, type TabsProps, Toggle, ToggleGroup, type ToggleGroupItemData, type ToggleGroupProps, type ToggleProps, Tooltip, type TooltipProps, TooltipProvider, TooltipWithIcon, type TooltipWithIconProps, TrashIcon, UpstageIcon, type UserMenuSection, type UserMenuSectionItem, UserMessageBubble, WandSparklesIcon, WordFileIcon, buttonVariants, toggleBaseClasses, toggleSizeClasses };
|
|
1957
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AgentBlogIcon, AgentCsIcon, AgentDataIcon, AgentHrIcon, AgentMailIcon, AgentTrendIcon, AiAgentIcon, AiBuilderIcon, AiCloudIcon, AiDatacenterIcon, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AlignJustifyIcon, AlignLeftIcon, ArrowDownIcon, Avatar, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, type AvatarProps, type AvatarSize, BADGE_VARIANT_STYLES, Badge, type BadgeProps, type BadgeVariant, BlockquoteIcon, BoldIcon, BookOpenIcon, BookUpIcon, Breadcrumb, Button, type ButtonProps, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CheckboxCard, type CheckboxCardProps, type CheckboxProps, ChevronsUpDownIcon, ChoiceCardGroup, type ChoiceCardGroupProps, ChoiceCardItem, type ChoiceCardItemProps, CircleCheckFillIcon, CircleHelpIcon, CircleIndicator, type CircleIndicatorProps, CircleOutlineIcon, ClaudeIcon, CodeIcon, CodeSquareIcon, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleRoot, CollapsibleTrigger, type CollapsibleWorkspace, Combobox, type ComboboxOption, type ComboboxProps, CreditIcon, DataSection, type DataSectionProps, DatePicker, type DatePickerLocale, type DatePickerMode, type DatePickerProps, type DateRange, DeepSeekIcon, type DisabledDateRule, DownloadIcon, Drawer, type DrawerProps, DriveIcon, DropdownMenu, type DropdownMenuGroupConfig, type DropdownMenuItemConfig, type DropdownMenuProps, Empty, EmptyTrayIcon, Field, FieldDivider, type FieldProps, FieldRow, type FieldRowProps, FieldSection, type FieldSectionProps, FileCodeIcon, FileSearchIcon, FileTypeCornerIcon, FolderAmberIcon, FolderBlueIcon, FolderClosedIcon, FolderGreenIcon, FolderVioletIcon, GeminiIcon, GoogleIcon, HangulFileIcon, Header, type HeaderNavItem, type HeaderProps, HeadingIcon, HtmlFileIcon, ICON_NODES, Icon, type IconProps, ImageIcon, ImportIcon, IndentIcon, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, ItalicIcon, KbCard, type KbCardMetadataItem, type KbCardProps, KeyRoundIcon, type LanguageItem, LayersIcon, LayoutGridIcon, LineChartIcon, LinkIcon, ListIcon, ListOrderedIcon, MarkdownFileIcon, MarkdownMessage, Menubar, MenubarContent, MenubarGroup, MenubarItem, MenubarMenu, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MessageCircleIcon, MessageFooter, type MessageFooterProps, MessagesSquareIcon, Modal, type ModalButtonProps, type ModalProps, MyPageIcon, type NavDropdownItem, type NotificationItem, NumberBadge, type NumberBadgeProps, OpenAiIcon, OutdentIcon, Pagination, type PaginationProps, PanelLeftIcon, PdfFileIcon, PenLineIcon, PencilLineIcon, Popover, type PopoverProps, PresentationIcon, Progress, type ProgressProps, type ProgressThreshold, RefreshCwIcon, RyaiDsProvider, RyaiLogoIcon, SearchInput, type SearchInputHandle, type SearchInputProps, SegmentedControl, Select, type SelectGroup, type SelectOption, type SelectProps, Sheet, SheetFileIcon, type SheetProps, ShoppingBagIcon, Sidebar, SidebarLink, type SidebarMainMenuItem, type SidebarSubMenuItem, type SidebarUtilityItem, Skeleton, type SkeletonProps, SlideFileIcon, Slider, SmileIcon, type SortDirection, SortIcon, SparklesIcon, SquareCheckIcon, SquareCheckOutlineIcon, StarIcon, Stepper, type StepperProps, StrikethroughIcon, Switch, SwitchField, type SwitchFieldProps, type TabItem, Table, type TableColumn, type TablePaginationConfig, TablePropertiesIcon, type TableProps, type TableSortingItem, Tabs, type TabsProps, type ToastHandle, type ToastOptions, type ToastPromiseMessages, type ToastType, Toaster, Toggle, ToggleGroup, type ToggleGroupItemData, type ToggleGroupProps, type ToggleProps, Tooltip, type TooltipProps, TooltipProvider, type TooltipSizeProps, TooltipWithIcon, type TooltipWithIconProps, TrashIcon, UpstageIcon, type UserMenuSection, type UserMenuSectionItem, UserMessageBubble, WandSparklesIcon, WordFileIcon, buttonVariants, toast, toggleBaseClasses, toggleSizeClasses };
|