@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 CHANGED
@@ -104,6 +104,35 @@ import { Badge } from "@lds/ui-v3";
104
104
  <Badge iconOnly leadingIcon={<MyIcon />} aria-label="알림" />
105
105
  ```
106
106
 
107
+ ## Breadcrumb
108
+
109
+ ```tsx
110
+ import { Breadcrumb } from "@lds/ui-v3";
111
+
112
+ // 기본 — 마지막 항목이 현재 페이지 (aria-current="page")
113
+ <Breadcrumb
114
+ items={[
115
+ { label: "홈", href: "/" },
116
+ { label: "계약", href: "/contracts" },
117
+ { label: "계약 상세" },
118
+ ]}
119
+ />
120
+
121
+ // 구분자 커스텀 (chevron 등)
122
+ <Breadcrumb items={items} separator=">" />
123
+
124
+ // 라우터 연동 (onClick)
125
+ <Breadcrumb
126
+ items={[
127
+ { label: "홈", href: "/", onClick: (e) => { e.preventDefault(); router.push("/"); } },
128
+ { label: "현재 페이지" },
129
+ ]}
130
+ />
131
+
132
+ // 작은 사이즈
133
+ <Breadcrumb items={items} size="small" />
134
+ ```
135
+
107
136
  ## Button
108
137
 
109
138
  ```tsx
@@ -467,6 +496,52 @@ function MyPage() {
467
496
  }
468
497
  ```
469
498
 
499
+ ## Drawer
500
+
501
+ ```tsx
502
+ import { useState } from "react";
503
+ import { Drawer, Button } from "@lds/ui-v3";
504
+
505
+ function MyPage() {
506
+ const [open, setOpen] = useState(false);
507
+ return (
508
+ <>
509
+ <Button onClick={() => setOpen(true)}>계약 상세 열기</Button>
510
+
511
+ {/* 기본 — 오른쪽에서 슬라이드 인, dim + 클릭/Escape 닫기 */}
512
+ <Drawer
513
+ open={open}
514
+ onClose={() => setOpen(false)}
515
+ title="계약 상세"
516
+ footer={
517
+ <>
518
+ <Button variant="outline" color="secondary" onClick={() => setOpen(false)}>취소</Button>
519
+ <Button onClick={() => setOpen(false)}>저장</Button>
520
+ </>
521
+ }
522
+ >
523
+ <p>계약 상세 콘텐츠</p>
524
+ </Drawer>
525
+
526
+ {/* 왼쪽 + 작은 사이즈 (필터 패널) */}
527
+ <Drawer open={open} onClose={() => setOpen(false)} side="left" size="small" title="필터">
528
+ <p>필터 콘텐츠</p>
529
+ </Drawer>
530
+
531
+ {/* 비차단 — dim 없이 페이지 조작 가능 */}
532
+ <Drawer open={open} onClose={() => setOpen(false)} backdrop={false} title="메모">
533
+ <p>페이지를 계속 조작할 수 있어요.</p>
534
+ </Drawer>
535
+
536
+ {/* Escape 닫기 비활성 */}
537
+ <Drawer open={open} onClose={() => setOpen(false)} title="작성 중" closeOnEscape={false}>
538
+ <p>실수로 닫히지 않도록 Escape를 막습니다.</p>
539
+ </Drawer>
540
+ </>
541
+ );
542
+ }
543
+ ```
544
+
470
545
  ## Dropdown
471
546
 
472
547
  ```tsx
@@ -546,6 +621,85 @@ const [files, setFiles] = useState([]);
546
621
  <FileAttachBadge filename="report.pdf" onRemove={() => {}} />
547
622
  ```
548
623
 
624
+ ## FloatingModal
625
+
626
+ ```tsx
627
+ import { useState } from "react";
628
+ import { FloatingModal, Button } from "@lds/ui-v3";
629
+
630
+ function MyPage() {
631
+ const [open, setOpen] = useState(false);
632
+ return (
633
+ <>
634
+ <Button onClick={() => setOpen(true)}>플로팅 모달 열기</Button>
635
+
636
+ {/* 우하단 고정, backdrop 없음 — 페이지 조작 가능 */}
637
+ <FloatingModal
638
+ open={open}
639
+ onClose={() => setOpen(false)}
640
+ title="파일 업로드"
641
+ collapsible
642
+ footer={<Button onClick={() => setOpen(false)}>완료</Button>}
643
+ >
644
+ <p>계약서_최종.pdf 업로드 중… (75%)</p>
645
+ </FloatingModal>
646
+
647
+ {/* 좌하단 + Escape 닫기 */}
648
+ <FloatingModal
649
+ open={open}
650
+ onClose={() => setOpen(false)}
651
+ title="메모"
652
+ position="bottom-left"
653
+ closeOnEscape
654
+ >
655
+ <p>작성 중인 메모</p>
656
+ </FloatingModal>
657
+ </>
658
+ );
659
+ }
660
+ ```
661
+
662
+ ## FullScreenModal
663
+
664
+ ```tsx
665
+ import { useState } from "react";
666
+ import { FullScreenModal, Button } from "@lds/ui-v3";
667
+
668
+ function MyPage() {
669
+ const [open, setOpen] = useState(false);
670
+ return (
671
+ <>
672
+ <Button onClick={() => setOpen(true)}>전체화면 모달 열기</Button>
673
+
674
+ {/* 상단 고정 헤더 + 스크롤 바디 + 하단 푸터 */}
675
+ <FullScreenModal
676
+ open={open}
677
+ onClose={() => setOpen(false)}
678
+ title="계약서 편집"
679
+ footer={
680
+ <>
681
+ <Button variant="outline" color="secondary" onClick={() => setOpen(false)}>취소</Button>
682
+ <Button onClick={() => setOpen(false)}>저장</Button>
683
+ </>
684
+ }
685
+ >
686
+ <p>전체화면 본문 콘텐츠</p>
687
+ </FullScreenModal>
688
+
689
+ {/* Escape 닫기 비활성 */}
690
+ <FullScreenModal
691
+ open={open}
692
+ onClose={() => setOpen(false)}
693
+ title="문서 작성"
694
+ disableEscapeClose
695
+ >
696
+ <p>작성 중 실수로 닫히지 않도록 Escape를 막습니다.</p>
697
+ </FullScreenModal>
698
+ </>
699
+ );
700
+ }
701
+ ```
702
+
549
703
  ## IconButtonGroup
550
704
 
551
705
  ```tsx
@@ -1031,6 +1185,60 @@ const [on, setOn] = useState(false);
1031
1185
  <Switch label="Disabled On" checked disabled />
1032
1186
  ```
1033
1187
 
1188
+ ## TableTree
1189
+
1190
+ ```tsx
1191
+ import { TableTree } from "@lds/ui-v3";
1192
+ import type { TableTreeColumn, TableTreeRow } from "@lds/ui-v3";
1193
+
1194
+ const columns: TableTreeColumn[] = [
1195
+ { key: "code", header: "관리번호", width: 180 },
1196
+ { key: "title", header: "계약명" },
1197
+ { key: "date", header: "체결일", width: 120, align: "right" },
1198
+ ];
1199
+
1200
+ const rows: TableTreeRow[] = [
1201
+ {
1202
+ id: "1",
1203
+ cells: { code: "C20190301", title: "법무관리시스템 구축 계약", date: "2019-01-03" },
1204
+ children: [
1205
+ {
1206
+ id: "1-1",
1207
+ cells: { code: "C20190301-01", title: "유지보수 계약", date: "2020-01-03" },
1208
+ },
1209
+ ],
1210
+ },
1211
+ {
1212
+ id: "2",
1213
+ cells: { code: "C20221108", title: "Law.ai 공급 계약", date: "2022-11-08" },
1214
+ },
1215
+ ];
1216
+
1217
+ // 기본 — 자식 행은 부모 확장 시에만 렌더
1218
+ <TableTree columns={columns} rows={rows} />
1219
+
1220
+ // 초기 펼침 + 행 클릭/선택
1221
+ <TableTree
1222
+ columns={columns}
1223
+ rows={rows}
1224
+ defaultExpandedIds={["1"]}
1225
+ selectedId={selectedId}
1226
+ onRowClick={(row) => setSelectedId(row.id)}
1227
+ />
1228
+
1229
+ // Controlled 펼침 상태
1230
+ const [expandedIds, setExpandedIds] = useState<string[]>(["1"]);
1231
+ <TableTree
1232
+ columns={columns}
1233
+ rows={rows}
1234
+ expandedIds={expandedIds}
1235
+ onExpandedChange={setExpandedIds}
1236
+ />
1237
+
1238
+ // 세로 구분선 + 들여쓰기 조절 + 빈 상태 메시지
1239
+ <TableTree columns={columns} rows={rows} bordered indentSize={28} emptyText="조회된 계약이 없습니다." />
1240
+ ```
1241
+
1034
1242
  ## Tabs
1035
1243
 
1036
1244
  ```tsx
@@ -1096,6 +1304,34 @@ const [value, setValue] = useState<string[]>([]);
1096
1304
  />
1097
1305
  ```
1098
1306
 
1307
+ ## Textarea
1308
+
1309
+ ```tsx
1310
+ import { Textarea, InputGroup } from "@lds/ui-v3";
1311
+
1312
+ // 기본
1313
+ <Textarea placeholder="내용을 입력하세요" />
1314
+
1315
+ // 사이즈 / 줄 수
1316
+ <Textarea textareaSize="small" rows={3} />
1317
+ <Textarea textareaSize="large" rows={6} />
1318
+
1319
+ // 상태
1320
+ <Textarea state="warning" defaultValue="필수 항목입니다" />
1321
+ <Textarea state="disabled" placeholder="비활성화" />
1322
+
1323
+ // 리사이즈 잠금
1324
+ <Textarea resize="none" />
1325
+
1326
+ // 글자수 표시
1327
+ <Textarea maxLength={200} showCount placeholder="200자 이내로 입력" />
1328
+
1329
+ // InputGroup과 함께 (라벨 + 도움말)
1330
+ <InputGroup label="비고" helperText="선택 입력 항목입니다">
1331
+ <Textarea placeholder="비고를 입력하세요" />
1332
+ </InputGroup>
1333
+ ```
1334
+
1099
1335
  ## Toast
1100
1336
 
1101
1337
  ```tsx