@conscience-technology/ctds 0.0.0-stage → 0.1.1
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 +254 -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,222 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
forwardRef,
|
|
5
|
+
useState,
|
|
6
|
+
type HTMLAttributes,
|
|
7
|
+
type ReactNode,
|
|
8
|
+
} from "react";
|
|
9
|
+
|
|
10
|
+
import { IconButton } from "../IconButton";
|
|
11
|
+
import { Icon } from "../Icon";
|
|
12
|
+
import { MenuItem } from "../MenuItem";
|
|
13
|
+
import styles from "./SidebarSplit.module.css";
|
|
14
|
+
|
|
15
|
+
/* Rail 항목 하나. rail에 icon-only 버튼으로 표시되고,
|
|
16
|
+
활성화되면 오른쪽 panel에 panel 콘텐츠가 노출된다. */
|
|
17
|
+
export interface SidebarSplitSection {
|
|
18
|
+
id: string;
|
|
19
|
+
/** rail의 icon-only 버튼 아이콘. Icon 인스턴스. */
|
|
20
|
+
icon: ReactNode;
|
|
21
|
+
/** rail 버튼 aria-label + panel 헤더 타이틀. */
|
|
22
|
+
label: string;
|
|
23
|
+
/** panel 콘텐츠 (검색 인풋, 섹션, 서브 메뉴 등). */
|
|
24
|
+
panel: ReactNode;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface SidebarSplitProps extends HTMLAttributes<HTMLElement> {
|
|
28
|
+
/** rail 상단 로고 심볼. */
|
|
29
|
+
brand?: ReactNode;
|
|
30
|
+
/** rail 하단 footer 액션(설정/프로필 등). */
|
|
31
|
+
railFooter?: ReactNode;
|
|
32
|
+
/** rail에 나열될 섹션 목록. */
|
|
33
|
+
sections: SidebarSplitSection[];
|
|
34
|
+
/** panel 하단 고정 영역(프로필/설정 등). 모든 섹션에서 공통. */
|
|
35
|
+
panelFooter?: ReactNode;
|
|
36
|
+
/** controlled 활성 섹션 id. */
|
|
37
|
+
activeId?: string;
|
|
38
|
+
defaultActiveId?: string;
|
|
39
|
+
onActiveChange?: (id: string) => void;
|
|
40
|
+
/** controlled: panel 접힘 여부. false면 panel 숨김, rail만 노출. */
|
|
41
|
+
panelOpen?: boolean;
|
|
42
|
+
defaultPanelOpen?: boolean;
|
|
43
|
+
onPanelOpenChange?: (open: boolean) => void;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const SidebarSplit = forwardRef<HTMLElement, SidebarSplitProps>(function SidebarSplit(
|
|
47
|
+
{
|
|
48
|
+
brand,
|
|
49
|
+
railFooter,
|
|
50
|
+
sections,
|
|
51
|
+
panelFooter,
|
|
52
|
+
activeId: activeIdProp,
|
|
53
|
+
defaultActiveId,
|
|
54
|
+
onActiveChange,
|
|
55
|
+
panelOpen: panelOpenProp,
|
|
56
|
+
defaultPanelOpen = true,
|
|
57
|
+
onPanelOpenChange,
|
|
58
|
+
className,
|
|
59
|
+
...rest
|
|
60
|
+
},
|
|
61
|
+
ref,
|
|
62
|
+
) {
|
|
63
|
+
const [activeIdState, setActiveIdState] = useState<string>(
|
|
64
|
+
defaultActiveId ?? sections[0]?.id ?? "",
|
|
65
|
+
);
|
|
66
|
+
const activeId = activeIdProp ?? activeIdState;
|
|
67
|
+
|
|
68
|
+
const [panelOpenState, setPanelOpenState] = useState<boolean>(defaultPanelOpen);
|
|
69
|
+
const panelOpen = panelOpenProp ?? panelOpenState;
|
|
70
|
+
|
|
71
|
+
const setActive = (id: string) => {
|
|
72
|
+
setActiveIdState(id);
|
|
73
|
+
onActiveChange?.(id);
|
|
74
|
+
};
|
|
75
|
+
const setPanelOpen = (v: boolean) => {
|
|
76
|
+
setPanelOpenState(v);
|
|
77
|
+
onPanelOpenChange?.(v);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const active = sections.find((s) => s.id === activeId);
|
|
81
|
+
|
|
82
|
+
const rootClass = [styles.root, className ?? ""].filter(Boolean).join(" ");
|
|
83
|
+
|
|
84
|
+
return (
|
|
85
|
+
<nav
|
|
86
|
+
ref={ref}
|
|
87
|
+
className={rootClass}
|
|
88
|
+
data-panel-open={panelOpen || undefined}
|
|
89
|
+
aria-label="Sidebar"
|
|
90
|
+
{...rest}
|
|
91
|
+
>
|
|
92
|
+
{/* Rail ─────────────────────────────────────── */}
|
|
93
|
+
<div className={styles.rail}>
|
|
94
|
+
{brand && <div className={styles.railBrand}>{brand}</div>}
|
|
95
|
+
|
|
96
|
+
<div className={styles.railItems} role="tablist" aria-orientation="vertical">
|
|
97
|
+
{sections.map((s) => (
|
|
98
|
+
<IconButton
|
|
99
|
+
key={s.id}
|
|
100
|
+
variant={s.id === activeId ? "secondary" : "ghost"}
|
|
101
|
+
size="lg"
|
|
102
|
+
icon={s.icon}
|
|
103
|
+
aria-label={s.label}
|
|
104
|
+
aria-selected={s.id === activeId}
|
|
105
|
+
role="tab"
|
|
106
|
+
onClick={() => {
|
|
107
|
+
setActive(s.id);
|
|
108
|
+
if (!panelOpen) setPanelOpen(true);
|
|
109
|
+
}}
|
|
110
|
+
/>
|
|
111
|
+
))}
|
|
112
|
+
</div>
|
|
113
|
+
|
|
114
|
+
{railFooter && <div className={styles.railFooter}>{railFooter}</div>}
|
|
115
|
+
</div>
|
|
116
|
+
|
|
117
|
+
{/* Panel ──────────────────────────────────────
|
|
118
|
+
3영역: Header(sticky top) · Body(scroll) · Footer(sticky bottom). */}
|
|
119
|
+
{panelOpen && active && (
|
|
120
|
+
<div className={styles.panel} role="tabpanel" aria-label={active.label}>
|
|
121
|
+
<div className={styles.panelHeader}>
|
|
122
|
+
<div className={styles.panelTitle}>{active.label}</div>
|
|
123
|
+
<IconButton
|
|
124
|
+
variant="ghost"
|
|
125
|
+
size="sm"
|
|
126
|
+
icon={<Icon name="caret-left" />}
|
|
127
|
+
aria-label="사이드바 접기"
|
|
128
|
+
onClick={() => setPanelOpen(false)}
|
|
129
|
+
/>
|
|
130
|
+
</div>
|
|
131
|
+
<div className={styles.panelBody}>{active.panel}</div>
|
|
132
|
+
{panelFooter && <div className={styles.panelFooter}>{panelFooter}</div>}
|
|
133
|
+
</div>
|
|
134
|
+
)}
|
|
135
|
+
</nav>
|
|
136
|
+
);
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
/* Panel 내부에서 쓰이는 sub-nav 조각들 ─────────────── */
|
|
140
|
+
|
|
141
|
+
function PanelSection({
|
|
142
|
+
title,
|
|
143
|
+
children,
|
|
144
|
+
className,
|
|
145
|
+
...rest
|
|
146
|
+
}: HTMLAttributes<HTMLDivElement> & { title?: string }) {
|
|
147
|
+
return (
|
|
148
|
+
<div
|
|
149
|
+
className={[styles.section, className ?? ""].filter(Boolean).join(" ")}
|
|
150
|
+
role="group"
|
|
151
|
+
aria-label={title}
|
|
152
|
+
{...rest}
|
|
153
|
+
>
|
|
154
|
+
{title && (
|
|
155
|
+
<MenuItem variant="section" size="sm">
|
|
156
|
+
{title}
|
|
157
|
+
</MenuItem>
|
|
158
|
+
)}
|
|
159
|
+
<div className={styles.sectionItems}>{children}</div>
|
|
160
|
+
</div>
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* Panel 안에서 쓰는 MenuItem wrapper. Sidebar.Item과 동일한 shape. */
|
|
165
|
+
export interface PanelItemProps {
|
|
166
|
+
icon?: ReactNode;
|
|
167
|
+
label: string;
|
|
168
|
+
active?: boolean;
|
|
169
|
+
trailing?: ReactNode;
|
|
170
|
+
shortcut?: string;
|
|
171
|
+
hasSubmenu?: boolean;
|
|
172
|
+
disabled?: boolean;
|
|
173
|
+
asChild?: boolean;
|
|
174
|
+
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
175
|
+
children?: ReactNode;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
const PanelItem = forwardRef<HTMLDivElement, PanelItemProps>(function PanelItem(
|
|
179
|
+
{
|
|
180
|
+
icon,
|
|
181
|
+
label,
|
|
182
|
+
active,
|
|
183
|
+
trailing,
|
|
184
|
+
shortcut,
|
|
185
|
+
hasSubmenu,
|
|
186
|
+
disabled,
|
|
187
|
+
asChild,
|
|
188
|
+
onClick,
|
|
189
|
+
children,
|
|
190
|
+
},
|
|
191
|
+
ref,
|
|
192
|
+
) {
|
|
193
|
+
return (
|
|
194
|
+
<MenuItem
|
|
195
|
+
ref={ref}
|
|
196
|
+
size="md"
|
|
197
|
+
active={active}
|
|
198
|
+
disabled={disabled}
|
|
199
|
+
asChild={asChild}
|
|
200
|
+
leadingActions={icon ? [icon] : []}
|
|
201
|
+
trailingActions={trailing ? [trailing] : []}
|
|
202
|
+
shortcut={shortcut}
|
|
203
|
+
hasSubmenu={hasSubmenu}
|
|
204
|
+
onClick={onClick}
|
|
205
|
+
aria-label={label}
|
|
206
|
+
>
|
|
207
|
+
{children ?? label}
|
|
208
|
+
</MenuItem>
|
|
209
|
+
);
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
/* Compound export ──────────────────────────────────── */
|
|
213
|
+
type SidebarSplitComponent = typeof SidebarSplit & {
|
|
214
|
+
Section: typeof PanelSection;
|
|
215
|
+
Item: typeof PanelItem;
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
const _SidebarSplit = SidebarSplit as SidebarSplitComponent;
|
|
219
|
+
_SidebarSplit.Section = PanelSection;
|
|
220
|
+
_SidebarSplit.Item = PanelItem;
|
|
221
|
+
|
|
222
|
+
export { _SidebarSplit as SidebarSplit };
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/* Slider — 미니멀 스펙: 트랙 + 채워진 부분 + 썸.
|
|
2
|
+
native input[type=range]를 커스텀 스타일링. 값 라벨·마크·range는 없음.
|
|
3
|
+
|
|
4
|
+
축 반응:
|
|
5
|
+
─ Density → --control-h-* (썸 크기), --space-scale (트랙 두께)
|
|
6
|
+
─ Shape → 트랙·썸 radius
|
|
7
|
+
─ Motion → hover·drag 상태 전환 duration/easing
|
|
8
|
+
─ Palette → 채워진 트랙 --primary
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
.root {
|
|
12
|
+
--_track-h: var(--space-1);
|
|
13
|
+
--_thumb: var(--control-h-md);
|
|
14
|
+
appearance: none;
|
|
15
|
+
-webkit-appearance: none;
|
|
16
|
+
width: 100%;
|
|
17
|
+
background: transparent;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
padding: 0;
|
|
20
|
+
margin: 0;
|
|
21
|
+
/* 썸 높이만큼 hit area 확보 */
|
|
22
|
+
height: var(--_thumb);
|
|
23
|
+
--_track-fg: var(--primary);
|
|
24
|
+
--_track-bg: var(--bg-muted);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Sizes ─ Button/Tabs와 동일한 control-h 스케일 */
|
|
28
|
+
.size_sm { --_thumb: var(--control-h-sm); --_track-h: var(--space-0_5); }
|
|
29
|
+
.size_md { --_thumb: var(--control-h-md); --_track-h: var(--space-1); }
|
|
30
|
+
.size_lg { --_thumb: var(--control-h-lg); --_track-h: var(--space-1_5); }
|
|
31
|
+
|
|
32
|
+
/* Focus ring — 썸에만 */
|
|
33
|
+
.root:focus { outline: none; }
|
|
34
|
+
|
|
35
|
+
/* WebKit / Blink ──────────────────────────────────────────── */
|
|
36
|
+
.root::-webkit-slider-runnable-track {
|
|
37
|
+
height: var(--_track-h);
|
|
38
|
+
border-radius: var(--radius-full);
|
|
39
|
+
background:
|
|
40
|
+
linear-gradient(
|
|
41
|
+
to right,
|
|
42
|
+
var(--_track-fg) 0%,
|
|
43
|
+
var(--_track-fg) var(--slider-pct, 0%),
|
|
44
|
+
var(--_track-bg) var(--slider-pct, 0%),
|
|
45
|
+
var(--_track-bg) 100%
|
|
46
|
+
);
|
|
47
|
+
border: var(--hairline) solid var(--border);
|
|
48
|
+
transition: background var(--duration-fast) var(--ease-out);
|
|
49
|
+
}
|
|
50
|
+
.root::-webkit-slider-thumb {
|
|
51
|
+
-webkit-appearance: none;
|
|
52
|
+
appearance: none;
|
|
53
|
+
width: var(--_thumb);
|
|
54
|
+
height: var(--_thumb);
|
|
55
|
+
border-radius: var(--radius-full);
|
|
56
|
+
background: var(--bg);
|
|
57
|
+
border: var(--hairline) solid var(--border-strong);
|
|
58
|
+
box-shadow: var(--shadow-xs);
|
|
59
|
+
/* 트랙 중앙 정렬: (track-h - thumb) / 2, border 두께 보정 */
|
|
60
|
+
margin-top: calc((var(--_track-h) - var(--_thumb)) / 2 - var(--hairline));
|
|
61
|
+
transition:
|
|
62
|
+
box-shadow var(--duration-fast) var(--ease-out),
|
|
63
|
+
transform var(--duration-fast) var(--ease-out),
|
|
64
|
+
border-color var(--duration-fast) var(--ease-out);
|
|
65
|
+
cursor: grab;
|
|
66
|
+
}
|
|
67
|
+
.root:hover:not(:disabled)::-webkit-slider-thumb {
|
|
68
|
+
border-color: var(--primary);
|
|
69
|
+
}
|
|
70
|
+
.root:focus-visible::-webkit-slider-thumb {
|
|
71
|
+
box-shadow: var(--ring-shadow);
|
|
72
|
+
border-color: var(--primary);
|
|
73
|
+
}
|
|
74
|
+
.root:active:not(:disabled)::-webkit-slider-thumb {
|
|
75
|
+
cursor: grabbing;
|
|
76
|
+
transform: scale(1.05);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* Firefox ─────────────────────────────────────────────────── */
|
|
80
|
+
.root::-moz-range-track {
|
|
81
|
+
height: var(--_track-h);
|
|
82
|
+
border-radius: var(--radius-full);
|
|
83
|
+
background: var(--_track-bg);
|
|
84
|
+
border: var(--hairline) solid var(--border);
|
|
85
|
+
}
|
|
86
|
+
.root::-moz-range-progress {
|
|
87
|
+
height: var(--_track-h);
|
|
88
|
+
border-radius: var(--radius-full);
|
|
89
|
+
background: var(--_track-fg);
|
|
90
|
+
}
|
|
91
|
+
.root::-moz-range-thumb {
|
|
92
|
+
width: var(--_thumb);
|
|
93
|
+
height: var(--_thumb);
|
|
94
|
+
border-radius: var(--radius-full);
|
|
95
|
+
background: var(--bg);
|
|
96
|
+
border: var(--hairline) solid var(--border-strong);
|
|
97
|
+
box-shadow: var(--shadow-xs);
|
|
98
|
+
transition:
|
|
99
|
+
box-shadow var(--duration-fast) var(--ease-out),
|
|
100
|
+
transform var(--duration-fast) var(--ease-out),
|
|
101
|
+
border-color var(--duration-fast) var(--ease-out);
|
|
102
|
+
cursor: grab;
|
|
103
|
+
}
|
|
104
|
+
.root:hover:not(:disabled)::-moz-range-thumb {
|
|
105
|
+
border-color: var(--primary);
|
|
106
|
+
}
|
|
107
|
+
.root:focus-visible::-moz-range-thumb {
|
|
108
|
+
box-shadow: var(--ring-shadow);
|
|
109
|
+
border-color: var(--primary);
|
|
110
|
+
}
|
|
111
|
+
.root:active:not(:disabled)::-moz-range-thumb {
|
|
112
|
+
cursor: grabbing;
|
|
113
|
+
transform: scale(1.05);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* Disabled */
|
|
117
|
+
.root:disabled {
|
|
118
|
+
cursor: not-allowed;
|
|
119
|
+
opacity: 0.5;
|
|
120
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
forwardRef,
|
|
5
|
+
useCallback,
|
|
6
|
+
useMemo,
|
|
7
|
+
type CSSProperties,
|
|
8
|
+
type InputHTMLAttributes,
|
|
9
|
+
} from "react";
|
|
10
|
+
|
|
11
|
+
import styles from "./Slider.module.css";
|
|
12
|
+
|
|
13
|
+
export type SliderSize = "sm" | "md" | "lg";
|
|
14
|
+
|
|
15
|
+
export type SliderProps = Omit<
|
|
16
|
+
InputHTMLAttributes<HTMLInputElement>,
|
|
17
|
+
"type" | "size" | "value" | "defaultValue"
|
|
18
|
+
> & {
|
|
19
|
+
value?: number;
|
|
20
|
+
defaultValue?: number;
|
|
21
|
+
min?: number;
|
|
22
|
+
max?: number;
|
|
23
|
+
step?: number;
|
|
24
|
+
size?: SliderSize;
|
|
25
|
+
onValueChange?: (value: number) => void;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const Slider = forwardRef<HTMLInputElement, SliderProps>(
|
|
29
|
+
(
|
|
30
|
+
{
|
|
31
|
+
className,
|
|
32
|
+
value,
|
|
33
|
+
defaultValue,
|
|
34
|
+
min = 0,
|
|
35
|
+
max = 100,
|
|
36
|
+
step = 1,
|
|
37
|
+
size = "md",
|
|
38
|
+
onValueChange,
|
|
39
|
+
onChange,
|
|
40
|
+
style,
|
|
41
|
+
...rest
|
|
42
|
+
},
|
|
43
|
+
ref,
|
|
44
|
+
) => {
|
|
45
|
+
const current = value ?? defaultValue ?? min;
|
|
46
|
+
const denom = max - min || 1;
|
|
47
|
+
const pct = useMemo(
|
|
48
|
+
() => Math.max(0, Math.min(100, ((current - min) / denom) * 100)),
|
|
49
|
+
[current, min, denom],
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
const handleChange = useCallback(
|
|
53
|
+
(e: React.ChangeEvent<HTMLInputElement>) => {
|
|
54
|
+
onChange?.(e);
|
|
55
|
+
if (!e.defaultPrevented) onValueChange?.(Number(e.target.value));
|
|
56
|
+
},
|
|
57
|
+
[onChange, onValueChange],
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
const cls = [styles.root, styles[`size_${size}`], className ?? ""]
|
|
61
|
+
.filter(Boolean)
|
|
62
|
+
.join(" ");
|
|
63
|
+
|
|
64
|
+
const mergedStyle: CSSProperties = {
|
|
65
|
+
...style,
|
|
66
|
+
["--slider-pct" as string]: `${pct}%`,
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<input
|
|
71
|
+
ref={ref}
|
|
72
|
+
type="range"
|
|
73
|
+
className={cls}
|
|
74
|
+
value={value}
|
|
75
|
+
defaultValue={value === undefined ? defaultValue : undefined}
|
|
76
|
+
min={min}
|
|
77
|
+
max={max}
|
|
78
|
+
step={step}
|
|
79
|
+
onChange={handleChange}
|
|
80
|
+
style={mergedStyle}
|
|
81
|
+
{...rest}
|
|
82
|
+
/>
|
|
83
|
+
);
|
|
84
|
+
},
|
|
85
|
+
);
|
|
86
|
+
Slider.displayName = "Slider";
|
|
87
|
+
|
|
88
|
+
export { Slider };
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/* SplitButton — 붙어있지만 클릭 영역이 분리된 2-part 버튼.
|
|
2
|
+
구조: <div.root> [ button.main | span.divider | button.menu ]
|
|
3
|
+
|
|
4
|
+
설계:
|
|
5
|
+
- 배경·보더는 root가 담당 → main/menu 사이 시각적 갭 없음
|
|
6
|
+
- hover 시 각 part의 배경만 얹혀서 절반 강조
|
|
7
|
+
- divider는 root 위에 얹히는 hairline (currentColor × 알파)
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
.root {
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
align-items: stretch;
|
|
13
|
+
border-radius: var(--radius-sm);
|
|
14
|
+
border: 1px solid transparent;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
/* Button과 outer 높이를 맞추기 위해 root가 height를 잡고 border를 안쪽으로 포함.
|
|
17
|
+
size class(sm/md/lg)에서 --split-h를 세팅한다. */
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
height: var(--split-h);
|
|
20
|
+
transition:
|
|
21
|
+
background var(--duration-slow) var(--ease-out),
|
|
22
|
+
border-color var(--duration-slow) var(--ease-out);
|
|
23
|
+
/* variant class가 background / border-color / color 설정 */
|
|
24
|
+
}
|
|
25
|
+
.root.fullWidth {
|
|
26
|
+
display: flex;
|
|
27
|
+
width: 100%;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* 공통 part — 배경/보더 없음. 크기와 hover 강조만. */
|
|
31
|
+
.part {
|
|
32
|
+
display: inline-flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
gap: var(--space-2);
|
|
36
|
+
font-family: var(--font-normal);
|
|
37
|
+
font-weight: var(--font-weight-medium);
|
|
38
|
+
line-height: var(--lh-tight);
|
|
39
|
+
letter-spacing: var(--label-tracking);
|
|
40
|
+
white-space: nowrap;
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
user-select: none;
|
|
43
|
+
background: transparent;
|
|
44
|
+
color: inherit;
|
|
45
|
+
border: 0;
|
|
46
|
+
padding: 0;
|
|
47
|
+
transition:
|
|
48
|
+
background var(--duration-slow) var(--ease-out),
|
|
49
|
+
color var(--duration-slow) var(--ease-out),
|
|
50
|
+
box-shadow var(--duration-fast) var(--ease-out);
|
|
51
|
+
}
|
|
52
|
+
.part:focus-visible {
|
|
53
|
+
outline: none;
|
|
54
|
+
box-shadow: var(--ring-shadow);
|
|
55
|
+
position: relative;
|
|
56
|
+
z-index: var(--z-docked);
|
|
57
|
+
}
|
|
58
|
+
/* Press feedback: 반쪽 컨테이너는 제자리, 아이콘·라벨만 미세하게 눌림.
|
|
59
|
+
- transform은 emphasized 대신 ease-out 계열 사용 (스프링 오버슛이 press엔 뚝딱 느낌)
|
|
60
|
+
- 진입·해제 모두 base 지속 → 대칭 부드러움
|
|
61
|
+
- opacity(hover)는 emphasized로 감각적 변화 유지 */
|
|
62
|
+
.part .icon,
|
|
63
|
+
.part .label {
|
|
64
|
+
transition:
|
|
65
|
+
transform var(--duration-base) var(--ease-out);
|
|
66
|
+
}
|
|
67
|
+
.part .icon {
|
|
68
|
+
transition:
|
|
69
|
+
transform var(--duration-base) var(--ease-out),
|
|
70
|
+
opacity var(--duration-slow) var(--ease-out);
|
|
71
|
+
}
|
|
72
|
+
.part:active:not(:disabled) .icon,
|
|
73
|
+
.part:active:not(:disabled) .label {
|
|
74
|
+
transform: translateY(var(--space-0_5));
|
|
75
|
+
}
|
|
76
|
+
/* Hover 시 아이콘 밝기 상승 (0.75 → 1.0). "살아나는" 미세한 반응. */
|
|
77
|
+
.part:hover:not(:disabled) .icon {
|
|
78
|
+
opacity: 1;
|
|
79
|
+
}
|
|
80
|
+
.part:disabled,
|
|
81
|
+
.part[data-loading="true"] {
|
|
82
|
+
cursor: not-allowed;
|
|
83
|
+
opacity: 0.5;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.main { flex: 1 1 auto; }
|
|
87
|
+
.menu { flex: 0 0 auto; }
|
|
88
|
+
|
|
89
|
+
/* Sizes — Button과 동일 토큰. root가 --split-h를 잡고 part는 stretch로 채움.
|
|
90
|
+
(part에 height를 걸면 border 두께가 outer에 더해져 Button보다 2px 커지므로 root에 몰아둔다.) */
|
|
91
|
+
.sm { --split-h: var(--control-h-sm); --btn-icon-size: var(--space-4); }
|
|
92
|
+
.sm .part { font-size: var(--text-xs); gap: var(--space-1_5); }
|
|
93
|
+
.sm .main { padding-inline: var(--space-2); }
|
|
94
|
+
.sm .menu { padding-inline: var(--space-1_5); }
|
|
95
|
+
|
|
96
|
+
.md { --split-h: var(--control-h-md); --btn-icon-size: var(--space-4); }
|
|
97
|
+
.md .part { font-size: var(--text-sm); gap: var(--space-1); }
|
|
98
|
+
.md .main { padding-inline: var(--space-2); }
|
|
99
|
+
.md .menu { padding-inline: var(--space-1_5); }
|
|
100
|
+
|
|
101
|
+
.lg { --split-h: var(--control-h-lg); --btn-icon-size: var(--space-4); }
|
|
102
|
+
.lg .part { font-size: var(--text-sm); gap: var(--space-1_5); }
|
|
103
|
+
.lg .main { padding-inline: var(--space-4); }
|
|
104
|
+
.lg .menu { padding-inline: var(--space-2); }
|
|
105
|
+
|
|
106
|
+
/* Divider — 세로 hairline, 위아래 여백 유지.
|
|
107
|
+
각 variant가 --split-divider로 색·알파 결정 (아이콘/텍스트와 별개 톤). */
|
|
108
|
+
.divider {
|
|
109
|
+
align-self: stretch;
|
|
110
|
+
margin-block: var(--space-2);
|
|
111
|
+
border-left: 1px solid var(--split-divider, currentColor);
|
|
112
|
+
pointer-events: none;
|
|
113
|
+
flex: 0 0 auto;
|
|
114
|
+
transition: border-color var(--duration-slow) var(--ease-out);
|
|
115
|
+
}
|
|
116
|
+
/* 어느 한쪽이 hover되면 divider를 살짝 옅게 → 하나의 덩어리로 뭉치는 느낌. */
|
|
117
|
+
.root:has(.part:hover:not(:disabled)) .divider {
|
|
118
|
+
border-color: transparent;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* Icon / label slots.
|
|
122
|
+
슬롯을 고정 정사각으로 강제 → SVG viewBox 여백이 라이브러리·아이콘마다
|
|
123
|
+
달라도 슬롯 밖 레이아웃은 균일. SVG는 슬롯을 100% 채움. */
|
|
124
|
+
.icon {
|
|
125
|
+
display: inline-flex;
|
|
126
|
+
align-items: center;
|
|
127
|
+
justify-content: center;
|
|
128
|
+
flex-shrink: 0;
|
|
129
|
+
width: var(--btn-icon-size);
|
|
130
|
+
height: var(--btn-icon-size);
|
|
131
|
+
opacity: 0.75;
|
|
132
|
+
}
|
|
133
|
+
.icon > svg {
|
|
134
|
+
width: 100%;
|
|
135
|
+
height: 100%;
|
|
136
|
+
display: block;
|
|
137
|
+
}
|
|
138
|
+
.label {
|
|
139
|
+
display: inline-flex;
|
|
140
|
+
align-items: center;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* Variants ─────────────────────────────────────────────────────
|
|
144
|
+
root가 배경·보더·기본 색 결정. --split-divider는 divider 전용.
|
|
145
|
+
part hover는 반투명 오버레이로 절반만 강조. */
|
|
146
|
+
|
|
147
|
+
/* primary — 채움 브랜드. 텍스트 --bg. divider·hover는 시맨틱 토큰으로. */
|
|
148
|
+
.primary {
|
|
149
|
+
background: var(--primary);
|
|
150
|
+
border-color: var(--primary);
|
|
151
|
+
color: var(--bg);
|
|
152
|
+
--split-divider: var(--border);
|
|
153
|
+
}
|
|
154
|
+
.primary .part:hover:not(:disabled) {
|
|
155
|
+
background: var(--primary-hover);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* inverse — 흑백 반전. hover는 fg-strong으로 통째 갈아엎음. */
|
|
159
|
+
.inverse {
|
|
160
|
+
background: var(--fg);
|
|
161
|
+
border-color: var(--fg);
|
|
162
|
+
color: var(--bg);
|
|
163
|
+
--split-divider: var(--border);
|
|
164
|
+
}
|
|
165
|
+
.inverse .part:hover:not(:disabled) {
|
|
166
|
+
background: var(--fg-strong);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* secondary — primary 8% 표면 + primary 텍스트. hover는 --secondary-bg-hover 시맨틱. */
|
|
170
|
+
.secondary {
|
|
171
|
+
background: var(--secondary-bg);
|
|
172
|
+
border-color: transparent;
|
|
173
|
+
color: var(--secondary-fg);
|
|
174
|
+
--split-divider: var(--border);
|
|
175
|
+
}
|
|
176
|
+
.secondary .part:hover:not(:disabled) {
|
|
177
|
+
background: var(--secondary-bg-hover);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/* outline — 경계만 */
|
|
181
|
+
.outline {
|
|
182
|
+
background: transparent;
|
|
183
|
+
border-color: var(--border);
|
|
184
|
+
color: var(--fg);
|
|
185
|
+
--split-divider: var(--border);
|
|
186
|
+
}
|
|
187
|
+
.outline .part:hover:not(:disabled) {
|
|
188
|
+
background: var(--hover);
|
|
189
|
+
}
|
|
190
|
+
|