@lawkit/ui 0.1.56 → 0.1.57
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/CLAUDE.md +100 -0
- package/dist/index.css +1 -1
- package/dist/index.js +2092 -1908
- package/dist/ui-v3/src/components/Drawer/Drawer.css.d.ts +36 -0
- package/dist/ui-v3/src/components/Drawer/index.d.ts +36 -0
- package/dist/ui-v3/src/components/TableTree/TableTree.css.d.ts +23 -0
- package/dist/ui-v3/src/components/TableTree/index.d.ts +59 -0
- package/dist/ui-v3/src/index.d.ts +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare const TRANSITION_MS = 200;
|
|
2
|
+
export declare const overlay: import('@vanilla-extract/recipes').RuntimeFn<{
|
|
3
|
+
closing: {
|
|
4
|
+
true: {
|
|
5
|
+
opacity: number;
|
|
6
|
+
};
|
|
7
|
+
false: {};
|
|
8
|
+
};
|
|
9
|
+
}>;
|
|
10
|
+
export declare const panel: import('@vanilla-extract/recipes').RuntimeFn<{
|
|
11
|
+
side: {
|
|
12
|
+
right: {
|
|
13
|
+
right: number;
|
|
14
|
+
animation: `${string} 200ms ease`;
|
|
15
|
+
};
|
|
16
|
+
left: {
|
|
17
|
+
left: number;
|
|
18
|
+
animation: `${string} 200ms ease`;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
size: {
|
|
22
|
+
small: {
|
|
23
|
+
width: number;
|
|
24
|
+
};
|
|
25
|
+
medium: {
|
|
26
|
+
width: number;
|
|
27
|
+
};
|
|
28
|
+
large: {
|
|
29
|
+
width: number;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
closing: {
|
|
33
|
+
true: {};
|
|
34
|
+
false: {};
|
|
35
|
+
};
|
|
36
|
+
}>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ReactNode, HTMLAttributes } from 'react';
|
|
2
|
+
export type DrawerSide = "right" | "left";
|
|
3
|
+
export type DrawerSize = "small" | "medium" | "large";
|
|
4
|
+
export interface DrawerProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
5
|
+
/** 표시 여부 */
|
|
6
|
+
open: boolean;
|
|
7
|
+
/** 닫기 핸들러 (Escape, backdrop 클릭, close 버튼) */
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
/** 슬라이드 인 방향 */
|
|
10
|
+
side?: DrawerSide;
|
|
11
|
+
/** 패널 너비 프리셋 — small 360px / medium 480px / large 640px */
|
|
12
|
+
size?: DrawerSize;
|
|
13
|
+
/** 헤더 타이틀 (간편 API) */
|
|
14
|
+
title?: ReactNode;
|
|
15
|
+
/** 푸터 콘텐츠 (간편 API) */
|
|
16
|
+
footer?: ReactNode;
|
|
17
|
+
/** dim 배경 + 클릭 닫기. false면 비차단(페이지 조작 가능) */
|
|
18
|
+
backdrop?: boolean;
|
|
19
|
+
/** Escape 키 닫기 */
|
|
20
|
+
closeOnEscape?: boolean;
|
|
21
|
+
/** 패널 본문 */
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* **Drawer**
|
|
26
|
+
*
|
|
27
|
+
* 화면 가장자리에서 슬라이드 인 하는 패널 프리미티브.
|
|
28
|
+
* 계약 상세, 필터 패널 등 흐름을 떠나지 않는 부가 작업에 사용합니다.
|
|
29
|
+
*
|
|
30
|
+
* - `side`: right(기본) / left
|
|
31
|
+
* - `size`: small 360px / medium 480px / large 640px
|
|
32
|
+
* - `backdrop`: true(기본)면 dim + 클릭 닫기 + 스크롤락, false면 비차단
|
|
33
|
+
* - `closeOnEscape`: Escape 닫기 (기본 on)
|
|
34
|
+
* - Modal과 같은 헤더(타이틀 + 닫기 X) / 스크롤 바디 / 푸터 구조
|
|
35
|
+
*/
|
|
36
|
+
export declare function Drawer({ open, onClose, side, size, title, footer, backdrop, closeOnEscape, children, className, ...rest }: DrawerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const wrapper: string;
|
|
2
|
+
export declare const table: string;
|
|
3
|
+
export declare const thead: string;
|
|
4
|
+
export declare const th: string;
|
|
5
|
+
export declare const thBordered: string;
|
|
6
|
+
export declare const tr: string;
|
|
7
|
+
export declare const trClickable: string;
|
|
8
|
+
export declare const td: string;
|
|
9
|
+
export declare const tdBordered: string;
|
|
10
|
+
export declare const firstCell: string;
|
|
11
|
+
export declare const firstCellContent: string;
|
|
12
|
+
export declare const toggleButton: string;
|
|
13
|
+
export declare const toggleSpacer: string;
|
|
14
|
+
export declare const caret: import('@vanilla-extract/recipes').RuntimeFn<{
|
|
15
|
+
expanded: {
|
|
16
|
+
true: {};
|
|
17
|
+
false: {
|
|
18
|
+
transform: "rotate(-90deg)";
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
}>;
|
|
22
|
+
export declare const emptyRow: string;
|
|
23
|
+
export declare const emptyCell: string;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface TableTreeColumn {
|
|
3
|
+
/** 셀 데이터 키 (`row.cells`의 키와 매칭) */
|
|
4
|
+
key: string;
|
|
5
|
+
/** 헤더 라벨 */
|
|
6
|
+
header: ReactNode;
|
|
7
|
+
/** 컬럼 너비 (px 숫자 또는 CSS 값) */
|
|
8
|
+
width?: number | string;
|
|
9
|
+
/** 정렬 */
|
|
10
|
+
align?: "left" | "center" | "right";
|
|
11
|
+
}
|
|
12
|
+
export interface TableTreeRow {
|
|
13
|
+
/** 고유 ID */
|
|
14
|
+
id: string;
|
|
15
|
+
/** 컬럼 키 → 셀 콘텐츠 */
|
|
16
|
+
cells: Record<string, ReactNode>;
|
|
17
|
+
/** 자식 행 (부모 확장 시에만 렌더) */
|
|
18
|
+
children?: TableTreeRow[];
|
|
19
|
+
}
|
|
20
|
+
export interface TableTreeProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
21
|
+
/** 컬럼 정의 */
|
|
22
|
+
columns: TableTreeColumn[];
|
|
23
|
+
/** 계층 행 데이터 */
|
|
24
|
+
rows: TableTreeRow[];
|
|
25
|
+
/** 초기 펼침 행 ID 목록 (uncontrolled) */
|
|
26
|
+
defaultExpandedIds?: string[];
|
|
27
|
+
/** 펼침 행 ID 목록 (controlled) */
|
|
28
|
+
expandedIds?: string[];
|
|
29
|
+
/** 펼침 상태 변경 콜백 */
|
|
30
|
+
onExpandedChange?: (expandedIds: string[]) => void;
|
|
31
|
+
/** 행 클릭 콜백 */
|
|
32
|
+
onRowClick?: (row: TableTreeRow) => void;
|
|
33
|
+
/** 선택된 행 ID */
|
|
34
|
+
selectedId?: string;
|
|
35
|
+
/** 세로 구분선 표시 */
|
|
36
|
+
bordered?: boolean;
|
|
37
|
+
/** 깊이당 들여쓰기 px */
|
|
38
|
+
indentSize?: number;
|
|
39
|
+
/** 데이터 없을 때 표시 메시지 */
|
|
40
|
+
emptyText?: ReactNode;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* **TableTree**
|
|
44
|
+
*
|
|
45
|
+
* 모계약–하위계약처럼 계층이 있는 데이터를 표 안에서 접었다 펼치는 프리미티브.
|
|
46
|
+
*
|
|
47
|
+
* - table/thead/tbody 시맨틱 마크업 + DataTable과 같은 시각 언어
|
|
48
|
+
* - 자식 행은 부모 확장 시에만 렌더 (자체 재귀 렌더, 외부 의존성 없음)
|
|
49
|
+
* - 들여쓰기는 첫 번째 컬럼에 적용 (`indentSize` × 깊이)
|
|
50
|
+
* - `expandedIds`/`onExpandedChange`로 controlled 사용 가능
|
|
51
|
+
*
|
|
52
|
+
* ```tsx
|
|
53
|
+
* <TableTree
|
|
54
|
+
* columns={[{ key: "code", header: "관리번호" }, { key: "title", header: "계약명" }]}
|
|
55
|
+
* rows={[{ id: "1", cells: { code: "C-001", title: "모계약" }, children: [...] }]}
|
|
56
|
+
* />
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
export declare function TableTree({ columns, rows, defaultExpandedIds, expandedIds: controlledExpandedIds, onExpandedChange, onRowClick, selectedId, bordered, indentSize, emptyText, className, ...rest }: TableTreeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -102,6 +102,10 @@ export { FloatingModal } from './components/FloatingModal';
|
|
|
102
102
|
export type { FloatingModalProps, FloatingModalPosition, } from './components/FloatingModal';
|
|
103
103
|
export { FullScreenModal } from './components/FullScreenModal';
|
|
104
104
|
export type { FullScreenModalProps } from './components/FullScreenModal';
|
|
105
|
+
export { Drawer } from './components/Drawer';
|
|
106
|
+
export type { DrawerProps, DrawerSide, DrawerSize } from './components/Drawer';
|
|
107
|
+
export { TableTree } from './components/TableTree';
|
|
108
|
+
export type { TableTreeProps, TableTreeColumn, TableTreeRow, } from './components/TableTree';
|
|
105
109
|
export { sprinkles } from './styles/sprinkles.css';
|
|
106
110
|
export { cx } from './lib/cx';
|
|
107
111
|
export { lightThemeClass, themeVars, createLdsThemeVars } from '../../tokens/src';
|