@conscience-technology/ctds 0.0.0-stage → 0.1.0
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/README.md +128 -2
- package/assets/components/AppFrame/AppFrame.module.css +177 -0
- package/assets/components/AppFrame/AppFrame.tsx +93 -0
- package/assets/components/AppFrame/index.ts +6 -0
- package/assets/components/AttachmentChip/AttachmentChip.module.css +71 -0
- package/assets/components/AttachmentChip/AttachmentChip.tsx +74 -0
- package/assets/components/AttachmentChip/index.ts +2 -0
- package/assets/components/AttachmentThumb/AttachmentThumb.module.css +107 -0
- package/assets/components/AttachmentThumb/AttachmentThumb.tsx +91 -0
- package/assets/components/AttachmentThumb/index.ts +2 -0
- package/assets/components/Avatar/Avatar.module.css +167 -0
- package/assets/components/Avatar/Avatar.tsx +228 -0
- package/assets/components/Avatar/index.ts +2 -0
- package/assets/components/AvatarUpload/AvatarUpload.module.css +130 -0
- package/assets/components/AvatarUpload/AvatarUpload.tsx +139 -0
- package/assets/components/AvatarUpload/index.ts +2 -0
- package/assets/components/Badge/Badge.module.css +76 -0
- package/assets/components/Badge/Badge.tsx +68 -0
- package/assets/components/Badge/index.ts +2 -0
- package/assets/components/Breadcrumb/Breadcrumb.module.css +213 -0
- package/assets/components/Breadcrumb/Breadcrumb.tsx +279 -0
- package/assets/components/Breadcrumb/index.ts +8 -0
- package/assets/components/Button/Button.module.css +216 -0
- package/assets/components/Button/Button.tsx +149 -0
- package/assets/components/Button/index.ts +2 -0
- package/assets/components/Callout/Callout.module.css +146 -0
- package/assets/components/Callout/Callout.tsx +138 -0
- package/assets/components/Callout/index.ts +2 -0
- package/assets/components/ChatInput/ChatInput.module.css +241 -0
- package/assets/components/ChatInput/ChatInput.tsx +322 -0
- package/assets/components/ChatInput/ModelSelector.tsx +40 -0
- package/assets/components/ChatInput/SendButton.tsx +41 -0
- package/assets/components/ChatInput/index.ts +10 -0
- package/assets/components/Checkbox/Checkbox.module.css +66 -0
- package/assets/components/Checkbox/Checkbox.tsx +36 -0
- package/assets/components/Checkbox/index.ts +2 -0
- package/assets/components/Chip/Chip.module.css +128 -0
- package/assets/components/Chip/Chip.tsx +103 -0
- package/assets/components/Chip/index.ts +2 -0
- package/assets/components/ChoiceCard/ChoiceCard.module.css +142 -0
- package/assets/components/ChoiceCard/ChoiceCard.tsx +132 -0
- package/assets/components/ChoiceCard/index.ts +2 -0
- package/assets/components/ContextMenu/ContextMenu.module.css +102 -0
- package/assets/components/ContextMenu/ContextMenu.tsx +392 -0
- package/assets/components/ContextMenu/index.ts +9 -0
- package/assets/components/DatePicker/Calendar.tsx +234 -0
- package/assets/components/DatePicker/DESIGN_NOTES.md +106 -0
- package/assets/components/DatePicker/DESIGN_NOTES_TIME.md +125 -0
- package/assets/components/DatePicker/DatePicker.module.css +295 -0
- package/assets/components/DatePicker/DatePicker.tsx +387 -0
- package/assets/components/DatePicker/TimeSelector.tsx +69 -0
- package/assets/components/DatePicker/index.ts +8 -0
- package/assets/components/DatePicker/presets.ts +80 -0
- package/assets/components/DatePicker/utils.ts +148 -0
- package/assets/components/Disclosure/Disclosure.module.css +73 -0
- package/assets/components/Disclosure/Disclosure.tsx +129 -0
- package/assets/components/Disclosure/index.ts +6 -0
- package/assets/components/Drawer/Drawer.module.css +257 -0
- package/assets/components/Drawer/Drawer.tsx +126 -0
- package/assets/components/Drawer/index.ts +7 -0
- package/assets/components/EmptyState/EmptyState.module.css +102 -0
- package/assets/components/EmptyState/EmptyState.tsx +80 -0
- package/assets/components/EmptyState/index.ts +2 -0
- package/assets/components/FileIcon/FileIcon.module.css +66 -0
- package/assets/components/FileIcon/FileIcon.tsx +84 -0
- package/assets/components/FileIcon/fileExtMap.ts +112 -0
- package/assets/components/FileIcon/index.ts +9 -0
- package/assets/components/FilterButton/FilterButton.module.css +130 -0
- package/assets/components/FilterButton/FilterButton.tsx +94 -0
- package/assets/components/FilterButton/index.ts +2 -0
- package/assets/components/GalleryItem/GalleryItem.module.css +220 -0
- package/assets/components/GalleryItem/GalleryItem.tsx +163 -0
- package/assets/components/GalleryItem/index.ts +7 -0
- package/assets/components/Icon/Icon.tsx +616 -0
- package/assets/components/Icon/context.tsx +39 -0
- package/assets/components/Icon/index.ts +4 -0
- package/assets/components/IconButton/IconButton.module.css +109 -0
- package/assets/components/IconButton/IconButton.tsx +110 -0
- package/assets/components/IconButton/index.ts +2 -0
- package/assets/components/Input/Input.module.css +338 -0
- package/assets/components/Input/Input.tsx +371 -0
- package/assets/components/Input/index.ts +2 -0
- package/assets/components/ListItem/ListItem.module.css +318 -0
- package/assets/components/ListItem/ListItem.tsx +262 -0
- package/assets/components/ListItem/index.ts +9 -0
- package/assets/components/MenuItem/MenuItem.module.css +437 -0
- package/assets/components/MenuItem/MenuItem.tsx +529 -0
- package/assets/components/MenuItem/index.ts +8 -0
- package/assets/components/MetricCard/MetricCard.module.css +153 -0
- package/assets/components/MetricCard/MetricCard.tsx +140 -0
- package/assets/components/MetricCard/index.ts +2 -0
- package/assets/components/Modal/Modal.module.css +175 -0
- package/assets/components/Modal/Modal.tsx +98 -0
- package/assets/components/Modal/index.ts +2 -0
- package/assets/components/Onboarding/DocsIndex.tsx +82 -0
- package/assets/components/Onboarding/LayoutBuilder.tsx +160 -0
- package/assets/components/Onboarding/Onboarding.module.css +1394 -0
- package/assets/components/Onboarding/OnboardingAxisPanel.tsx +515 -0
- package/assets/components/Onboarding/OnboardingPage.tsx +1193 -0
- package/assets/components/Onboarding/PresetsGallery.tsx +65 -0
- package/assets/components/Onboarding/actions.ts +250 -0
- package/assets/components/Onboarding/index.ts +8 -0
- package/assets/components/Onboarding/palette.css +40 -0
- package/assets/components/Onboarding/wizardData.ts +265 -0
- package/assets/components/Pagination/Pagination.module.css +82 -0
- package/assets/components/Pagination/Pagination.tsx +248 -0
- package/assets/components/Pagination/index.ts +6 -0
- package/assets/components/ProgressBar/ProgressBar.module.css +64 -0
- package/assets/components/ProgressBar/ProgressBar.tsx +54 -0
- package/assets/components/ProgressBar/index.ts +2 -0
- package/assets/components/QuotationBar/QuotationBar.module.css +61 -0
- package/assets/components/QuotationBar/QuotationBar.tsx +48 -0
- package/assets/components/QuotationBar/index.ts +2 -0
- package/assets/components/Radio/Radio.module.css +63 -0
- package/assets/components/Radio/Radio.tsx +33 -0
- package/assets/components/Radio/index.ts +2 -0
- package/assets/components/Select/Select.module.css +151 -0
- package/assets/components/Select/Select.tsx +425 -0
- package/assets/components/Select/index.ts +10 -0
- package/assets/components/SelectableCard/SelectableCard.module.css +177 -0
- package/assets/components/SelectableCard/SelectableCard.tsx +83 -0
- package/assets/components/SelectableCard/index.ts +2 -0
- package/assets/components/Shortcut/Shortcut.module.css +56 -0
- package/assets/components/Shortcut/Shortcut.tsx +156 -0
- package/assets/components/Shortcut/index.ts +2 -0
- package/assets/components/Sidebar/Sidebar.module.css +242 -0
- package/assets/components/Sidebar/Sidebar.tsx +264 -0
- package/assets/components/Sidebar/index.ts +7 -0
- package/assets/components/SidebarSplit/SidebarSplit.module.css +126 -0
- package/assets/components/SidebarSplit/SidebarSplit.tsx +222 -0
- package/assets/components/SidebarSplit/index.ts +6 -0
- package/assets/components/Slider/Slider.module.css +120 -0
- package/assets/components/Slider/Slider.tsx +88 -0
- package/assets/components/Slider/index.ts +2 -0
- package/assets/components/SplitButton/SplitButton.module.css +190 -0
- package/assets/components/SplitButton/SplitButton.tsx +145 -0
- package/assets/components/SplitButton/index.ts +6 -0
- package/assets/components/Stepper/Stepper.module.css +182 -0
- package/assets/components/Stepper/Stepper.tsx +185 -0
- package/assets/components/Stepper/index.ts +2 -0
- package/assets/components/Switch/Switch.module.css +116 -0
- package/assets/components/Switch/Switch.tsx +58 -0
- package/assets/components/Switch/index.ts +2 -0
- package/assets/components/TableCell/TableCell.module.css +137 -0
- package/assets/components/TableCell/TableCellAvatar.tsx +42 -0
- package/assets/components/TableCell/TableCellBadge.tsx +23 -0
- package/assets/components/TableCell/TableCellIcon.tsx +39 -0
- package/assets/components/TableCell/TableCellImage.tsx +49 -0
- package/assets/components/TableCell/TableCellLink.tsx +33 -0
- package/assets/components/TableCell/TableCellMeter.tsx +55 -0
- package/assets/components/TableCell/TableCellNumber.tsx +43 -0
- package/assets/components/TableCell/TableCellText.tsx +30 -0
- package/assets/components/TableCell/index.ts +23 -0
- package/assets/components/TableHeader/TableHeader.module.css +287 -0
- package/assets/components/TableHeader/TableHeader.tsx +590 -0
- package/assets/components/TableHeader/index.ts +9 -0
- package/assets/components/TableRow/TableRow.module.css +290 -0
- package/assets/components/TableRow/TableRow.tsx +253 -0
- package/assets/components/TableRow/index.ts +8 -0
- package/assets/components/TableRowEdit/TableRowEdit.module.css +126 -0
- package/assets/components/TableRowEdit/TableRowEdit.tsx +247 -0
- package/assets/components/TableRowEdit/index.ts +2 -0
- package/assets/components/TableRowSelect/TableRowSelect.module.css +23 -0
- package/assets/components/TableRowSelect/TableRowSelect.tsx +175 -0
- package/assets/components/TableRowSelect/index.ts +2 -0
- package/assets/components/Tabs/Tabs.module.css +234 -0
- package/assets/components/Tabs/Tabs.tsx +426 -0
- package/assets/components/Tabs/index.ts +9 -0
- package/assets/components/Textarea/Textarea.module.css +318 -0
- package/assets/components/Textarea/Textarea.tsx +426 -0
- package/assets/components/Textarea/index.ts +7 -0
- package/assets/components/ThemeController.tsx +271 -0
- package/assets/components/TimePicker/TimePicker.module.css +317 -0
- package/assets/components/TimePicker/TimePicker.tsx +821 -0
- package/assets/components/TimePicker/index.ts +8 -0
- package/assets/components/TimePicker/utils.ts +115 -0
- package/assets/components/Toast/Toast.module.css +264 -0
- package/assets/components/Toast/Toast.tsx +243 -0
- package/assets/components/Toast/index.ts +15 -0
- package/assets/components/Toolbar/Toolbar.module.css +72 -0
- package/assets/components/Toolbar/Toolbar.tsx +75 -0
- package/assets/components/Toolbar/index.ts +2 -0
- package/assets/components/Tooltip/Tooltip.module.css +42 -0
- package/assets/components/Tooltip/Tooltip.tsx +332 -0
- package/assets/components/Tooltip/index.ts +2 -0
- package/assets/components/Topbar/Topbar.module.css +26 -0
- package/assets/components/Topbar/Topbar.tsx +47 -0
- package/assets/components/Topbar/index.ts +2 -0
- package/assets/components/_cn.ts +3 -0
- package/assets/components/_color.ts +48 -0
- package/assets/components/_data.ts +659 -0
- package/assets/components/_utils.css +19 -0
- package/assets/components/axisOptions.ts +24 -0
- package/assets/components/tokens.css +742 -0
- package/assets/prompts/GUIDE.md +251 -0
- package/assets/prompts/OVERRIDE.md +170 -0
- package/assets/prompts/PRINCIPLES.md +130 -0
- package/assets/prompts/axes/density.md +38 -0
- package/assets/prompts/axes/font.md +36 -0
- package/assets/prompts/axes/hue.md +36 -0
- package/assets/prompts/axes/icon.md +48 -0
- package/assets/prompts/axes/mode.md +50 -0
- package/assets/prompts/axes/motion.md +77 -0
- package/assets/prompts/axes/palette.md +35 -0
- package/assets/prompts/axes/shape.md +33 -0
- package/assets/prompts/axes/voice.md +54 -0
- package/assets/prompts/components/README.md +84 -0
- package/assets/prompts/components/app-frame.md +94 -0
- package/assets/prompts/components/attachment-chip.md +46 -0
- package/assets/prompts/components/attachment-thumb.md +49 -0
- package/assets/prompts/components/avatar.md +86 -0
- package/assets/prompts/components/badge.md +104 -0
- package/assets/prompts/components/breadcrumb.md +77 -0
- package/assets/prompts/components/button.md +99 -0
- package/assets/prompts/components/callout.md +81 -0
- package/assets/prompts/components/chat-input.md +84 -0
- package/assets/prompts/components/checkbox.md +46 -0
- package/assets/prompts/components/chip.md +84 -0
- package/assets/prompts/components/choice-card.md +127 -0
- package/assets/prompts/components/context-menu.md +145 -0
- package/assets/prompts/components/date-picker.md +104 -0
- package/assets/prompts/components/drawer.md +152 -0
- package/assets/prompts/components/empty-state.md +69 -0
- package/assets/prompts/components/file-icon.md +73 -0
- package/assets/prompts/components/filter-button.md +42 -0
- package/assets/prompts/components/form-field.md +74 -0
- package/assets/prompts/components/gallery-item.md +158 -0
- package/assets/prompts/components/icon-button.md +82 -0
- package/assets/prompts/components/icon.md +68 -0
- package/assets/prompts/components/input.md +95 -0
- package/assets/prompts/components/list-item.md +235 -0
- package/assets/prompts/components/menu-item.md +234 -0
- package/assets/prompts/components/metric-card.md +132 -0
- package/assets/prompts/components/modal.md +131 -0
- package/assets/prompts/components/pagination.md +92 -0
- package/assets/prompts/components/progress-bar.md +61 -0
- package/assets/prompts/components/quotation-bar.md +39 -0
- package/assets/prompts/components/radio.md +41 -0
- package/assets/prompts/components/select.md +104 -0
- package/assets/prompts/components/selectable-card.md +67 -0
- package/assets/prompts/components/shortcut.md +76 -0
- package/assets/prompts/components/sidebar.md +107 -0
- package/assets/prompts/components/slider.md +89 -0
- package/assets/prompts/components/split-button.md +71 -0
- package/assets/prompts/components/stepper.md +93 -0
- package/assets/prompts/components/switch.md +86 -0
- package/assets/prompts/components/table-cell.md +87 -0
- package/assets/prompts/components/table-header.md +157 -0
- package/assets/prompts/components/table-row-edit.md +129 -0
- package/assets/prompts/components/table-row-select.md +82 -0
- package/assets/prompts/components/table-row.md +156 -0
- package/assets/prompts/components/tabs.md +122 -0
- package/assets/prompts/components/textarea.md +105 -0
- package/assets/prompts/components/toast.md +149 -0
- package/assets/prompts/components/tooltip.md +71 -0
- package/assets/prompts/components/topbar.md +148 -0
- package/assets/prompts/primitives/emerge.md +43 -0
- package/assets/prompts/primitives/fade.md +31 -0
- package/assets/prompts/primitives/scale.md +32 -0
- package/assets/prompts/primitives/scroll.md +75 -0
- package/assets/prompts/primitives/slide.md +31 -0
- package/assets/prompts/themes/_SCHEMA.md +135 -0
- package/assets/prompts/themes/_TEMPLATE.md +73 -0
- package/assets/prompts/themes/expressive.md +118 -0
- package/assets/prompts/themes/pure.md +87 -0
- package/assets/prompts/themes/spare.md +73 -0
- package/assets/prompts/tokens/breakpoint.md +29 -0
- package/assets/prompts/tokens/color.md +78 -0
- package/assets/prompts/tokens/radius.md +33 -0
- package/assets/prompts/tokens/shadow.md +35 -0
- package/assets/prompts/tokens/spacing.md +86 -0
- package/assets/prompts/tokens/typography.md +76 -0
- package/assets/prompts/tokens/z-index.md +35 -0
- package/assets/public/expressive.png +0 -0
- package/assets/public/pure.png +0 -0
- package/assets/public/spare.png +0 -0
- package/assets/skill/SKILL.md +36 -0
- package/bin/ctds.js +76 -0
- package/package.json +35 -4
- package/src/commands/init.js +215 -0
- package/src/commands/update.js +275 -0
- package/src/utils/assets.js +78 -0
- package/src/utils/deps.js +51 -0
- package/src/utils/detect.js +47 -0
- package/src/utils/diff.js +52 -0
- package/src/utils/hash.js +16 -0
- package/src/utils/log.js +41 -0
- package/src/utils/meta.js +73 -0
- package/src/utils/prompt.js +28 -0
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
/* Root ─────────────────────────────────────────────────
|
|
2
|
+
세 영역 구조: Header(상단 고정, flex:0) · Body(flex:1, 세로 스크롤) · Footer(하단 고정, flex:0).
|
|
3
|
+
padding-inline은 두지 않음 — Body가 스크롤 컨테이너라, root에 좌우 padding을 두면
|
|
4
|
+
스크롤바가 padding 안쪽에 생겨 "오른쪽 끝에 붙지 않는" 꼴이 됨.
|
|
5
|
+
좌우 여백은 Header/Section/Footer가 각자 담당(two-layer padding rule). */
|
|
6
|
+
.root {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
width: var(--sidebar-w);
|
|
10
|
+
/* 호스트가 어떤 방식으로 높이를 주든(flex stretch · grid cell stretch ·
|
|
11
|
+
명시적 height · min-height만) 그 공간을 꽉 받는다.
|
|
12
|
+
- align-self: stretch는 flex/grid 부모에서 cross-axis를 자동으로 받고,
|
|
13
|
+
- min-height: 0은 자식(Body)의 긴 콘텐츠가 root를 밀어 올리지 못하게 막아서
|
|
14
|
+
Body의 flex:1 + overflow:auto가 올바르게 스크롤 컨테이너가 되게 한다.
|
|
15
|
+
height:100%는 쓰지 않는다 — 부모가 min-height만 가진 경우(데모 showcase)
|
|
16
|
+
percent-height가 auto로 떨어져 Body가 0px로 붕괴한다. */
|
|
17
|
+
align-self: stretch;
|
|
18
|
+
min-height: 0;
|
|
19
|
+
/* padding-block을 root에 두면 Footer 없는 구성에서 Body(flex:1) 아래로
|
|
20
|
+
그 패딩만큼 빈 공간이 남는다. 상/하 숨돌림은 Header/Body/Footer가
|
|
21
|
+
각자 담당(Header padding-block, Body padding-top, Footer padding-block). */
|
|
22
|
+
transition:
|
|
23
|
+
width var(--duration-base) var(--ease-out),
|
|
24
|
+
padding var(--duration-base) var(--ease-out);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.root[data-collapsed] {
|
|
28
|
+
width: var(--sidebar-w-collapsed);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Header / Footer ──────────────────────────────────── */
|
|
32
|
+
.header,
|
|
33
|
+
.footer {
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
gap: var(--space-2);
|
|
37
|
+
min-height: var(--control-h-md);
|
|
38
|
+
flex: 0 0 auto;
|
|
39
|
+
padding-inline: var(--space-4);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.root[data-collapsed] .header,
|
|
43
|
+
.root[data-collapsed] .footer {
|
|
44
|
+
padding-inline: var(--space-2);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.header {
|
|
48
|
+
padding-top: var(--space-3);
|
|
49
|
+
padding-bottom: var(--space-1);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Body — 세로 스크롤 영역.
|
|
53
|
+
여러 개를 두면 각각 독립 스크롤 트랙. flex:1로 남은 공간을 균등 분배.
|
|
54
|
+
상단 fade mask로 Header와 자연스럽게 이어짐 — 하단은 Footer border로 끊음.
|
|
55
|
+
padding-bottom으로 Footer 바로 위에 숨돌릴 여백 — scroll 끝에서 마지막 항목이 border에 치이지 않도록. */
|
|
56
|
+
.body {
|
|
57
|
+
display: flex;
|
|
58
|
+
flex-direction: column;
|
|
59
|
+
gap: var(--space-2);
|
|
60
|
+
flex: 1 1 0;
|
|
61
|
+
min-height: 0;
|
|
62
|
+
overflow-y: auto;
|
|
63
|
+
overflow-x: hidden;
|
|
64
|
+
/* 'none': 스크롤 체인 차단 + 바운스/러버밴드 자체도 억제.
|
|
65
|
+
스크롤이 생길 콘텐츠면 자기 영역에서만 스크롤, 콘텐츠가 짧으면 바운스 없음. */
|
|
66
|
+
overscroll-behavior-y: none;
|
|
67
|
+
padding-top: var(--space-3);
|
|
68
|
+
/* 상단 fade mask — Header와 자연스럽게 이어지도록 스크롤 시작부가 흐려짐.
|
|
69
|
+
하단은 Footer border가 받으므로 fade 불필요.
|
|
70
|
+
#000은 색이 아니라 CSS mask의 "불투명 마커"라 테마 색 토큰으로 치환 불가. */
|
|
71
|
+
mask-image: linear-gradient(
|
|
72
|
+
to bottom,
|
|
73
|
+
transparent 0,
|
|
74
|
+
#000 var(--space-3), /* lint-hardcoded: ignore */
|
|
75
|
+
#000 100% /* lint-hardcoded: ignore */
|
|
76
|
+
);
|
|
77
|
+
-webkit-mask-image: linear-gradient(
|
|
78
|
+
to bottom,
|
|
79
|
+
transparent 0,
|
|
80
|
+
#000 var(--space-3), /* lint-hardcoded: ignore */
|
|
81
|
+
#000 100% /* lint-hardcoded: ignore */
|
|
82
|
+
);
|
|
83
|
+
/* padding-bottom은 두지 않음 — Footer가 있으면 Footer 자체 padding이 받고,
|
|
84
|
+
없으면 콘텐츠가 사이드바 끝까지 자연스럽게 흐르게. */
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Brand ───────────────────────────────────────────────
|
|
88
|
+
symbol은 항상, wordmark는 expanded일 때만 렌더.
|
|
89
|
+
상한선 토큰으로 max-height 강제 — 사용처가 그 안에서 자유롭게 크기 지정.
|
|
90
|
+
자식 svg/img/text 어떤 형태든 잘리지 않고 상한만 존중. */
|
|
91
|
+
.brand {
|
|
92
|
+
display: flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
gap: var(--space-2);
|
|
95
|
+
min-height: var(--control-h-md);
|
|
96
|
+
padding-inline: var(--space-2);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.brandSymbol {
|
|
100
|
+
display: inline-flex;
|
|
101
|
+
align-items: center;
|
|
102
|
+
justify-content: center;
|
|
103
|
+
flex: 0 0 auto;
|
|
104
|
+
max-height: var(--sidebar-brand-symbol-max);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.brandSymbol > * {
|
|
108
|
+
max-height: 100%;
|
|
109
|
+
width: auto;
|
|
110
|
+
height: auto;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.brandWordmark {
|
|
114
|
+
display: inline-flex;
|
|
115
|
+
align-items: center;
|
|
116
|
+
min-width: 0;
|
|
117
|
+
max-height: var(--sidebar-brand-wordmark-max);
|
|
118
|
+
font-family: var(--font-normal);
|
|
119
|
+
font-size: var(--text-base);
|
|
120
|
+
font-weight: var(--font-weight-medium);
|
|
121
|
+
color: var(--fg);
|
|
122
|
+
white-space: nowrap;
|
|
123
|
+
overflow: hidden;
|
|
124
|
+
text-overflow: ellipsis;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.brandWordmark > * {
|
|
128
|
+
max-height: 100%;
|
|
129
|
+
width: auto;
|
|
130
|
+
height: auto;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.footer {
|
|
134
|
+
margin-top: auto;
|
|
135
|
+
padding: var(--space-2) 0;
|
|
136
|
+
border-top: var(--hairline) solid var(--border);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* Profile ──────────────────────────────────────────────
|
|
140
|
+
Footer 내부 사용자 식별 영역. Avatar(lg)+2줄 텍스트.
|
|
141
|
+
좌우 음수 margin으로 footer padding-inline(--space-4) 상쇄 → hover 영역이
|
|
142
|
+
사이드바 좌/우 끝까지 꽉 참. 안쪽 콘텐츠는 padding-inline으로 복원. */
|
|
143
|
+
.profile {
|
|
144
|
+
display: flex;
|
|
145
|
+
align-items: center;
|
|
146
|
+
gap: var(--space-2);
|
|
147
|
+
margin-inline: calc(var(--space-4) * -1);
|
|
148
|
+
padding: var(--space-2) var(--space-4);
|
|
149
|
+
border-radius: 0;
|
|
150
|
+
min-width: 0;
|
|
151
|
+
width: auto;
|
|
152
|
+
cursor: pointer;
|
|
153
|
+
transition: var(--transition-colors);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.profile:hover {
|
|
157
|
+
background: var(--hover);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.profile:focus-visible {
|
|
161
|
+
outline: none;
|
|
162
|
+
background: var(--hover);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.profile[data-collapsed] {
|
|
166
|
+
justify-content: center;
|
|
167
|
+
gap: 0;
|
|
168
|
+
/* collapsed root padding(--space-2)에 맞춰 margin도 축소. */
|
|
169
|
+
margin-inline: calc(var(--space-2) * -1);
|
|
170
|
+
padding-inline: var(--space-2);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.profileBody {
|
|
174
|
+
display: flex;
|
|
175
|
+
flex-direction: column;
|
|
176
|
+
justify-content: center;
|
|
177
|
+
min-width: 0;
|
|
178
|
+
flex: 1 1 auto;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.profileName {
|
|
182
|
+
font-family: var(--label-font);
|
|
183
|
+
font-size: var(--label-sm-size);
|
|
184
|
+
letter-spacing: var(--label-tracking);
|
|
185
|
+
line-height: var(--lh-xs);
|
|
186
|
+
font-weight: var(--font-weight-medium);
|
|
187
|
+
color: var(--fg);
|
|
188
|
+
white-space: nowrap;
|
|
189
|
+
overflow: hidden;
|
|
190
|
+
text-overflow: ellipsis;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.profileSub {
|
|
194
|
+
font-family: var(--label-font);
|
|
195
|
+
font-size: var(--text-xs);
|
|
196
|
+
line-height: var(--lh-xs);
|
|
197
|
+
font-weight: var(--font-weight-regular);
|
|
198
|
+
color: var(--fg-muted);
|
|
199
|
+
white-space: nowrap;
|
|
200
|
+
overflow: hidden;
|
|
201
|
+
text-overflow: ellipsis;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.profileTrailing {
|
|
205
|
+
display: inline-flex;
|
|
206
|
+
align-items: center;
|
|
207
|
+
flex: 0 0 auto;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/* Section ────────────────────────────────────────────
|
|
211
|
+
스크롤 트랙(.body) 안쪽의 "items" 레이어. 좌우 padding은 여기가 담당.
|
|
212
|
+
.body 자체에 두면 스크롤바가 padding 안쪽으로 밀려 좌/우 끝에 안 붙음. */
|
|
213
|
+
.section {
|
|
214
|
+
display: flex;
|
|
215
|
+
flex-direction: column;
|
|
216
|
+
gap: var(--space-1);
|
|
217
|
+
padding-inline: var(--space-4);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.root[data-collapsed] .section {
|
|
221
|
+
padding-inline: var(--space-2);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.sectionItems {
|
|
225
|
+
display: flex;
|
|
226
|
+
flex-direction: column;
|
|
227
|
+
gap: var(--space-0_5);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/* Separator ──────────────────────────────────────────
|
|
231
|
+
스크롤 트랙(.body) 바로 아래 자식. section의 padding-inline과 폭 맞추기 위해
|
|
232
|
+
같은 inline padding을 margin으로 복제 — 라인은 아이템과 좌/우 정렬. */
|
|
233
|
+
.separator {
|
|
234
|
+
height: var(--hairline);
|
|
235
|
+
margin: var(--space-1) var(--space-4);
|
|
236
|
+
background: var(--border);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.root[data-collapsed] .separator {
|
|
240
|
+
margin: var(--space-1) var(--space-2);
|
|
241
|
+
}
|
|
242
|
+
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
createContext,
|
|
5
|
+
forwardRef,
|
|
6
|
+
useContext,
|
|
7
|
+
type HTMLAttributes,
|
|
8
|
+
type ReactNode,
|
|
9
|
+
} from "react";
|
|
10
|
+
|
|
11
|
+
import { Avatar, type AvatarProps } from "../Avatar";
|
|
12
|
+
import { MenuItem, type MenuItemAction } from "../MenuItem";
|
|
13
|
+
import styles from "./Sidebar.module.css";
|
|
14
|
+
|
|
15
|
+
/* Context — collapsed 상태를 하위 Item/Section에 흘려보냄. */
|
|
16
|
+
interface SidebarCtx {
|
|
17
|
+
collapsed: boolean;
|
|
18
|
+
}
|
|
19
|
+
const SidebarContext = createContext<SidebarCtx>({ collapsed: false });
|
|
20
|
+
const useSidebar = () => useContext(SidebarContext);
|
|
21
|
+
|
|
22
|
+
/* Root ─────────────────────────────────────────────── */
|
|
23
|
+
export interface SidebarProps extends HTMLAttributes<HTMLElement> {
|
|
24
|
+
/** true면 icon-only 축소 상태. label 숨기고 폭 축소. */
|
|
25
|
+
collapsed?: boolean;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const SidebarRoot = forwardRef<HTMLElement, SidebarProps>(function SidebarRoot(
|
|
29
|
+
{ collapsed = false, className, children, ...rest },
|
|
30
|
+
ref,
|
|
31
|
+
) {
|
|
32
|
+
const rootClass = [styles.root, className ?? ""].filter(Boolean).join(" ");
|
|
33
|
+
return (
|
|
34
|
+
<SidebarContext.Provider value={{ collapsed }}>
|
|
35
|
+
<nav
|
|
36
|
+
ref={ref}
|
|
37
|
+
className={rootClass}
|
|
38
|
+
data-collapsed={collapsed || undefined}
|
|
39
|
+
aria-label="Sidebar"
|
|
40
|
+
{...rest}
|
|
41
|
+
>
|
|
42
|
+
{children}
|
|
43
|
+
</nav>
|
|
44
|
+
</SidebarContext.Provider>
|
|
45
|
+
);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
/* Header ───────────────────────────────────────────── */
|
|
49
|
+
function SidebarHeader({ children, className, ...rest }: HTMLAttributes<HTMLDivElement>) {
|
|
50
|
+
return (
|
|
51
|
+
<div className={[styles.header, className ?? ""].filter(Boolean).join(" ")} {...rest}>
|
|
52
|
+
{children}
|
|
53
|
+
</div>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Body ─────────────────────────────────────────────────
|
|
58
|
+
Header와 Footer 사이의 세로 스크롤 영역.
|
|
59
|
+
여러 개를 두면 각각 독립적인 스크롤 트랙이 됨. */
|
|
60
|
+
function SidebarBody({ children, className, ...rest }: HTMLAttributes<HTMLDivElement>) {
|
|
61
|
+
return (
|
|
62
|
+
<div className={[styles.body, className ?? ""].filter(Boolean).join(" ")} {...rest}>
|
|
63
|
+
{children}
|
|
64
|
+
</div>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Brand ────────────────────────────────────────────────
|
|
69
|
+
Home 링크 자리. symbol(항상 표시) + wordmark(expanded 시에만).
|
|
70
|
+
wordmark는 ReactNode(로고 SVG) 또는 string(텍스트 워드마크) 아무거나.
|
|
71
|
+
크기는 상한선(--sidebar-brand-symbol-max, --sidebar-brand-wordmark-max)까지
|
|
72
|
+
사용처가 자유롭게 조절 — symbol/wordmark 안에서 own width/height 지정. */
|
|
73
|
+
export interface SidebarBrandProps extends HTMLAttributes<HTMLDivElement> {
|
|
74
|
+
symbol: ReactNode;
|
|
75
|
+
wordmark?: ReactNode;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function SidebarBrand({ symbol, wordmark, className, ...rest }: SidebarBrandProps) {
|
|
79
|
+
const { collapsed } = useSidebar();
|
|
80
|
+
return (
|
|
81
|
+
<div className={[styles.brand, className ?? ""].filter(Boolean).join(" ")} {...rest}>
|
|
82
|
+
<div className={styles.brandSymbol}>{symbol}</div>
|
|
83
|
+
{!collapsed && wordmark && (
|
|
84
|
+
<div className={styles.brandWordmark}>{wordmark}</div>
|
|
85
|
+
)}
|
|
86
|
+
</div>
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* Footer ───────────────────────────────────────────── */
|
|
91
|
+
function SidebarFooter({ children, className, ...rest }: HTMLAttributes<HTMLDivElement>) {
|
|
92
|
+
return (
|
|
93
|
+
<div className={[styles.footer, className ?? ""].filter(Boolean).join(" ")} {...rest}>
|
|
94
|
+
{children}
|
|
95
|
+
</div>
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* Profile ──────────────────────────────────────────────
|
|
100
|
+
사이드바 하단 사용자 식별 영역.
|
|
101
|
+
Avatar(size=md) + name(1행) + sub(1행) 조합.
|
|
102
|
+
collapsed일 땐 Avatar만 노출(aria-label로 접근성 유지).
|
|
103
|
+
사이즈·간격·폰트는 MenuItem md 리듬에 맞춰 통일 — 인라인 스타일로 조립 금지. */
|
|
104
|
+
export interface SidebarProfileProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
105
|
+
name: string;
|
|
106
|
+
sub?: ReactNode;
|
|
107
|
+
/** Avatar에 그대로 패스스루. src/initials/icon/status 등 자유롭게. */
|
|
108
|
+
avatar?: Omit<AvatarProps, "size" | "name" | "alt">;
|
|
109
|
+
/** 오른쪽 끝 보조 UI(IconButton 등). collapsed일 땐 숨김. */
|
|
110
|
+
trailing?: ReactNode;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function SidebarProfile({
|
|
114
|
+
name,
|
|
115
|
+
sub,
|
|
116
|
+
avatar,
|
|
117
|
+
trailing,
|
|
118
|
+
className,
|
|
119
|
+
...rest
|
|
120
|
+
}: SidebarProfileProps) {
|
|
121
|
+
const { collapsed } = useSidebar();
|
|
122
|
+
return (
|
|
123
|
+
<div
|
|
124
|
+
className={[styles.profile, className ?? ""].filter(Boolean).join(" ")}
|
|
125
|
+
data-collapsed={collapsed || undefined}
|
|
126
|
+
title={collapsed ? name : undefined}
|
|
127
|
+
{...rest}
|
|
128
|
+
>
|
|
129
|
+
<Avatar size="md" name={name} alt={name} {...avatar} />
|
|
130
|
+
{!collapsed && (
|
|
131
|
+
<div className={styles.profileBody}>
|
|
132
|
+
<span className={styles.profileName}>{name}</span>
|
|
133
|
+
{sub && <span className={styles.profileSub}>{sub}</span>}
|
|
134
|
+
</div>
|
|
135
|
+
)}
|
|
136
|
+
{!collapsed && trailing && (
|
|
137
|
+
<div className={styles.profileTrailing}>{trailing}</div>
|
|
138
|
+
)}
|
|
139
|
+
</div>
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* Section ──────────────────────────────────────────── */
|
|
144
|
+
export interface SidebarSectionProps extends HTMLAttributes<HTMLDivElement> {
|
|
145
|
+
/** 섹션 제목. collapsed일 땐 숨김. */
|
|
146
|
+
title?: string;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function SidebarSection({ title, className, children, ...rest }: SidebarSectionProps) {
|
|
150
|
+
const { collapsed } = useSidebar();
|
|
151
|
+
return (
|
|
152
|
+
<div
|
|
153
|
+
className={[styles.section, className ?? ""].filter(Boolean).join(" ")}
|
|
154
|
+
role="group"
|
|
155
|
+
aria-label={title}
|
|
156
|
+
{...rest}
|
|
157
|
+
>
|
|
158
|
+
{title && !collapsed && (
|
|
159
|
+
<MenuItem variant="section" size="sm">
|
|
160
|
+
{title}
|
|
161
|
+
</MenuItem>
|
|
162
|
+
)}
|
|
163
|
+
<div className={styles.sectionItems}>{children}</div>
|
|
164
|
+
</div>
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* Separator ────────────────────────────────────────── */
|
|
169
|
+
function SidebarSeparator({ className, ...rest }: HTMLAttributes<HTMLDivElement>) {
|
|
170
|
+
return (
|
|
171
|
+
<div
|
|
172
|
+
role="separator"
|
|
173
|
+
className={[styles.separator, className ?? ""].filter(Boolean).join(" ")}
|
|
174
|
+
{...rest}
|
|
175
|
+
/>
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/* Item ─────────────────────────────────────────────── */
|
|
180
|
+
export interface SidebarItemProps {
|
|
181
|
+
/** 왼쪽 아이콘. Icon 컴포넌트 인스턴스. */
|
|
182
|
+
icon?: ReactNode;
|
|
183
|
+
/** 항목 라벨. collapsed일 땐 aria-label로만 남고 시각적으로 숨김. */
|
|
184
|
+
label: string;
|
|
185
|
+
/** 현재 라우트/선택. MenuItem의 active와 동일. */
|
|
186
|
+
active?: boolean;
|
|
187
|
+
/** 오른쪽 배지/카운트/보조 UI. collapsed일 땐 숨김. */
|
|
188
|
+
trailing?: ReactNode;
|
|
189
|
+
/** 오른쪽 끝 단축키 힌트. collapsed일 땐 숨김. */
|
|
190
|
+
shortcut?: string;
|
|
191
|
+
/** 서브메뉴 화살표. */
|
|
192
|
+
hasSubmenu?: boolean;
|
|
193
|
+
/** 비활성. */
|
|
194
|
+
disabled?: boolean;
|
|
195
|
+
/** Radix Slot 위임 — <Link>, <a> 등 감싸기용. */
|
|
196
|
+
asChild?: boolean;
|
|
197
|
+
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
198
|
+
children?: ReactNode;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
const SidebarItem = forwardRef<HTMLDivElement, SidebarItemProps>(function SidebarItem(
|
|
202
|
+
{
|
|
203
|
+
icon,
|
|
204
|
+
label,
|
|
205
|
+
active,
|
|
206
|
+
trailing,
|
|
207
|
+
shortcut,
|
|
208
|
+
hasSubmenu,
|
|
209
|
+
disabled,
|
|
210
|
+
asChild,
|
|
211
|
+
onClick,
|
|
212
|
+
children,
|
|
213
|
+
},
|
|
214
|
+
ref,
|
|
215
|
+
) {
|
|
216
|
+
const { collapsed } = useSidebar();
|
|
217
|
+
|
|
218
|
+
const leadingActions: MenuItemAction[] = icon ? [icon] : [];
|
|
219
|
+
const trailingActions: MenuItemAction[] = trailing ? [trailing] : [];
|
|
220
|
+
|
|
221
|
+
return (
|
|
222
|
+
<MenuItem
|
|
223
|
+
ref={ref}
|
|
224
|
+
size="md"
|
|
225
|
+
active={active}
|
|
226
|
+
disabled={disabled}
|
|
227
|
+
asChild={asChild}
|
|
228
|
+
collapsed={collapsed}
|
|
229
|
+
leadingActions={leadingActions}
|
|
230
|
+
trailingActions={trailingActions}
|
|
231
|
+
shortcut={shortcut}
|
|
232
|
+
hasSubmenu={hasSubmenu}
|
|
233
|
+
onClick={onClick}
|
|
234
|
+
aria-label={collapsed ? label : undefined}
|
|
235
|
+
title={collapsed ? label : undefined}
|
|
236
|
+
>
|
|
237
|
+
{children ?? label}
|
|
238
|
+
</MenuItem>
|
|
239
|
+
);
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
/* Compound export ──────────────────────────────────── */
|
|
243
|
+
type SidebarComponent = typeof SidebarRoot & {
|
|
244
|
+
Header: typeof SidebarHeader;
|
|
245
|
+
Body: typeof SidebarBody;
|
|
246
|
+
Brand: typeof SidebarBrand;
|
|
247
|
+
Footer: typeof SidebarFooter;
|
|
248
|
+
Profile: typeof SidebarProfile;
|
|
249
|
+
Section: typeof SidebarSection;
|
|
250
|
+
Separator: typeof SidebarSeparator;
|
|
251
|
+
Item: typeof SidebarItem;
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
const Sidebar = SidebarRoot as SidebarComponent;
|
|
255
|
+
Sidebar.Header = SidebarHeader;
|
|
256
|
+
Sidebar.Body = SidebarBody;
|
|
257
|
+
Sidebar.Brand = SidebarBrand;
|
|
258
|
+
Sidebar.Footer = SidebarFooter;
|
|
259
|
+
Sidebar.Profile = SidebarProfile;
|
|
260
|
+
Sidebar.Section = SidebarSection;
|
|
261
|
+
Sidebar.Separator = SidebarSeparator;
|
|
262
|
+
Sidebar.Item = SidebarItem;
|
|
263
|
+
|
|
264
|
+
export { Sidebar };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/* Root ─────────────────────────────────────────────────
|
|
2
|
+
rail · panel 모두 세로 전체를 차지하고,
|
|
3
|
+
내부에서 Header(sticky top) · Body(scroll) · Footer(sticky bottom) 3영역으로 나뉨. */
|
|
4
|
+
.root {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: row;
|
|
7
|
+
align-items: stretch;
|
|
8
|
+
height: 100%;
|
|
9
|
+
min-height: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* Rail (좁은 좌측) ──────────────────────────────────────
|
|
13
|
+
3영역: Brand(top) · Items(scroll) · Footer(bottom). */
|
|
14
|
+
.rail {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
align-items: center;
|
|
18
|
+
gap: var(--space-1);
|
|
19
|
+
width: calc(var(--control-h-lg) + var(--space-3) * 2);
|
|
20
|
+
padding-block: var(--space-3);
|
|
21
|
+
padding-inline: var(--space-2);
|
|
22
|
+
height: 100%;
|
|
23
|
+
min-height: 0;
|
|
24
|
+
border-right: var(--hairline) solid var(--border);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.railBrand {
|
|
28
|
+
display: inline-flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
min-height: var(--control-h-lg);
|
|
32
|
+
max-height: var(--sidebar-brand-symbol-max);
|
|
33
|
+
padding-bottom: var(--space-3);
|
|
34
|
+
flex: 0 0 auto;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.railBrand > * {
|
|
38
|
+
max-height: 100%;
|
|
39
|
+
width: auto;
|
|
40
|
+
height: auto;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.railItems {
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
gap: var(--space-1);
|
|
47
|
+
flex: 1 1 0;
|
|
48
|
+
min-height: 0;
|
|
49
|
+
overflow-y: auto;
|
|
50
|
+
overscroll-behavior: contain;
|
|
51
|
+
width: 100%;
|
|
52
|
+
align-items: center;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.railFooter {
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
gap: var(--space-1);
|
|
59
|
+
align-items: center;
|
|
60
|
+
padding-top: var(--space-3);
|
|
61
|
+
flex: 0 0 auto;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Panel (넓은 우측) ────────────────────────────────────
|
|
65
|
+
3영역: Header(sticky top) · Body(scroll) · Footer(sticky bottom). */
|
|
66
|
+
.panel {
|
|
67
|
+
display: flex;
|
|
68
|
+
flex-direction: column;
|
|
69
|
+
width: var(--sidebar-w);
|
|
70
|
+
height: 100%;
|
|
71
|
+
min-height: 0;
|
|
72
|
+
padding: var(--space-3);
|
|
73
|
+
gap: var(--space-3);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.panelHeader {
|
|
77
|
+
display: flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
justify-content: space-between;
|
|
80
|
+
gap: var(--space-2);
|
|
81
|
+
padding: 0 var(--space-1);
|
|
82
|
+
flex: 0 0 auto;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.panelTitle {
|
|
86
|
+
font-family: var(--font-normal);
|
|
87
|
+
font-size: var(--text-xl);
|
|
88
|
+
font-weight: var(--font-weight-semibold);
|
|
89
|
+
color: var(--fg);
|
|
90
|
+
min-width: 0;
|
|
91
|
+
overflow: hidden;
|
|
92
|
+
text-overflow: ellipsis;
|
|
93
|
+
white-space: nowrap;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.panelBody {
|
|
97
|
+
display: flex;
|
|
98
|
+
flex-direction: column;
|
|
99
|
+
gap: var(--space-3);
|
|
100
|
+
overflow-y: auto;
|
|
101
|
+
overscroll-behavior: contain;
|
|
102
|
+
min-height: 0;
|
|
103
|
+
flex: 1 1 0;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.panelFooter {
|
|
107
|
+
display: flex;
|
|
108
|
+
align-items: center;
|
|
109
|
+
gap: var(--space-2);
|
|
110
|
+
padding-top: var(--space-2);
|
|
111
|
+
border-top: var(--hairline) solid var(--border);
|
|
112
|
+
flex: 0 0 auto;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* Section ──────────────────────────────────────────── */
|
|
116
|
+
.section {
|
|
117
|
+
display: flex;
|
|
118
|
+
flex-direction: column;
|
|
119
|
+
gap: var(--space-1);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.sectionItems {
|
|
123
|
+
display: flex;
|
|
124
|
+
flex-direction: column;
|
|
125
|
+
gap: var(--space-0_5);
|
|
126
|
+
}
|