@aivex/ui 1.2.0-dev.42 → 1.2.0-dev.43
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/components/DataGrid/DataGrid.d.ts +8 -3
- package/dist/components/DataGrid/DataGridPrimitives.d.ts +10 -2
- package/dist/components/DataGrid/index.d.ts +1 -1
- package/dist/components/Table/Table.d.ts +10 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1051 -1048
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { type Row, type TableOptions } from "@tanstack/react-table";
|
|
2
2
|
import type { MouseEvent, ReactNode, Ref } from "react";
|
|
3
3
|
import { type DataGridColumnSettingsOptions } from "./DataGridColumnSettings";
|
|
4
|
-
import { type DataGridValue } from "./DataGridPrimitives";
|
|
4
|
+
import { type DataGridValue, type DataGridVariant } from "./DataGridPrimitives";
|
|
5
5
|
export interface DataGridProps<TData> extends Omit<TableOptions<TData>, "getCoreRowModel"> {
|
|
6
6
|
getCoreRowModel?: TableOptions<TData>["getCoreRowModel"];
|
|
7
7
|
className?: string;
|
|
8
8
|
ref?: Ref<HTMLDivElement>;
|
|
9
|
+
/**
|
|
10
|
+
* 밀도 (Figma Table Variants : Type). 기본 basic.
|
|
11
|
+
* compact는 헤더 32px·행 36px에 헤더 박스·행 구분선이 없다.
|
|
12
|
+
*/
|
|
13
|
+
variant?: DataGridVariant;
|
|
9
14
|
loading?: boolean;
|
|
10
15
|
loadingRowCount?: number;
|
|
11
16
|
empty?: ReactNode;
|
|
@@ -50,10 +55,10 @@ export interface DataGridProps<TData> extends Omit<TableOptions<TData>, "getCore
|
|
|
50
55
|
* SSR에서는 초기 행이 비어 있고 마운트 후 렌더된다.
|
|
51
56
|
*/
|
|
52
57
|
virtualized?: boolean;
|
|
53
|
-
/** 가상화 시 행 높이 추정값(px). 실제 높이는 렌더 후 실측로 보정된다. 기본 48 */
|
|
58
|
+
/** 가상화 시 행 높이 추정값(px). 실제 높이는 렌더 후 실측로 보정된다. 기본 basic 48 / compact 36 */
|
|
54
59
|
estimateRowHeight?: number;
|
|
55
60
|
/** 가상화 시 화면 밖에 미리 렌더할 행 수. 기본 6 */
|
|
56
61
|
overscan?: number;
|
|
57
62
|
}
|
|
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;
|
|
63
|
+
declare function DataGrid<TData>({ className, variant, 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
64
|
export { DataGrid };
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import type { RowData } from "@tanstack/react-table";
|
|
2
|
-
import type
|
|
2
|
+
import { type HTMLAttributes, type ReactNode, type Ref } from "react";
|
|
3
3
|
import { type ScrollAreaProps } from "@/components/ScrollArea";
|
|
4
4
|
export type DataGridAlign = "start" | "center" | "end";
|
|
5
|
+
/**
|
|
6
|
+
* 그리드 밀도 (Figma Table Variants : Type).
|
|
7
|
+
* - basic: 헤더 48px(배경·테두리 박스) + 행 48px + 행 구분선
|
|
8
|
+
* - compact: 헤더 32px(박스 없음) + 행 36px, 구분선·바깥 인셋 없음 — 대시보드 카드 등 좁은 영역용
|
|
9
|
+
*/
|
|
10
|
+
export type DataGridVariant = "basic" | "compact";
|
|
5
11
|
export type DataGridValue<TData, TValue> = TValue | ((row: TData, index: number) => TValue);
|
|
6
12
|
declare module "@tanstack/react-table" {
|
|
7
13
|
interface ColumnMeta<TData extends RowData, TValue> {
|
|
@@ -23,9 +29,11 @@ declare module "@tanstack/react-table" {
|
|
|
23
29
|
}
|
|
24
30
|
export declare function resolveDataGridValue<TData, TValue>(value: DataGridValue<TData, TValue> | undefined, row: TData, index: number): TValue | undefined;
|
|
25
31
|
export interface DataGridRootProps extends HTMLAttributes<HTMLDivElement> {
|
|
32
|
+
/** 하위 헤더·행·셀에 전달되는 밀도. 기본 basic */
|
|
33
|
+
variant?: DataGridVariant;
|
|
26
34
|
ref?: Ref<HTMLDivElement>;
|
|
27
35
|
}
|
|
28
|
-
declare function DataGridRoot({ className, children, ref, ...props }: DataGridRootProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
declare function DataGridRoot({ className, children, variant, ref, ...props }: DataGridRootProps): import("react/jsx-runtime").JSX.Element;
|
|
29
37
|
export interface DataGridViewportProps extends ScrollAreaProps {
|
|
30
38
|
/** 세로 스크롤바에 덧붙일 클래스 — 고정 헤더 아래에서 시작시킬 때 */
|
|
31
39
|
verticalScrollbarClassName?: string;
|
|
@@ -4,5 +4,5 @@ export type { DataGridProps } from "./DataGrid";
|
|
|
4
4
|
export { DataGrid } from "./DataGrid";
|
|
5
5
|
export type { DataGridColumnSettingsOptions } from "./DataGridColumnSettings";
|
|
6
6
|
export { DataGridColumnSettings } from "./DataGridColumnSettings";
|
|
7
|
-
export type { DataGridAlign, DataGridBodyProps, DataGridCellProps, DataGridEmptyProps, DataGridHeaderCellProps, DataGridHeaderProps, DataGridInfiniteTriggerProps, DataGridLoadingProps, DataGridRootProps, DataGridRowProps, DataGridViewportProps, } from "./DataGridPrimitives";
|
|
7
|
+
export type { DataGridAlign, DataGridBodyProps, DataGridCellProps, DataGridEmptyProps, DataGridHeaderCellProps, DataGridHeaderProps, DataGridInfiniteTriggerProps, DataGridLoadingProps, DataGridRootProps, DataGridRowProps, DataGridVariant, DataGridViewportProps, } from "./DataGridPrimitives";
|
|
8
8
|
export { DataGridBody, DataGridCell, DataGridEmpty, DataGridHeader, DataGridHeaderCell, DataGridInfiniteTrigger, DataGridLoading, DataGridRoot, DataGridRow, DataGridViewport, } from "./DataGridPrimitives";
|
|
@@ -5,22 +5,27 @@ export interface TableProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
5
5
|
tableClassName?: string;
|
|
6
6
|
ref?: Ref<HTMLDivElement>;
|
|
7
7
|
}
|
|
8
|
+
/** @deprecated Table은 제거 예정입니다. `DataGrid`(또는 DataGrid 프리미티브)를 사용하세요. */
|
|
8
9
|
declare function Table({ className, tableClassName, size, children, ref, ...props }: TableProps): import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export interface TableHeaderProps extends HTMLAttributes<HTMLTableSectionElement> {
|
|
10
11
|
ref?: Ref<HTMLTableSectionElement>;
|
|
11
12
|
}
|
|
13
|
+
/** @deprecated Table은 제거 예정입니다. `DataGrid`(또는 DataGrid 프리미티브)를 사용하세요. */
|
|
12
14
|
declare function TableHeader({ className, children, ref, ...props }: TableHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
13
15
|
export interface TableFooterProps extends HTMLAttributes<HTMLTableSectionElement> {
|
|
14
16
|
ref?: Ref<HTMLTableSectionElement>;
|
|
15
17
|
}
|
|
18
|
+
/** @deprecated Table은 제거 예정입니다. `DataGrid`(또는 DataGrid 프리미티브)를 사용하세요. */
|
|
16
19
|
declare function TableFooter({ className, children, ref, ...props }: TableFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
17
20
|
export interface TableCaptionProps extends HTMLAttributes<HTMLTableCaptionElement> {
|
|
18
21
|
ref?: Ref<HTMLTableCaptionElement>;
|
|
19
22
|
}
|
|
23
|
+
/** @deprecated Table은 제거 예정입니다. `DataGrid`(또는 DataGrid 프리미티브)를 사용하세요. */
|
|
20
24
|
declare function TableCaption({ className, children, ref, ...props }: TableCaptionProps): import("react/jsx-runtime").JSX.Element;
|
|
21
25
|
export interface TableBodyProps extends HTMLAttributes<HTMLTableSectionElement> {
|
|
22
26
|
ref?: Ref<HTMLTableSectionElement>;
|
|
23
27
|
}
|
|
28
|
+
/** @deprecated Table은 제거 예정입니다. `DataGrid`(또는 DataGrid 프리미티브)를 사용하세요. */
|
|
24
29
|
declare function TableBody({ className, children, ref, ...props }: TableBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
25
30
|
export interface TableRowProps extends HTMLAttributes<HTMLTableRowElement> {
|
|
26
31
|
size?: TableSize;
|
|
@@ -30,6 +35,7 @@ export interface TableRowProps extends HTMLAttributes<HTMLTableRowElement> {
|
|
|
30
35
|
asChild?: boolean;
|
|
31
36
|
ref?: Ref<HTMLTableRowElement>;
|
|
32
37
|
}
|
|
38
|
+
/** @deprecated Table은 제거 예정입니다. `DataGrid`(또는 DataGrid 프리미티브)를 사용하세요. */
|
|
33
39
|
declare function TableRow({ className, children, size, selected, disabled, interactive, asChild, ref, onClick, onDoubleClick, onKeyDown, tabIndex, "aria-disabled": ariaDisabled, ...props }: TableRowProps): import("react/jsx-runtime").JSX.Element;
|
|
34
40
|
export interface TableHeadProps extends ThHTMLAttributes<HTMLTableCellElement> {
|
|
35
41
|
size?: TableSize;
|
|
@@ -39,23 +45,27 @@ export interface TableHeadProps extends ThHTMLAttributes<HTMLTableCellElement> {
|
|
|
39
45
|
asChild?: boolean;
|
|
40
46
|
ref?: Ref<HTMLTableCellElement>;
|
|
41
47
|
}
|
|
48
|
+
/** @deprecated Table은 제거 예정입니다. `DataGrid`(또는 DataGrid 프리미티브)를 사용하세요. */
|
|
42
49
|
declare function TableHead({ className, children, size, sortable, sortDirection, onSort, asChild, ref, ...props }: TableHeadProps): import("react/jsx-runtime").JSX.Element;
|
|
43
50
|
export interface TableCellProps extends TdHTMLAttributes<HTMLTableCellElement> {
|
|
44
51
|
size?: TableSize;
|
|
45
52
|
asChild?: boolean;
|
|
46
53
|
ref?: Ref<HTMLTableCellElement>;
|
|
47
54
|
}
|
|
55
|
+
/** @deprecated Table은 제거 예정입니다. `DataGrid`(또는 DataGrid 프리미티브)를 사용하세요. */
|
|
48
56
|
declare function TableCell({ className, children, size, asChild, ref, ...props }: TableCellProps): import("react/jsx-runtime").JSX.Element;
|
|
49
57
|
export interface TableEmptyProps extends TdHTMLAttributes<HTMLTableCellElement> {
|
|
50
58
|
colSpan: number;
|
|
51
59
|
children?: ReactNode;
|
|
52
60
|
ref?: Ref<HTMLTableCellElement>;
|
|
53
61
|
}
|
|
62
|
+
/** @deprecated Table은 제거 예정입니다. `DataGrid`(또는 DataGrid 프리미티브)를 사용하세요. */
|
|
54
63
|
declare function TableEmpty({ className, children, colSpan, ref, ...props }: TableEmptyProps): import("react/jsx-runtime").JSX.Element;
|
|
55
64
|
export interface TableLoadingProps extends TableHTMLAttributes<HTMLTableSectionElement> {
|
|
56
65
|
colSpan: number;
|
|
57
66
|
rowCount?: number;
|
|
58
67
|
ref?: Ref<HTMLTableSectionElement>;
|
|
59
68
|
}
|
|
69
|
+
/** @deprecated Table은 제거 예정입니다. `DataGrid`(또는 DataGrid 프리미티브)를 사용하세요. */
|
|
60
70
|
declare function TableLoading({ className, colSpan, rowCount, ref, ...props }: TableLoadingProps): import("react/jsx-runtime").JSX.Element;
|
|
61
71
|
export { Table, TableBody, TableCaption, TableCell, TableEmpty, TableFooter, TableHead, TableHeader, TableLoading, TableRow, };
|