@aivex/ui 1.2.0-dev.3 → 1.2.0-dev.31
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/{Button-CzqDPqUT.js → Button-BSJwb59G.js} +356 -1991
- package/dist/Button-BSJwb59G.js.map +1 -0
- package/dist/Button-OQscp8mY.cjs +2 -0
- package/dist/Button-OQscp8mY.cjs.map +1 -0
- package/dist/IconButton-Cl3T7MUr.cjs +2 -0
- package/dist/IconButton-Cl3T7MUr.cjs.map +1 -0
- package/dist/IconButton-DyUOtz87.js +208 -0
- package/dist/IconButton-DyUOtz87.js.map +1 -0
- package/dist/Switch-DP8FRLJK.cjs +2 -0
- package/dist/Switch-DP8FRLJK.cjs.map +1 -0
- package/dist/Switch-rIEhz2pk.js +325 -0
- package/dist/Switch-rIEhz2pk.js.map +1 -0
- package/dist/comment.cjs +3 -113
- package/dist/comment.cjs.map +1 -1
- package/dist/comment.js +128 -13476
- package/dist/comment.js.map +1 -1
- package/dist/components/Badge/Badge.d.ts +8 -1
- package/dist/components/Comment/CommentInput.d.ts +6 -1
- package/dist/components/DataGrid/DataGrid.d.ts +38 -71
- package/dist/components/DataGrid/DataGridColumnSettings.d.ts +18 -0
- package/dist/components/DataGrid/DataGridPrimitives.d.ts +79 -0
- package/dist/components/DataGrid/DataGridRows.d.ts +60 -0
- package/dist/components/DataGrid/index.d.ts +6 -2
- package/dist/components/DatePicker/DatePicker.d.ts +13 -18
- package/dist/components/DatePicker/date.d.ts +1 -0
- package/dist/components/DatePicker/index.d.ts +1 -1
- package/dist/components/DraggableScroll/DraggableScroll.d.ts +6 -1
- package/dist/components/Icon/index.d.ts +3 -1
- package/dist/components/InputBase/InputBase.d.ts +5 -7
- package/dist/components/Modal/Modal.d.ts +9 -2
- package/dist/components/Modal/index.d.ts +1 -1
- package/dist/components/ScrollArea/ScrollArea.d.ts +5 -1
- package/dist/components/SelectBox/SelectBox.d.ts +7 -4
- package/dist/components/SelectButton/SelectButton.d.ts +18 -0
- package/dist/components/SelectButton/index.d.ts +2 -0
- package/dist/components/ShapeEditor/ShapeEditor.d.ts +1 -1
- package/dist/components/ShapeEditor/ShapeViewer.d.ts +44 -0
- package/dist/components/ShapeEditor/_components/ContextMenu.d.ts +1 -1
- package/dist/components/ShapeEditor/_components/ImageStateOverlay.d.ts +8 -3
- package/dist/components/ShapeEditor/_components/Minimap.d.ts +16 -13
- package/dist/components/ShapeEditor/_components/MinimapShape.d.ts +2 -2
- package/dist/components/ShapeEditor/_components/RegionOverlay.d.ts +21 -0
- package/dist/components/ShapeEditor/_components/SelectionInfo.d.ts +2 -0
- package/dist/components/ShapeEditor/_components/SettingsPanel.d.ts +18 -2
- package/dist/components/ShapeEditor/_constants.d.ts +7 -4
- package/dist/components/ShapeEditor/_model/clipboard.d.ts +22 -0
- package/dist/components/ShapeEditor/_model/clipboard.test.d.ts +1 -0
- package/dist/components/ShapeEditor/_model/cursors.d.ts +5 -0
- package/dist/components/ShapeEditor/_model/cursors.test.d.ts +1 -0
- package/dist/components/ShapeEditor/_model/geometry.d.ts +35 -1
- package/dist/components/ShapeEditor/_model/geometry.evenodd-audit.test.d.ts +1 -0
- package/dist/components/ShapeEditor/_model/geometry.test.d.ts +1 -0
- package/dist/components/ShapeEditor/_model/imageDiagnosis.d.ts +23 -0
- package/dist/components/ShapeEditor/_model/imageDiagnosis.test.d.ts +1 -0
- package/dist/components/ShapeEditor/_model/imageLoad.d.ts +13 -0
- package/dist/components/ShapeEditor/_model/imageLoad.test.d.ts +1 -0
- package/dist/components/ShapeEditor/_model/keymap.d.ts +1 -1
- package/dist/components/ShapeEditor/_model/overlays.d.ts +91 -15
- package/dist/components/ShapeEditor/_model/overlays.test.d.ts +1 -0
- package/dist/components/ShapeEditor/_model/props.d.ts +118 -27
- package/dist/components/ShapeEditor/_model/strings.d.ts +7 -3
- package/dist/components/ShapeEditor/_model/viewSettings.d.ts +46 -1
- package/dist/components/ShapeEditor/_model/viewSettings.test.d.ts +1 -0
- package/dist/components/ShapeEditor/_renderers/KonvaRenderer.d.ts +27 -7
- package/dist/components/ShapeEditor/_renderers/PixiRenderer.d.ts +36 -11
- package/dist/components/ShapeEditor/_renderers/transformSession.d.ts +6 -1
- package/dist/components/ShapeEditor/_renderers/types.d.ts +57 -22
- package/dist/components/ShapeEditor/_state/createInteractionController.d.ts +4 -0
- package/dist/components/ShapeEditor/_state/createInteractionController.test.d.ts +1 -0
- package/dist/components/ShapeEditor/_state/useDrawSession.d.ts +2 -1
- package/dist/components/ShapeEditor/_state/useEditorHotkeys.d.ts +2 -0
- package/dist/components/ShapeEditor/_state/useEngineLifecycle.d.ts +48 -14
- package/dist/components/ShapeEditor/_state/useEngineLifecycle.test.d.ts +1 -0
- package/dist/components/ShapeEditor/_state/useSelectionActions.d.ts +6 -5
- package/dist/components/ShapeEditor/index.d.ts +5 -2
- package/dist/components/Spinner/Spinner.d.ts +15 -0
- package/dist/components/Spinner/index.d.ts +2 -0
- package/dist/components/Switch/Switch.d.ts +2 -1
- package/dist/components/Tagbox/Tagbox.d.ts +1 -4
- package/dist/components/Textarea/Textarea.d.ts +7 -4
- package/dist/components/Textbox/Textbox.d.ts +1 -5
- package/dist/components/Toast/Toast.d.ts +13 -3
- package/dist/components/Toast/index.d.ts +1 -1
- package/dist/index.cjs +1 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1970 -5779
- package/dist/index.js.map +1 -1
- package/dist/shape-editor.cjs +1 -1
- package/dist/shape-editor.cjs.map +1 -1
- package/dist/shape-editor.js +3596 -2200
- package/dist/shape-editor.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/tokens/tokens.css +611 -611
- package/package.json +15 -1
- package/dist/Button-C_GP2mJ-.cjs +0 -2
- package/dist/Button-C_GP2mJ-.cjs.map +0 -1
- package/dist/Button-CzqDPqUT.js.map +0 -1
- package/dist/IconButton-B-MspnYP.cjs +0 -2
- package/dist/IconButton-B-MspnYP.cjs.map +0 -1
- package/dist/IconButton-DTGSfJme.js +0 -560
- package/dist/IconButton-DTGSfJme.js.map +0 -1
- package/dist/Switch-B2irM7Pp.js +0 -2656
- package/dist/Switch-B2irM7Pp.js.map +0 -1
- package/dist/Switch-CMKBdqkX.cjs +0 -42
- package/dist/Switch-CMKBdqkX.cjs.map +0 -1
- package/dist/components/ShapeEditor/_components/RoiOverlay.d.ts +0 -21
|
@@ -13,10 +13,17 @@ export interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, "color
|
|
|
13
13
|
rounded?: boolean;
|
|
14
14
|
size?: "xs" | "sm" | "md";
|
|
15
15
|
color?: BadgeColor;
|
|
16
|
+
/**
|
|
17
|
+
* 라벨 앞 슬롯(주로 아이콘). 아이콘 크기는 xs=12, sm·md=16을 쓴다.
|
|
18
|
+
* 이름이 prefix가 아닌 것은 React HTMLAttributes의 RDFa `prefix`(string)와 충돌하기 때문이다.
|
|
19
|
+
*/
|
|
20
|
+
startContent?: ReactNode;
|
|
21
|
+
/** 라벨 뒤 슬롯(주로 삭제 IconButton). 아이콘 크기는 16을 쓴다. 시안상 xs에는 쓰지 않는다. */
|
|
22
|
+
endContent?: ReactNode;
|
|
16
23
|
children?: ReactNode;
|
|
17
24
|
ref?: Ref<HTMLSpanElement>;
|
|
18
25
|
}
|
|
19
|
-
declare function Badge({ className, variant, rounded, size, color, children, ref, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
declare function Badge({ className, variant, rounded, size, color, startContent, endContent, children, ref, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
20
27
|
declare const dotVariants: (props?: ({
|
|
21
28
|
type?: "essential" | "new" | null | undefined;
|
|
22
29
|
size?: "lg" | "md" | "sm" | null | undefined;
|
|
@@ -14,6 +14,11 @@ export interface CommentInputProps {
|
|
|
14
14
|
placeholder?: string;
|
|
15
15
|
/** 전송 버튼 라벨(호스트 i18n). 기본 "Send". */
|
|
16
16
|
submitLabel?: string;
|
|
17
|
+
/**
|
|
18
|
+
* 전송 버튼 사용 — 켜면 내용이 있을 때만 입력 아래 오른쪽에 나타난다(시안).
|
|
19
|
+
* 끄면 어느 상태에서도 없이 Enter로만 보낸다.
|
|
20
|
+
*/
|
|
21
|
+
showSubmit?: boolean;
|
|
17
22
|
/** 전송 중 여부 — 버튼 비활성(스피너 등은 호스트가 submitLabel 자리로). */
|
|
18
23
|
pending?: boolean;
|
|
19
24
|
/** 멘션(@) 후보. 생략하면 멘션 없이 동작. */
|
|
@@ -27,4 +32,4 @@ export interface CommentInputProps {
|
|
|
27
32
|
* 코멘트 스레드와 동일한 크롬: 헤더(타이틀+닫기) + 입력행(아바타 · 멘션 입력 · 오른쪽
|
|
28
33
|
* Send 버튼). 화면 배치(핀 오른쪽 등)는 호스트가 감싸는 컨테이너에서 담당한다.
|
|
29
34
|
*/
|
|
30
|
-
export declare function CommentInput({ user, value, onChange, onSubmit, onClose, title, placeholder, submitLabel, pending, userList, mentionEmptyText, initialContent, className, }: CommentInputProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare function CommentInput({ user, value, onChange, onSubmit, onClose, title, placeholder, submitLabel, showSubmit, pending, userList, mentionEmptyText, initialContent, className, }: CommentInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,71 +1,7 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import type {
|
|
3
|
-
import { type
|
|
4
|
-
|
|
5
|
-
type DataGridValue<TData, TValue> = TValue | ((row: TData, index: number) => TValue);
|
|
6
|
-
declare module "@tanstack/react-table" {
|
|
7
|
-
interface ColumnMeta<TData extends RowData, TValue> {
|
|
8
|
-
align?: DataGridAlign;
|
|
9
|
-
headerAlign?: DataGridAlign;
|
|
10
|
-
cellAlign?: DataGridAlign;
|
|
11
|
-
className?: string;
|
|
12
|
-
headerClassName?: string;
|
|
13
|
-
cellClassName?: DataGridValue<TData, string | undefined>;
|
|
14
|
-
headerSortTrigger?: boolean;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
export interface DataGridRootProps extends HTMLAttributes<HTMLDivElement> {
|
|
18
|
-
ref?: Ref<HTMLDivElement>;
|
|
19
|
-
}
|
|
20
|
-
declare function DataGridRoot({ className, children, ref, ...props }: DataGridRootProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export interface DataGridViewportProps extends ScrollAreaProps {
|
|
22
|
-
ref?: Ref<HTMLDivElement>;
|
|
23
|
-
}
|
|
24
|
-
declare function DataGridViewport({ className, children, ref, scrollbars, type, ...props }: DataGridViewportProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
export interface DataGridHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
26
|
-
sticky?: boolean;
|
|
27
|
-
ref?: Ref<HTMLDivElement>;
|
|
28
|
-
}
|
|
29
|
-
declare function DataGridHeader({ className, children, sticky, ref, ...props }: DataGridHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
-
export interface DataGridBodyProps extends HTMLAttributes<HTMLDivElement> {
|
|
31
|
-
ref?: Ref<HTMLDivElement>;
|
|
32
|
-
}
|
|
33
|
-
declare function DataGridBody({ className, children, ref, ...props }: DataGridBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
-
export interface DataGridRowProps extends HTMLAttributes<HTMLDivElement> {
|
|
35
|
-
asChild?: boolean;
|
|
36
|
-
selected?: boolean;
|
|
37
|
-
disabled?: boolean;
|
|
38
|
-
interactive?: boolean;
|
|
39
|
-
ref?: Ref<HTMLDivElement>;
|
|
40
|
-
}
|
|
41
|
-
declare function DataGridRow({ className, children, asChild, selected, disabled, interactive, ref, onClick, onDoubleClick, onKeyDown, tabIndex, "aria-disabled": ariaDisabled, ...props }: DataGridRowProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
-
export interface DataGridCellProps extends HTMLAttributes<HTMLDivElement> {
|
|
43
|
-
align?: DataGridAlign;
|
|
44
|
-
asChild?: boolean;
|
|
45
|
-
ref?: Ref<HTMLDivElement>;
|
|
46
|
-
}
|
|
47
|
-
declare function DataGridCell({ className, children, align, asChild, ref, ...props }: DataGridCellProps): import("react/jsx-runtime").JSX.Element;
|
|
48
|
-
export interface DataGridHeaderCellProps extends HTMLAttributes<HTMLDivElement> {
|
|
49
|
-
align?: DataGridAlign;
|
|
50
|
-
asChild?: boolean;
|
|
51
|
-
ref?: Ref<HTMLDivElement>;
|
|
52
|
-
}
|
|
53
|
-
declare function DataGridHeaderCell({ className, children, align, asChild, ref, ...props }: DataGridHeaderCellProps): import("react/jsx-runtime").JSX.Element;
|
|
54
|
-
export interface DataGridEmptyProps extends HTMLAttributes<HTMLDivElement> {
|
|
55
|
-
children?: ReactNode;
|
|
56
|
-
ref?: Ref<HTMLDivElement>;
|
|
57
|
-
}
|
|
58
|
-
declare function DataGridEmpty({ className, children, ref, ...props }: DataGridEmptyProps): import("react/jsx-runtime").JSX.Element;
|
|
59
|
-
export interface DataGridLoadingProps extends HTMLAttributes<HTMLDivElement> {
|
|
60
|
-
rowCount?: number;
|
|
61
|
-
ref?: Ref<HTMLDivElement>;
|
|
62
|
-
}
|
|
63
|
-
declare function DataGridLoading({ className, rowCount, ref, ...props }: DataGridLoadingProps): import("react/jsx-runtime").JSX.Element;
|
|
64
|
-
export interface DataGridInfiniteTriggerProps extends HTMLAttributes<HTMLDivElement> {
|
|
65
|
-
loading?: boolean;
|
|
66
|
-
ref?: Ref<HTMLDivElement>;
|
|
67
|
-
}
|
|
68
|
-
declare function DataGridInfiniteTrigger({ className, children, loading, ref, ...props }: DataGridInfiniteTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { type Row, type TableOptions } from "@tanstack/react-table";
|
|
2
|
+
import type { MouseEvent, ReactNode, Ref } from "react";
|
|
3
|
+
import { type DataGridColumnSettingsOptions } from "./DataGridColumnSettings";
|
|
4
|
+
import { type DataGridValue } from "./DataGridPrimitives";
|
|
69
5
|
export interface DataGridProps<TData> extends Omit<TableOptions<TData>, "getCoreRowModel"> {
|
|
70
6
|
getCoreRowModel?: TableOptions<TData>["getCoreRowModel"];
|
|
71
7
|
className?: string;
|
|
@@ -83,10 +19,41 @@ export interface DataGridProps<TData> extends Omit<TableOptions<TData>, "getCore
|
|
|
83
19
|
isRowSelected?: (row: TData, index: number) => boolean;
|
|
84
20
|
isRowDisabled?: (row: TData, index: number) => boolean;
|
|
85
21
|
onRowClick?: (row: TData, index: number, event: MouseEvent<HTMLDivElement>) => void;
|
|
22
|
+
/**
|
|
23
|
+
* 펼쳐진 행(row.getIsExpanded() === true) 아래에 렌더할 커스텀 상세 패널.
|
|
24
|
+
* 아코디언처럼 로우를 열고 닫을 때 사용한다 — 소비자가 getExpandedRowModel과
|
|
25
|
+
* state.expanded(또는 getRowCanExpand)를 함께 설정해야 펼침 상태가 동작한다.
|
|
26
|
+
* 무엇으로 펼칠지는 소비자가 정한다 — 행 전체 클릭(onRowClick)이든 특정 컬럼의
|
|
27
|
+
* 꺾쇠 버튼(row.toggleExpanded())이든 상관없고, 펼침 가능한 행에는 aria-expanded가
|
|
28
|
+
* 자동으로 붙는다. 가상화 모드에서도 패널 높이가 함께 실측된다.
|
|
29
|
+
*/
|
|
30
|
+
renderExpandedRow?: (row: Row<TData>) => ReactNode;
|
|
86
31
|
loadingMore?: boolean;
|
|
87
32
|
loadingMoreContent?: ReactNode;
|
|
33
|
+
/** loadingMore 시 표시할 컬럼 기반 스켈레톤 행 수 (loadingMoreContent 미지정 시 사용) */
|
|
34
|
+
loadingMoreRowCount?: number;
|
|
35
|
+
/** 로딩 스켈레톤 행에 적용할 클래스 (행 높이 등 실제 행과 맞출 때 사용) */
|
|
36
|
+
skeletonRowClassName?: string;
|
|
37
|
+
/** 목록 끝에 도달했을 때 마지막 행 아래에 표시할 콘텐츠 (예: "마지막 데이터입니다") */
|
|
38
|
+
endContent?: ReactNode;
|
|
88
39
|
infiniteTriggerRef?: Ref<HTMLDivElement>;
|
|
89
40
|
infiniteTriggerClassName?: string;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
41
|
+
/**
|
|
42
|
+
* 컬럼 설정(표시/숨김 + 순서 변경) 내장 UI. true 또는 옵션 객체를 주면
|
|
43
|
+
* 헤더 호버 시 테이블 왼쪽 바깥(-36px)에 트리거 버튼이 떠서 나타나고,
|
|
44
|
+
* 변경 사항은 즉시 반영된다. portal(fixed)로 띄우므로 레이아웃에 영향이 없고
|
|
45
|
+
* overflow 조상에도 잘리지 않는다 — 좌측 요소 위에 겹쳐 보일 수 있다.
|
|
46
|
+
*/
|
|
47
|
+
columnSettings?: boolean | DataGridColumnSettingsOptions;
|
|
48
|
+
/**
|
|
49
|
+
* 행 가상화 활성화 — 보이는 창의 행만 마운트한다.
|
|
50
|
+
* SSR에서는 초기 행이 비어 있고 마운트 후 렌더된다.
|
|
51
|
+
*/
|
|
52
|
+
virtualized?: boolean;
|
|
53
|
+
/** 가상화 시 행 높이 추정값(px). 실제 높이는 렌더 후 실측로 보정된다. 기본 48 */
|
|
54
|
+
estimateRowHeight?: number;
|
|
55
|
+
/** 가상화 시 화면 밖에 미리 렌더할 행 수. 기본 6 */
|
|
56
|
+
overscan?: number;
|
|
57
|
+
}
|
|
58
|
+
declare function DataGrid<TData>({ className, loading, loadingRowCount, empty, headerSticky, viewportClassName, contentClassName, headerClassName, bodyClassName, rowClassName, rowInteractive, isRowSelected, isRowDisabled, onRowClick, renderExpandedRow, loadingMore, loadingMoreContent, loadingMoreRowCount, skeletonRowClassName, endContent, infiniteTriggerRef, infiniteTriggerClassName, columnSettings, virtualized, estimateRowHeight, overscan, ref, getCoreRowModel, ...tableOptions }: DataGridProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
export { DataGrid };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Table } from "@tanstack/react-table";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
export interface DataGridColumnSettingsOptions {
|
|
4
|
+
/** 팝오버 상단 타이틀 */
|
|
5
|
+
title?: ReactNode;
|
|
6
|
+
/** 하단 초기화 버튼 라벨 */
|
|
7
|
+
resetLabel?: ReactNode;
|
|
8
|
+
/** 설정 목록에서 제외할 컬럼 id (예: 선택 체크박스 컬럼) */
|
|
9
|
+
excludeColumnIds?: string[];
|
|
10
|
+
/** 트리거 버튼 aria-label */
|
|
11
|
+
triggerLabel?: string;
|
|
12
|
+
}
|
|
13
|
+
interface DataGridColumnSettingsProps<TData> extends DataGridColumnSettingsOptions {
|
|
14
|
+
table: Table<TData>;
|
|
15
|
+
}
|
|
16
|
+
declare function DataGridColumnSettings<TData>({ table, title, resetLabel, excludeColumnIds, triggerLabel, }: DataGridColumnSettingsProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export type { DataGridColumnSettingsProps };
|
|
18
|
+
export { DataGridColumnSettings };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { RowData } from "@tanstack/react-table";
|
|
2
|
+
import type { HTMLAttributes, ReactNode, Ref } from "react";
|
|
3
|
+
import { type ScrollAreaProps } from "@/components/ScrollArea";
|
|
4
|
+
export type DataGridAlign = "start" | "center" | "end";
|
|
5
|
+
export type DataGridValue<TData, TValue> = TValue | ((row: TData, index: number) => TValue);
|
|
6
|
+
declare module "@tanstack/react-table" {
|
|
7
|
+
interface ColumnMeta<TData extends RowData, TValue> {
|
|
8
|
+
align?: DataGridAlign;
|
|
9
|
+
headerAlign?: DataGridAlign;
|
|
10
|
+
cellAlign?: DataGridAlign;
|
|
11
|
+
className?: string;
|
|
12
|
+
headerClassName?: string;
|
|
13
|
+
cellClassName?: DataGridValue<TData, string | undefined>;
|
|
14
|
+
headerSortTrigger?: boolean;
|
|
15
|
+
/** 컬럼 설정 목록에 표시할 라벨 (header 가 문자열이 아닌 컬럼용) */
|
|
16
|
+
settingsLabel?: string;
|
|
17
|
+
/**
|
|
18
|
+
* 로딩 스켈레톤 행에서 이 컬럼 셀에 렌더할 콘텐츠.
|
|
19
|
+
* 미지정 시 기본 스켈레톤 바, null이면 비워둠.
|
|
20
|
+
*/
|
|
21
|
+
skeleton?: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export declare function resolveDataGridValue<TData, TValue>(value: DataGridValue<TData, TValue> | undefined, row: TData, index: number): TValue | undefined;
|
|
25
|
+
export interface DataGridRootProps extends HTMLAttributes<HTMLDivElement> {
|
|
26
|
+
ref?: Ref<HTMLDivElement>;
|
|
27
|
+
}
|
|
28
|
+
declare function DataGridRoot({ className, children, ref, ...props }: DataGridRootProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export interface DataGridViewportProps extends ScrollAreaProps {
|
|
30
|
+
/** 세로 스크롤바에 덧붙일 클래스 — 고정 헤더 아래에서 시작시킬 때 */
|
|
31
|
+
verticalScrollbarClassName?: string;
|
|
32
|
+
ref?: Ref<HTMLDivElement>;
|
|
33
|
+
}
|
|
34
|
+
declare function DataGridViewport({ className, children, ref, scrollbars, type, verticalScrollbarClassName, ...props }: DataGridViewportProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export interface DataGridHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
36
|
+
sticky?: boolean;
|
|
37
|
+
ref?: Ref<HTMLDivElement>;
|
|
38
|
+
}
|
|
39
|
+
declare function DataGridHeader({ className, children, sticky, ref, ...props }: DataGridHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export interface DataGridBodyProps extends HTMLAttributes<HTMLDivElement> {
|
|
41
|
+
ref?: Ref<HTMLDivElement>;
|
|
42
|
+
}
|
|
43
|
+
declare function DataGridBody({ className, children, ref, ...props }: DataGridBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export interface DataGridRowProps extends HTMLAttributes<HTMLDivElement> {
|
|
45
|
+
asChild?: boolean;
|
|
46
|
+
selected?: boolean;
|
|
47
|
+
disabled?: boolean;
|
|
48
|
+
interactive?: boolean;
|
|
49
|
+
ref?: Ref<HTMLDivElement>;
|
|
50
|
+
}
|
|
51
|
+
declare function DataGridRow({ className, children, asChild, selected, disabled, interactive, ref, onClick, onDoubleClick, onKeyDown, tabIndex, role, "aria-disabled": ariaDisabled, ...props }: DataGridRowProps): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
export interface DataGridCellProps extends HTMLAttributes<HTMLDivElement> {
|
|
53
|
+
align?: DataGridAlign;
|
|
54
|
+
asChild?: boolean;
|
|
55
|
+
ref?: Ref<HTMLDivElement>;
|
|
56
|
+
}
|
|
57
|
+
declare function DataGridCell({ className, children, align, asChild, ref, role, ...props }: DataGridCellProps): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
export interface DataGridHeaderCellProps extends HTMLAttributes<HTMLDivElement> {
|
|
59
|
+
align?: DataGridAlign;
|
|
60
|
+
asChild?: boolean;
|
|
61
|
+
ref?: Ref<HTMLDivElement>;
|
|
62
|
+
}
|
|
63
|
+
declare function DataGridHeaderCell({ className, children, align, asChild, ref, role, ...props }: DataGridHeaderCellProps): import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
export interface DataGridEmptyProps extends HTMLAttributes<HTMLDivElement> {
|
|
65
|
+
children?: ReactNode;
|
|
66
|
+
ref?: Ref<HTMLDivElement>;
|
|
67
|
+
}
|
|
68
|
+
declare function DataGridEmpty({ className, children, ref, ...props }: DataGridEmptyProps): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
export interface DataGridLoadingProps extends HTMLAttributes<HTMLDivElement> {
|
|
70
|
+
rowCount?: number;
|
|
71
|
+
ref?: Ref<HTMLDivElement>;
|
|
72
|
+
}
|
|
73
|
+
declare function DataGridLoading({ className, rowCount, ref, ...props }: DataGridLoadingProps): import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
export interface DataGridInfiniteTriggerProps extends HTMLAttributes<HTMLDivElement> {
|
|
75
|
+
loading?: boolean;
|
|
76
|
+
ref?: Ref<HTMLDivElement>;
|
|
77
|
+
}
|
|
78
|
+
declare function DataGridInfiniteTrigger({ className, children, loading, ref, ...props }: DataGridInfiniteTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
79
|
+
export { DataGridBody, DataGridCell, DataGridEmpty, DataGridHeader, DataGridHeaderCell, DataGridInfiniteTrigger, DataGridLoading, DataGridRoot, DataGridRow, DataGridViewport, };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type Row } from "@tanstack/react-table";
|
|
2
|
+
import { type VirtualItem } from "@tanstack/react-virtual";
|
|
3
|
+
import type { MouseEvent, ReactNode, Ref, RefObject } from "react";
|
|
4
|
+
export interface DataGridDataRowProps<TData> {
|
|
5
|
+
row: Row<TData>;
|
|
6
|
+
virtualIndex?: number;
|
|
7
|
+
virtualStart?: number;
|
|
8
|
+
measureRef?: Ref<HTMLDivElement>;
|
|
9
|
+
interactive?: boolean;
|
|
10
|
+
selected?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
onRowClick?: (row: TData, index: number, event: MouseEvent<HTMLDivElement>) => void;
|
|
14
|
+
/** row.getIsExpanded() 시 행 아래에 렌더할 커스텀 상세 패널 */
|
|
15
|
+
expandedContent?: ReactNode;
|
|
16
|
+
/** 펼칠 수 있는 행인지 — aria-expanded 노출 여부를 정한다 */
|
|
17
|
+
expandable?: boolean;
|
|
18
|
+
/** 비활성/펼침 가능 여부를 반영해 부모에서 계산한 포커스 가능 상태 */
|
|
19
|
+
focusable?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* 이 행의 React Table 상태(선택/펼침). 셀은 row.getIsSelected() 같은 메서드로
|
|
22
|
+
* 상태를 직접 읽는데, 그 값이 바뀌어도 row 객체 자체는 그대로라 memo가 렌더를
|
|
23
|
+
* 건너뛴다 — 상태를 프롭으로 올려야 체크박스 같은 셀이 다시 그려진다.
|
|
24
|
+
*/
|
|
25
|
+
rowSelected?: boolean;
|
|
26
|
+
rowExpanded?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* 셀 렌더러가 담긴 컬럼 정의 — 렌더에는 쓰지 않고 memo 비교에만 쓴다.
|
|
29
|
+
* 셀이 외부 상태를 클로저로 읽는 경우(검토 상태 등) 소비자는 컬럼을 그 상태
|
|
30
|
+
* 의존 useMemo로 만든다. 그 identity 변화가 "셀 출력이 바뀔 수 있다"는
|
|
31
|
+
* 신호인데, row 객체는 그대로라 이 프롭 없이는 memo가 렌더를 건너뛴다.
|
|
32
|
+
*/
|
|
33
|
+
columns?: unknown;
|
|
34
|
+
/** 셀의 ARIA 롤 — 펼침을 쓰는 그리드(treegrid)에서는 gridcell이어야 한다 */
|
|
35
|
+
cellRole?: "cell" | "gridcell";
|
|
36
|
+
/** 로빙 tabindex의 탭 스톱 여부 — 그리드 전체에서 한 행만 true (미지정 시 탭 스톱) */
|
|
37
|
+
tabStop?: boolean;
|
|
38
|
+
/** 위/아래 화살표로 행 사이 포커스를 옮길 때 호출 */
|
|
39
|
+
onNavigate?: (rowId: string, delta: -1 | 1) => void;
|
|
40
|
+
/** 행(또는 그 안의 요소)이 포커스를 받아 탭 스톱을 옮겨야 할 때 호출 */
|
|
41
|
+
onFocusRow?: (rowId: string) => void;
|
|
42
|
+
}
|
|
43
|
+
declare function DataGridDataRowBase<TData>({ row, virtualIndex, virtualStart, measureRef, interactive, selected, disabled, className, onRowClick, expandedContent, expandable, focusable, rowSelected, rowExpanded, cellRole, tabStop, onNavigate, onFocusRow, }: DataGridDataRowProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export declare const DataGridDataRow: typeof DataGridDataRowBase;
|
|
45
|
+
export interface DataGridVirtualizedRowsProps<TData> {
|
|
46
|
+
rows: Row<TData>[];
|
|
47
|
+
viewportRef: RefObject<HTMLDivElement | null>;
|
|
48
|
+
estimateRowHeight?: number;
|
|
49
|
+
overscan?: number;
|
|
50
|
+
/** 로빙 tabindex의 현재 포커스 행 id */
|
|
51
|
+
activeRowId?: string | null;
|
|
52
|
+
focusableRowIds: Set<string>;
|
|
53
|
+
pendingFocusRowId?: string | null;
|
|
54
|
+
focusRowElement: (rowId: string) => boolean;
|
|
55
|
+
onFocusSettled: () => void;
|
|
56
|
+
scrollToRowRef: RefObject<((index: number) => void) | null>;
|
|
57
|
+
renderRow: (row: Row<TData>, virtualItem: VirtualItem, measureRef: Ref<HTMLDivElement>, tabStop: boolean) => ReactNode;
|
|
58
|
+
}
|
|
59
|
+
export declare function DataGridVirtualizedRows<TData>({ rows, viewportRef, estimateRowHeight, overscan, activeRowId, focusableRowIds, pendingFocusRowId, focusRowElement, onFocusSettled, scrollToRowRef, renderRow, }: DataGridVirtualizedRowsProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
60
|
+
export {};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export type { CellContext, ColumnDef, ColumnFiltersState, ColumnOrderState, ColumnPinningState, ColumnSizingState, ExpandedState, GroupingState, PaginationState, Row, RowSelectionState, SortingState, Table as ReactTableInstance, TableOptions, VisibilityState, } from "@tanstack/react-table";
|
|
2
2
|
export { getCoreRowModel, getExpandedRowModel, getFacetedMinMaxValues, getFacetedRowModel, getFacetedUniqueValues, getFilteredRowModel, getGroupedRowModel, getPaginationRowModel, getSortedRowModel, } from "@tanstack/react-table";
|
|
3
|
-
export type {
|
|
4
|
-
export { DataGrid
|
|
3
|
+
export type { DataGridProps } from "./DataGrid";
|
|
4
|
+
export { DataGrid } from "./DataGrid";
|
|
5
|
+
export type { DataGridColumnSettingsOptions } from "./DataGridColumnSettings";
|
|
6
|
+
export { DataGridColumnSettings } from "./DataGridColumnSettings";
|
|
7
|
+
export type { DataGridAlign, DataGridBodyProps, DataGridCellProps, DataGridEmptyProps, DataGridHeaderCellProps, DataGridHeaderProps, DataGridInfiniteTriggerProps, DataGridLoadingProps, DataGridRootProps, DataGridRowProps, DataGridViewportProps, } from "./DataGridPrimitives";
|
|
8
|
+
export { DataGridBody, DataGridCell, DataGridEmpty, DataGridHeader, DataGridHeaderCell, DataGridInfiniteTrigger, DataGridLoading, DataGridRoot, DataGridRow, DataGridViewport, } from "./DataGridPrimitives";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
1
|
+
import { type AriaAttributes, type ReactNode } from "react";
|
|
2
2
|
export interface DateRange {
|
|
3
3
|
start: Date;
|
|
4
4
|
end: Date;
|
|
@@ -15,30 +15,20 @@ export interface TimeInput {
|
|
|
15
15
|
m?: number;
|
|
16
16
|
s?: number;
|
|
17
17
|
}
|
|
18
|
-
/**
|
|
19
|
-
* 종료 시각 커밋 방식 (범위 계열에서만 의미)
|
|
20
|
-
* - exact: 표시된 시각 그대로 커밋 (기본)
|
|
21
|
-
* - inclusive: 종료 단위 끝까지 포함 (예: 23:59 → 23:59:59.999) — `t <= end` 조회용
|
|
22
|
-
* - exclusive: 다음 경계를 커밋해 끝 미포함 (예: 23:59 → 다음날 00:00:00.000) — `t < end` 반개구간 조회용
|
|
23
|
-
*/
|
|
24
|
-
export type EndBoundary = "exact" | "inclusive" | "exclusive";
|
|
25
18
|
interface DatePickerBaseProps {
|
|
26
19
|
/** 시간 입력 정밀도 — 정밀도 밖 단위는 비활성(00)으로 표시되고 0으로 커밋됨 (기본: "second") */
|
|
27
20
|
timePrecision?: TimePrecision;
|
|
28
|
-
/**
|
|
29
|
-
* 종료 시각 커밋 방식 (기본: "exact").
|
|
30
|
-
* date="range" time="single"(공통 시각)에는 적용되지 않음 — 24h 배수 의미 보존
|
|
31
|
-
*/
|
|
32
|
-
endBoundary?: EndBoundary;
|
|
33
21
|
/** 표시할 월 개수 (기본: date="range"는 2, 그 외 1) */
|
|
34
22
|
numberOfMonths?: 1 | 2;
|
|
35
23
|
/** 인풋 크기 */
|
|
36
24
|
size?: "sm" | "md";
|
|
37
25
|
placeholder?: string;
|
|
38
|
-
label?: string;
|
|
39
|
-
helperText?: string;
|
|
40
26
|
error?: boolean;
|
|
41
27
|
disabled?: boolean;
|
|
28
|
+
/** Field(FieldControl)가 주입하는 id — FieldLabel(htmlFor) 연결용 */
|
|
29
|
+
id?: string;
|
|
30
|
+
"aria-describedby"?: string;
|
|
31
|
+
"aria-invalid"?: AriaAttributes["aria-invalid"];
|
|
42
32
|
/** 점 표시할 일자 목록 (예: 데이터가 있는 날) */
|
|
43
33
|
markedDates?: Date[];
|
|
44
34
|
minDate?: Date;
|
|
@@ -59,6 +49,11 @@ interface DatePickerBaseProps {
|
|
|
59
49
|
formatMonthTitle?: (month: Date) => string;
|
|
60
50
|
/** 팝오버가 처음 열릴 때 표시할 월 (값이 없을 때) */
|
|
61
51
|
defaultMonth?: Date;
|
|
52
|
+
/**
|
|
53
|
+
* 달력에 보이는 달들이 바뀔 때 — 열기·이동 모두. numberOfMonths만큼 담겨
|
|
54
|
+
* 온다. 보이는 달의 데이터(markedDates 등)를 필요할 때 받아오는 용도.
|
|
55
|
+
*/
|
|
56
|
+
onViewMonthsChange?: (months: Date[]) => void;
|
|
62
57
|
className?: string;
|
|
63
58
|
}
|
|
64
59
|
/**
|
|
@@ -77,7 +72,7 @@ export interface SingleDatePickerProps extends DatePickerBaseProps {
|
|
|
77
72
|
date?: "single";
|
|
78
73
|
time?: "none" | "single";
|
|
79
74
|
value?: Date | null;
|
|
80
|
-
/** value가 없을 때
|
|
75
|
+
/** value가 없을 때 패널 기본 선택값 — 초기화 버튼도 이 값으로 되돌린다 (적용 전까지 onChange 미호출) */
|
|
81
76
|
defaultValue?: Date | null;
|
|
82
77
|
onChange?: (value: Date | null) => void;
|
|
83
78
|
/** 커스텀 프리셋 버튼 (예: 오늘, 어제) */
|
|
@@ -90,7 +85,7 @@ export interface TimeRangeDatePickerProps extends DatePickerBaseProps {
|
|
|
90
85
|
date?: "single";
|
|
91
86
|
time: "range";
|
|
92
87
|
value?: DateRange | null;
|
|
93
|
-
/** value가 없을 때
|
|
88
|
+
/** value가 없을 때 패널 기본 선택값 — 초기화 버튼도 이 값으로 되돌린다 */
|
|
94
89
|
defaultValue?: DateRange | null;
|
|
95
90
|
onChange?: (value: DateRange | null) => void;
|
|
96
91
|
/** 커스텀 프리셋 버튼 (예: 오전, 오후) */
|
|
@@ -106,7 +101,7 @@ export interface DateRangeDatePickerProps extends DatePickerBaseProps {
|
|
|
106
101
|
date: "range";
|
|
107
102
|
time?: "none" | "single" | "range";
|
|
108
103
|
value?: DateRange | null;
|
|
109
|
-
/** value가 없을 때
|
|
104
|
+
/** value가 없을 때 패널 기본 선택값 — 초기화 버튼도 이 값으로 되돌린다 */
|
|
110
105
|
defaultValue?: DateRange | null;
|
|
111
106
|
onChange?: (value: DateRange | null) => void;
|
|
112
107
|
/** 커스텀 프리셋 버튼 (예: 이번주, 지난 7일) */
|
|
@@ -14,6 +14,7 @@ export declare function addMonths(date: Date, amount: number): Date;
|
|
|
14
14
|
/**
|
|
15
15
|
* 월 그리드 생성 — 일요일 시작 주 단위 2차원 배열.
|
|
16
16
|
* 인접 월 자리는 null (디자인상 빈 칸으로 렌더링).
|
|
17
|
+
* 월마다 5~6주로 달라지면 패널 높이가 튀므로 항상 6주(42칸)로 패딩한다.
|
|
17
18
|
*/
|
|
18
19
|
export declare function getMonthWeeks(month: Date): (Date | null)[][];
|
|
19
20
|
/** date의 일자에 시각(시/분/초)을 결합 */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type { CalendarProps } from "./Calendar";
|
|
2
2
|
export { Calendar } from "./Calendar";
|
|
3
|
-
export type { DatePickerPreset, DatePickerProps, DateRange, DateRangeDatePickerProps,
|
|
3
|
+
export type { DatePickerPreset, DatePickerProps, DateRange, DateRangeDatePickerProps, SingleDatePickerProps, TimeInput, TimePrecision, TimeRangeDatePickerProps, } from "./DatePicker";
|
|
4
4
|
export { DatePicker } from "./DatePicker";
|
|
@@ -5,7 +5,12 @@ interface DraggableScrollProps {
|
|
|
5
5
|
/** children이 바뀔 때 가로 스크롤을 끝으로 이동합니다. */
|
|
6
6
|
autoScrollToEnd?: boolean;
|
|
7
7
|
smoothScroll?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* 좌우에 가려진 내용이 있으면 그 방향 가장자리를 그라데이션으로 페이드합니다.
|
|
10
|
+
* CSS 스크롤 타임라인 기반이라 미지원 브라우저에서는 페이드 없이 동작합니다.
|
|
11
|
+
*/
|
|
12
|
+
edgeFade?: boolean;
|
|
8
13
|
}
|
|
9
|
-
declare function DraggableScroll({ children, className, autoScrollToEnd, smoothScroll, }: DraggableScrollProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function DraggableScroll({ children, className, autoScrollToEnd, smoothScroll, edgeFade, }: DraggableScrollProps): import("react/jsx-runtime").JSX.Element;
|
|
10
15
|
export type { DraggableScrollProps };
|
|
11
16
|
export { DraggableScroll };
|
|
@@ -269,7 +269,7 @@ export declare const ListPlayIcon: ({ size, color, className, ...props }: IconPr
|
|
|
269
269
|
export declare const EnglishIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
270
270
|
export declare const KoreanIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
271
271
|
export declare const SpecificAreaIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
272
|
-
export declare const
|
|
272
|
+
export declare const ArrowElbowDownRightIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
273
273
|
export declare const HourglassIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
274
274
|
export declare const ThumbsUpIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
275
275
|
export declare const ThumbsDownIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -284,4 +284,6 @@ export declare const AiViewIcon: ({ size, color, className, ...props }: IconProp
|
|
|
284
284
|
export declare const HeadphonesIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
285
285
|
export declare const LinkedInIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
286
286
|
export declare const PhoneIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
287
|
+
export declare const ListIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
288
|
+
export declare const MinusCircleFilledIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
287
289
|
export {};
|
|
@@ -7,10 +7,6 @@ declare const inputContainerVariants: (props?: ({
|
|
|
7
7
|
export type InputLayout = "inline" | "block" | "wrap";
|
|
8
8
|
export type InputState = "default" | "focused" | "error" | "disabled" | "filled";
|
|
9
9
|
export interface InputBaseProps {
|
|
10
|
-
id?: string;
|
|
11
|
-
label?: string;
|
|
12
|
-
/** 인풋 하단 도움말 텍스트. error=true 이면 danger 색상으로 표시 */
|
|
13
|
-
helperText?: string;
|
|
14
10
|
error?: boolean;
|
|
15
11
|
disabled?: boolean;
|
|
16
12
|
focused?: boolean;
|
|
@@ -22,10 +18,12 @@ export interface InputBaseProps {
|
|
|
22
18
|
/** 인풋 컨테이너 오른쪽 슬롯 */
|
|
23
19
|
endContent?: ReactNode;
|
|
24
20
|
/** 인풋 컨테이너(border 박스)에 추가할 className */
|
|
25
|
-
containerClassName?: string;
|
|
26
|
-
/** 최외곽 래퍼 div 에 추가할 className */
|
|
27
21
|
className?: string;
|
|
28
22
|
children: ReactNode;
|
|
29
23
|
}
|
|
30
|
-
|
|
24
|
+
/**
|
|
25
|
+
* 인풋 컨테이너(border 박스) 프리미티브. 라벨/설명/에러는
|
|
26
|
+
* Field(FieldLabel/FieldDescription/FieldError) 합성으로 조합한다.
|
|
27
|
+
*/
|
|
28
|
+
declare function InputBase({ error, disabled, focused, filled, size, layout, startContent, endContent, className, children, }: InputBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
31
29
|
export { InputBase, inputContainerVariants };
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import { type ReactNode, type Ref } from "react";
|
|
2
2
|
import { type ButtonProps } from "@/components/Button";
|
|
3
|
+
import type { IconButtonProps } from "@/components/IconButton";
|
|
3
4
|
type ModalOpenAutoFocusHandler = (event: Event) => void;
|
|
4
5
|
export type ModalSize = "sm" | "md" | "lg" | "xl" | "full";
|
|
6
|
+
export interface ModalHeadingButtonProps extends Omit<IconButtonProps, "asChild" | "children" | "className" | "ref" | "shape" | "size"> {
|
|
7
|
+
"aria-label": string;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}
|
|
5
10
|
export interface ModalButtonProps extends Omit<ButtonProps, "asChild" | "children" | "className" | "color" | "ref" | "size" | "style" | "variant"> {
|
|
6
11
|
children: ReactNode;
|
|
7
12
|
}
|
|
8
13
|
export interface ModalSurfaceProps {
|
|
9
14
|
title: ReactNode;
|
|
10
15
|
description?: ReactNode;
|
|
16
|
+
headingButton?: ModalHeadingButtonProps;
|
|
11
17
|
children?: ReactNode;
|
|
12
18
|
tertiaryButton?: ModalButtonProps;
|
|
13
19
|
secondaryButton?: ModalButtonProps;
|
|
@@ -17,13 +23,14 @@ export interface ModalSurfaceProps {
|
|
|
17
23
|
closeAriaLabel?: string;
|
|
18
24
|
ref?: Ref<HTMLDivElement>;
|
|
19
25
|
}
|
|
20
|
-
declare function ModalSurface({ title, description, children, tertiaryButton, secondaryButton, primaryButton, size, onClose, closeAriaLabel, ref, }: ModalSurfaceProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
declare function ModalSurface({ title, description, headingButton, children, tertiaryButton, secondaryButton, primaryButton, size, onClose, closeAriaLabel, ref, }: ModalSurfaceProps): import("react/jsx-runtime").JSX.Element;
|
|
21
27
|
export interface ModalProps {
|
|
22
28
|
open?: boolean;
|
|
23
29
|
defaultOpen?: boolean;
|
|
24
30
|
onOpenChange?: (open: boolean) => void;
|
|
25
31
|
title: ReactNode;
|
|
26
32
|
description?: ReactNode;
|
|
33
|
+
headingButton?: ModalHeadingButtonProps;
|
|
27
34
|
children?: ReactNode;
|
|
28
35
|
tertiaryButton?: ModalButtonProps;
|
|
29
36
|
secondaryButton?: ModalButtonProps;
|
|
@@ -33,5 +40,5 @@ export interface ModalProps {
|
|
|
33
40
|
onOpenAutoFocus?: ModalOpenAutoFocusHandler;
|
|
34
41
|
closeAriaLabel?: string;
|
|
35
42
|
}
|
|
36
|
-
declare function Modal({ open, defaultOpen, onOpenChange, title, description, children, tertiaryButton, secondaryButton, primaryButton, size, closeOnInteractOutside, onOpenAutoFocus, closeAriaLabel, }: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
declare function Modal({ open, defaultOpen, onOpenChange, title, description, headingButton, children, tertiaryButton, secondaryButton, primaryButton, size, closeOnInteractOutside, onOpenAutoFocus, closeAriaLabel, }: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
37
44
|
export { Modal, ModalSurface };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { ModalButtonProps, ModalProps, ModalSize, ModalSurfaceProps } from "./Modal";
|
|
1
|
+
export type { ModalButtonProps, ModalHeadingButtonProps, ModalProps, ModalSize, ModalSurfaceProps, } from "./Modal";
|
|
2
2
|
export { Modal, ModalSurface } from "./Modal";
|
|
@@ -2,13 +2,17 @@ import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
|
2
2
|
import type { ComponentProps, Ref, UIEventHandler } from "react";
|
|
3
3
|
type ScrollAreaScrollbars = "both" | "horizontal" | "vertical";
|
|
4
4
|
type ScrollAreaProps = ComponentProps<typeof ScrollAreaPrimitive.Root> & {
|
|
5
|
+
/** 세로 가장자리 페이드 — 가려진 방향만 40px, 넘치지 않으면 없음. 세로 전용 */
|
|
6
|
+
edgeFade?: boolean;
|
|
5
7
|
onViewportScroll?: UIEventHandler<HTMLDivElement>;
|
|
6
8
|
scrollbars?: ScrollAreaScrollbars;
|
|
9
|
+
/** 세로 스크롤바에 덧붙일 클래스 — 고정 헤더 아래에서 시작시킬 때 쓴다 */
|
|
10
|
+
verticalScrollbarClassName?: string;
|
|
7
11
|
viewportClassName?: string;
|
|
8
12
|
viewportRef?: Ref<HTMLDivElement>;
|
|
9
13
|
};
|
|
10
14
|
type ScrollBarProps = ComponentProps<typeof ScrollAreaPrimitive.Scrollbar>;
|
|
11
|
-
declare function ScrollArea({ className, children, onViewportScroll, ref, scrollbars, type, viewportClassName, viewportRef, ...props }: ScrollAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function ScrollArea({ className, children, edgeFade, onViewportScroll, ref, scrollbars, type, verticalScrollbarClassName, viewportClassName, viewportRef, ...props }: ScrollAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
12
16
|
declare function ScrollBar({ className, orientation, ref, ...props }: ScrollBarProps): import("react/jsx-runtime").JSX.Element;
|
|
13
17
|
export type { ScrollAreaProps, ScrollAreaScrollbars, ScrollBarProps };
|
|
14
18
|
export { ScrollArea, ScrollBar };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type AriaAttributes } from "react";
|
|
1
2
|
export interface SelectBoxOption {
|
|
2
3
|
value: string;
|
|
3
4
|
label: string;
|
|
@@ -26,11 +27,13 @@ export interface SelectBoxProps {
|
|
|
26
27
|
* @example renderValue={(option, group) => `${group.title} / ${option.label}`}
|
|
27
28
|
*/
|
|
28
29
|
renderValue?: (option: SelectBoxOption, group: SelectBoxGroup) => string;
|
|
29
|
-
/**
|
|
30
|
+
/** 트리거 버튼에 추가할 className */
|
|
30
31
|
className?: string;
|
|
31
|
-
label?: string;
|
|
32
|
-
helperText?: string;
|
|
33
32
|
error?: boolean;
|
|
33
|
+
/** Field(FieldControl)가 주입하는 id — FieldLabel(htmlFor) 연결용 */
|
|
34
|
+
id?: string;
|
|
35
|
+
"aria-describedby"?: string;
|
|
36
|
+
"aria-invalid"?: AriaAttributes["aria-invalid"];
|
|
34
37
|
}
|
|
35
|
-
declare function SelectBox({ groups, value, placeholder, disabled, size, onChange, renderValue, className,
|
|
38
|
+
declare function SelectBox({ groups, value, placeholder, disabled, size, onChange, renderValue, className, error, id, "aria-describedby": ariaDescribedby, "aria-invalid": ariaInvalid, }: SelectBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
36
39
|
export { SelectBox };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode, Ref } from "react";
|
|
2
|
+
export interface SelectButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "value"> {
|
|
3
|
+
/** 표시할 선택 값. 없으면 placeholder를 tertiary 색으로 표시 */
|
|
4
|
+
value?: ReactNode;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
size?: "sm" | "md";
|
|
7
|
+
error?: boolean;
|
|
8
|
+
/** 연결된 팝업(모달·드롭다운 등) 열림 상태 — 포커스 링과 chevron 회전에 반영 */
|
|
9
|
+
open?: boolean;
|
|
10
|
+
ref?: Ref<HTMLButtonElement>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 셀렉트 트리거와 동일한 외형의 버튼.
|
|
14
|
+
* 드롭다운 대신 모달 등 커스텀 팝업을 여는 "선택" 진입점에 사용한다.
|
|
15
|
+
* SelectBox의 트리거도 이 컴포넌트를 사용한다.
|
|
16
|
+
*/
|
|
17
|
+
declare function SelectButton({ value, placeholder, size, error, open, disabled, className, ref, onFocus, onBlur, type, "aria-expanded": ariaExpanded, children, ...props }: SelectButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export { SelectButton };
|
|
@@ -4,6 +4,6 @@ import type { ShapeEditorProps } from "./_model/props";
|
|
|
4
4
|
* 그리기·히트테스트·뷰포트는 `EditorRenderer`(Konva/Pixi)에 위임한다. `backend`로 교체.
|
|
5
5
|
* 갭(회전/꼭짓점추가 등)은 여기서 한 번 구현하면 양쪽 렌더러에 적용된다.
|
|
6
6
|
*/
|
|
7
|
-
export default function ShapeEditor<TMeta, TMarkerMeta = unknown>({
|
|
7
|
+
export default function ShapeEditor<TMeta, TMarkerMeta = unknown>({ document: editorDocument, clipboardScope, renderImageState, dimmed, selectedIds: controlledSelectedIds, activeTool, draftStyle, draftMeta, readOnly, disableMarquee, locked, onLockedInteraction, onDrawAttemptWithoutDraft, onIdleEscape, overrideShapeInteraction, defaultViewSettings, viewSettings, onViewSettingsChange, showMinimap, minimapPosition, showViewSettings, getContextMenuItems, strings, viewSettingItems, canMergeSelection, brushSize, zoomBound, zoomAnimationDuration, decorationShapes, regionMask, guideMask, maskPalette, overlayMarkers, renderOverlayMarker, onOverlayMarkerClick, renderImageOverlay, getSelectionLabel, hideSelectionLabelDot, formatSelectionInfo, externalTools, assistant, keymap, handleRef, backend, onActiveToolChange, onSelectionChange, onEditingChange, onShapesCreated, onShapesUpdated, onShapesDeleted, onDrawSessionChange, onDraftShapeChange, onViewportChange, onShapesTransformPreview, }: ShapeEditorProps<TMeta, TMarkerMeta> & {
|
|
8
8
|
backend?: "konva" | "pixi";
|
|
9
9
|
}): import("react/jsx-runtime").JSX.Element;
|