@lawkit/ui 0.1.55 → 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 +236 -0
- package/dist/index.css +1 -1
- package/dist/index.js +2353 -1992
- package/dist/ui-v3/src/components/Breadcrumb/Breadcrumb.css.d.ts +15 -0
- package/dist/ui-v3/src/components/Breadcrumb/index.d.ts +29 -0
- 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/FloatingModal/FloatingModal.css.d.ts +10 -0
- package/dist/ui-v3/src/components/FloatingModal/index.d.ts +31 -0
- package/dist/ui-v3/src/components/FullScreenModal/FullScreenModal.css.d.ts +1 -0
- package/dist/ui-v3/src/components/FullScreenModal/index.d.ts +23 -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/components/Textarea/Textarea.css.d.ts +47 -0
- package/dist/ui-v3/src/components/Textarea/index.d.ts +26 -0
- package/dist/ui-v3/src/index.d.ts +12 -0
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const root: import('@vanilla-extract/recipes').RuntimeFn<{
|
|
2
|
+
size: {
|
|
3
|
+
small: {
|
|
4
|
+
fontSize: `var(--${string})`;
|
|
5
|
+
};
|
|
6
|
+
medium: {
|
|
7
|
+
fontSize: `var(--${string})`;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
}>;
|
|
11
|
+
export declare const list: string;
|
|
12
|
+
export declare const item: string;
|
|
13
|
+
export declare const link: string;
|
|
14
|
+
export declare const current: string;
|
|
15
|
+
export declare const separator: string;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ReactNode, HTMLAttributes, MouseEventHandler } from 'react';
|
|
2
|
+
export type BreadcrumbSize = "small" | "medium";
|
|
3
|
+
export interface BreadcrumbItem {
|
|
4
|
+
/** 표시 텍스트 */
|
|
5
|
+
label: string;
|
|
6
|
+
/** 이동 링크 (마지막 항목에서는 무시) */
|
|
7
|
+
href?: string;
|
|
8
|
+
/** 클릭 핸들러 (라우터 연동 시 e.preventDefault() 사용) */
|
|
9
|
+
onClick?: MouseEventHandler<HTMLAnchorElement>;
|
|
10
|
+
}
|
|
11
|
+
export interface BreadcrumbProps extends HTMLAttributes<HTMLElement> {
|
|
12
|
+
/** 경로 항목 목록 — 마지막 항목이 현재 페이지 */
|
|
13
|
+
items: BreadcrumbItem[];
|
|
14
|
+
/** 구분자 (기본 "/") */
|
|
15
|
+
separator?: ReactNode;
|
|
16
|
+
/** 사이즈 */
|
|
17
|
+
size?: BreadcrumbSize;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* **Breadcrumb**
|
|
21
|
+
*
|
|
22
|
+
* 현재 페이지까지의 경로를 보여주는 내비게이션.
|
|
23
|
+
*
|
|
24
|
+
* - `items`: 경로 항목 목록. 마지막 항목은 현재 페이지로 취급되어
|
|
25
|
+
* 링크가 아닌 `aria-current="page"` 텍스트로 렌더링됩니다.
|
|
26
|
+
* - `separator`: 구분자 커스텀 (기본 `/`)
|
|
27
|
+
* - `size`: small(12px) / medium(14px)
|
|
28
|
+
*/
|
|
29
|
+
export declare function Breadcrumb({ items, separator, size, className, ...rest }: BreadcrumbProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -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,31 @@
|
|
|
1
|
+
import { ReactNode, HTMLAttributes } from 'react';
|
|
2
|
+
export type FloatingModalPosition = "bottom-right" | "bottom-left";
|
|
3
|
+
export interface FloatingModalProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
4
|
+
/** 표시 여부 */
|
|
5
|
+
open: boolean;
|
|
6
|
+
/** 닫기 핸들러 (close 버튼) */
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
/** 헤더 타이틀 */
|
|
9
|
+
title?: ReactNode;
|
|
10
|
+
/** 푸터 콘텐츠 */
|
|
11
|
+
footer?: ReactNode;
|
|
12
|
+
/** 고정 위치 */
|
|
13
|
+
position?: FloatingModalPosition;
|
|
14
|
+
/** 최소화(접기) 토글 버튼 표시 */
|
|
15
|
+
collapsible?: boolean;
|
|
16
|
+
/** Escape 키 닫기 (비차단 특성상 기본 off) */
|
|
17
|
+
closeOnEscape?: boolean;
|
|
18
|
+
/** 본문 */
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* **FloatingModal**
|
|
23
|
+
*
|
|
24
|
+
* 화면 우하단(기본)에 고정으로 떠 있는 비차단 모달.
|
|
25
|
+
* backdrop이 없어 페이지를 계속 조작할 수 있습니다. (예: 업로드 진행, 미니 플레이어)
|
|
26
|
+
*
|
|
27
|
+
* - `position`: bottom-right(기본) / bottom-left
|
|
28
|
+
* - `collapsible`: 헤더의 접기/펼치기 토글
|
|
29
|
+
* - `closeOnEscape`: Escape 닫기 (기본 off — 비차단 특성)
|
|
30
|
+
*/
|
|
31
|
+
export declare function FloatingModal({ open, onClose, title, footer, position, collapsible, closeOnEscape, children, className, ...rest }: FloatingModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const surface: string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactNode, HTMLAttributes } from 'react';
|
|
2
|
+
export interface FullScreenModalProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
3
|
+
/** 모달 표시 여부 */
|
|
4
|
+
open: boolean;
|
|
5
|
+
/** 닫기 핸들러 (Escape, close 버튼) */
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
/** 헤더 타이틀 */
|
|
8
|
+
title?: ReactNode;
|
|
9
|
+
/** 푸터 콘텐츠 */
|
|
10
|
+
footer?: ReactNode;
|
|
11
|
+
/** Escape 키 닫기 비활성 */
|
|
12
|
+
disableEscapeClose?: boolean;
|
|
13
|
+
/** 모달 본문 */
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* **FullScreenModal**
|
|
18
|
+
*
|
|
19
|
+
* 뷰포트 전체를 덮는 모달. Modal과 같은 `open`/`onClose` API를 사용하며,
|
|
20
|
+
* 상단 고정 헤더(타이틀 + 닫기) + 스크롤 바디 + 하단 푸터로 구성됩니다.
|
|
21
|
+
* backdrop 없이 전체가 표면입니다.
|
|
22
|
+
*/
|
|
23
|
+
export declare function FullScreenModal({ open, onClose, title, footer, disableEscapeClose, children, className, ...rest }: FullScreenModalProps): 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;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export declare const wrapper: string;
|
|
2
|
+
export declare const textarea: import('@vanilla-extract/recipes').RuntimeFn<{
|
|
3
|
+
size: {
|
|
4
|
+
small: {
|
|
5
|
+
padding: `6px var(--${string})`;
|
|
6
|
+
};
|
|
7
|
+
medium: {
|
|
8
|
+
padding: "8px 14px";
|
|
9
|
+
};
|
|
10
|
+
large: {
|
|
11
|
+
padding: "12px 14px";
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
state: {
|
|
15
|
+
default: {
|
|
16
|
+
selectors: {
|
|
17
|
+
"&:focus": {
|
|
18
|
+
borderColor: `var(--${string})`;
|
|
19
|
+
boxShadow: `var(--${string})`;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
active: {
|
|
24
|
+
borderColor: `var(--${string})`;
|
|
25
|
+
boxShadow: `var(--${string})`;
|
|
26
|
+
};
|
|
27
|
+
success: {
|
|
28
|
+
borderColor: string;
|
|
29
|
+
};
|
|
30
|
+
warning: {
|
|
31
|
+
borderColor: `var(--${string})`;
|
|
32
|
+
};
|
|
33
|
+
disabled: {
|
|
34
|
+
backgroundColor: `var(--${string})`;
|
|
35
|
+
cursor: "not-allowed";
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
resize: {
|
|
39
|
+
none: {
|
|
40
|
+
resize: "none";
|
|
41
|
+
};
|
|
42
|
+
vertical: {
|
|
43
|
+
resize: "vertical";
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
}>;
|
|
47
|
+
export declare const count: string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { TextareaHTMLAttributes } from 'react';
|
|
2
|
+
export type TextareaSize = "small" | "medium" | "large";
|
|
3
|
+
export type TextareaState = "default" | "active" | "success" | "warning" | "disabled";
|
|
4
|
+
export type TextareaResize = "none" | "vertical";
|
|
5
|
+
export interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
6
|
+
/** 사이즈 */
|
|
7
|
+
textareaSize?: TextareaSize;
|
|
8
|
+
/** 상태 */
|
|
9
|
+
state?: TextareaState;
|
|
10
|
+
/** 리사이즈 제어 */
|
|
11
|
+
resize?: TextareaResize;
|
|
12
|
+
/** 글자수 표시 (maxLength와 함께 사용 시 "n/max" 형식) */
|
|
13
|
+
showCount?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* **Textarea**
|
|
17
|
+
*
|
|
18
|
+
* 여러 줄 텍스트 입력 필드. Input과 동일한 시각 언어를 공유합니다.
|
|
19
|
+
*
|
|
20
|
+
* - `textareaSize`: small / medium / large (패딩 차이)
|
|
21
|
+
* - `state`: default / active / success / warning / disabled
|
|
22
|
+
* - `resize`: none / vertical (기본 vertical)
|
|
23
|
+
* - `showCount`: 글자수 표시 (`maxLength`와 함께 쓰면 "n/max")
|
|
24
|
+
* - InputGroup(label/helperText)과 함께 사용할 수 있습니다.
|
|
25
|
+
*/
|
|
26
|
+
export declare const Textarea: import('react').ForwardRefExoticComponent<TextareaProps & import('react').RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -94,6 +94,18 @@ export { Chip } from './components/Chip';
|
|
|
94
94
|
export type { ChipProps } from './components/Chip';
|
|
95
95
|
export { LinkBadge } from './components/LinkBadge';
|
|
96
96
|
export type { LinkBadgeProps } from './components/LinkBadge';
|
|
97
|
+
export { Breadcrumb } from './components/Breadcrumb';
|
|
98
|
+
export type { BreadcrumbProps, BreadcrumbItem, BreadcrumbSize, } from './components/Breadcrumb';
|
|
99
|
+
export { Textarea } from './components/Textarea';
|
|
100
|
+
export type { TextareaProps, TextareaSize, TextareaState, TextareaResize, } from './components/Textarea';
|
|
101
|
+
export { FloatingModal } from './components/FloatingModal';
|
|
102
|
+
export type { FloatingModalProps, FloatingModalPosition, } from './components/FloatingModal';
|
|
103
|
+
export { FullScreenModal } from './components/FullScreenModal';
|
|
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';
|
|
97
109
|
export { sprinkles } from './styles/sprinkles.css';
|
|
98
110
|
export { cx } from './lib/cx';
|
|
99
111
|
export { lightThemeClass, themeVars, createLdsThemeVars } from '../../tokens/src';
|