@conscience-technology/ovenn 0.7.4 → 0.7.6
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 +43 -4
- package/assets/components/AIMessage/AIMessage.module.css +10 -0
- package/assets/components/AIMessage/AIMessage.tsx +6 -2
- package/assets/components/AttachmentThumb/AttachmentThumb.tsx +1 -0
- package/assets/components/Breadcrumb/Breadcrumb.module.css +82 -23
- package/assets/components/Breadcrumb/Breadcrumb.tsx +44 -26
- package/assets/components/Breadcrumb/index.ts +1 -0
- package/assets/components/Button/Button.module.css +2 -4
- package/assets/components/Callout/Callout.module.css +44 -18
- package/assets/components/Callout/Callout.tsx +9 -4
- package/assets/components/Callout/index.ts +1 -1
- package/assets/components/Canvas/Canvas.module.css +13 -0
- package/assets/components/Canvas/Canvas.tsx +378 -94
- package/assets/components/Canvas/clipboard.ts +5 -1
- package/assets/components/Canvas/collision.ts +5 -1
- package/assets/components/Canvas/graph.ts +14 -5
- package/assets/components/Canvas/history.ts +11 -4
- package/assets/components/Canvas/index.ts +2 -1
- package/assets/components/Canvas/types.ts +36 -1
- package/assets/components/CanvasEdge/tokens.css +14 -1
- package/assets/components/CanvasNode/tokens.css +13 -10
- package/assets/components/ChatComposer/ChatComposer.tsx +1 -1
- package/assets/components/ChatInput/ChatInput.tsx +1 -1
- package/assets/components/ColorField/ColorField.module.css +6 -1
- package/assets/components/ColorPicker/ColorPicker.module.css +3 -0
- package/assets/components/CommandPalette/CommandPalette.module.css +114 -0
- package/assets/components/CommandPalette/CommandPalette.tsx +206 -21
- package/assets/components/CommandPalette/index.ts +1 -0
- package/assets/components/Drawer/Drawer.module.css +30 -0
- package/assets/components/Drawer/Drawer.tsx +75 -16
- package/assets/components/Drawer/index.ts +1 -0
- package/assets/components/FileIcon/FileIcon.tsx +1 -0
- package/assets/components/FileIcon/fileExtMap.ts +1 -0
- package/assets/components/Icon/Icon.tsx +3 -0
- package/assets/components/Input/Input.module.css +3 -3
- package/assets/components/Onboarding/OnboardingAxisPanel.tsx +1 -1
- package/assets/components/Onboarding/OnboardingPage.tsx +13 -11
- package/assets/components/Onboarding/actions.ts +9 -9
- package/assets/components/Select/Select.module.css +1 -1
- package/assets/components/SocialLoginButton/SocialLoginButton.module.css +198 -0
- package/assets/components/SocialLoginButton/SocialLoginButton.tsx +86 -0
- package/assets/components/SocialLoginButton/assets/amazon.svg +1 -0
- package/assets/components/SocialLoginButton/assets/apple.svg +3 -0
- package/assets/components/SocialLoginButton/assets/discord.svg +3 -0
- package/assets/components/SocialLoginButton/assets/facebook-white.png +0 -0
- package/assets/components/SocialLoginButton/assets/facebook.png +0 -0
- package/assets/components/SocialLoginButton/assets/github.svg +3 -0
- package/assets/components/SocialLoginButton/assets/google-mark.png +0 -0
- package/assets/components/SocialLoginButton/assets/kakao.svg +3 -0
- package/assets/components/SocialLoginButton/assets/line-icon.png +0 -0
- package/assets/components/SocialLoginButton/assets/line-white.png +0 -0
- package/assets/components/SocialLoginButton/assets/linkedin-white.png +0 -0
- package/assets/components/SocialLoginButton/assets/linkedin.png +0 -0
- package/assets/components/SocialLoginButton/assets/microsoft.svg +6 -0
- package/assets/components/SocialLoginButton/assets/naver.png +0 -0
- package/assets/components/SocialLoginButton/assets/slack.svg +17 -0
- package/assets/components/SocialLoginButton/assets/spotify.svg +3 -0
- package/assets/components/SocialLoginButton/assets/twitch.svg +21 -0
- package/assets/components/SocialLoginButton/assets/wechat.png +0 -0
- package/assets/components/SocialLoginButton/assets/x.svg +3 -0
- package/assets/components/SocialLoginButton/index.ts +2 -0
- package/assets/components/SocialLoginButton/provider-tokens.css +30 -0
- package/assets/components/SocialLoginButton/providers.ts +23 -0
- package/assets/components/TableRowEdit/TableRowEdit.tsx +2 -2
- package/assets/components/ThemeController.tsx +2 -2
- package/assets/components/TimelineView/TimelineView.tsx +4 -2
- package/assets/components/Tooltip/Tooltip.module.css +1 -0
- package/assets/components/_data.ts +1 -1
- package/assets/components/_utils.css +1 -0
- package/assets/components/component-registry.json +30 -1
- package/assets/components/index.ts +1 -0
- package/assets/components/side-effect-css.d.ts +5 -0
- package/assets/components/themeBootScript.ts +7 -1
- package/assets/components/tokens.css +14 -6
- package/assets/prompts/ASSEMBLY.md +4 -0
- package/assets/prompts/CASCADE.md +2 -2
- package/assets/prompts/CATALOG.md +2 -1
- package/assets/prompts/PRINCIPLES.md +4 -8
- package/assets/prompts/RULES.md +19 -1
- package/assets/prompts/SLOTS.md +2 -4
- package/assets/prompts/WORKFLOW_DESIGN.md +0 -4
- package/assets/prompts/axes/icon.md +1 -1
- package/assets/prompts/axes/material.md +4 -4
- package/assets/prompts/axes/motion.md +1 -1
- package/assets/prompts/axes/shape.md +2 -2
- package/assets/prompts/axes/voice.md +1 -1
- package/assets/prompts/components/_variants.md +4 -4
- package/assets/prompts/components/accordion.md +4 -4
- package/assets/prompts/components/ai-message.md +6 -2
- package/assets/prompts/components/attachment-item.md +2 -2
- package/assets/prompts/components/breadcrumb.md +11 -5
- package/assets/prompts/components/button.md +3 -3
- package/assets/prompts/components/callout.md +8 -4
- package/assets/prompts/components/canvas-edge.md +1 -1
- package/assets/prompts/components/canvas-node.md +1 -1
- package/assets/prompts/components/canvas.md +24 -8
- package/assets/prompts/components/card.md +1 -2
- package/assets/prompts/components/chart-bar.md +1 -1
- package/assets/prompts/components/chat-input.md +1 -1
- package/assets/prompts/components/checkbox.md +5 -5
- package/assets/prompts/components/color-field.md +2 -2
- package/assets/prompts/components/command-palette.md +55 -47
- package/assets/prompts/components/context-menu.md +5 -5
- package/assets/prompts/components/date-picker.md +2 -2
- package/assets/prompts/components/drawer.md +17 -3
- package/assets/prompts/components/dropdown-menu.md +3 -3
- package/assets/prompts/components/event-list-item.md +4 -4
- package/assets/prompts/components/file-icon.md +2 -2
- package/assets/prompts/components/gallery-item.md +1 -1
- package/assets/prompts/components/hint.md +3 -3
- package/assets/prompts/components/kanban.md +2 -3
- package/assets/prompts/components/list-item.md +12 -12
- package/assets/prompts/components/menu-item.md +2 -2
- package/assets/prompts/components/message-table.md +4 -4
- package/assets/prompts/components/onboarding.md +3 -3
- package/assets/prompts/components/page-header.md +6 -7
- package/assets/prompts/components/quotation-bar.md +1 -1
- package/assets/prompts/components/select.md +1 -1
- package/assets/prompts/components/shortcut.md +3 -3
- package/assets/prompts/components/sidebar.md +5 -4
- package/assets/prompts/components/social-login-button.md +117 -0
- package/assets/prompts/components/stepper.md +1 -1
- package/assets/prompts/components/tab-strip.md +2 -2
- package/assets/prompts/components/table-row-edit.md +6 -6
- package/assets/prompts/components/table-row-select.md +1 -1
- package/assets/prompts/components/tabs.md +5 -2
- package/assets/prompts/components/textarea.md +1 -1
- package/assets/prompts/components/toast.md +3 -3
- package/assets/prompts/components/tooltip.md +3 -3
- package/assets/prompts/components/topbar.md +1 -1
- package/assets/prompts/design-examples/ai-chat-full-page.png +0 -0
- package/assets/prompts/design-examples/catalog.json +9 -9
- package/assets/prompts/design-examples/sources/ai-chat-full-page/ChatExperience.module.css +37 -1
- package/assets/prompts/design-examples/sources/ai-chat-full-page/ChatExperience.tsx +113 -18
- package/assets/prompts/design-examples/sources/ai-chat-full-page/FullPageChat.tsx +2 -2
- package/assets/prompts/design-examples/sources/ai-chat-full-page/REFERENCE.md +3 -1
- package/assets/prompts/design-examples/sources/ai-chat-full-page/useChatDemo.ts +99 -51
- package/assets/prompts/primitives/scroll.md +1 -1
- package/assets/prompts/recipes/README.md +5 -6
- package/assets/prompts/recipes/meta-line.md +2 -2
- package/assets/prompts/recipes/page-header.md +2 -2
- package/assets/prompts/recipes/section-header.md +1 -1
- package/assets/prompts/themes/_SCHEMA.md +2 -2
- package/assets/prompts/tokens/material.md +5 -2
- package/assets/prompts/tokens/radius.md +1 -1
- package/assets/prompts/use-cases/chat-chat-input.md +382 -74
- package/assets/prompts/use-cases/data-list-item.md +38 -431
- package/assets/prompts/use-cases/feedback-drawer.md +112 -33
- package/assets/prompts/use-cases/overlay-command-palette.md +2004 -0
- package/assets/prompts/use-cases/structure-canvas.md +1016 -0
- package/assets/skills/ovenn-validate/SKILL.md +1 -1
- package/assets/skills/ovenn-validate/scripts/lib/component-usage.js +7 -1
- package/assets/skills/ovenn-validate/scripts/lib/engine.mjs +105 -0
- package/assets/skills/ovenn-validate/scripts/lib/engine.test.mjs +46 -0
- package/assets/skills/ovenn-validate/scripts/lib/source-utils.mjs +5 -3
- package/assets/skills/ovenn-validate/scripts/rules/doc-sync.mjs +28 -5
- package/assets/skills/ovenn-validate/scripts/rules/doc-sync.test.mjs +15 -0
- package/assets/skills/ovenn-validate/scripts/rules/ghost-tokens.mjs +7 -0
- package/assets/skills/ovenn-validate/scripts/rules/hardcoded.mjs +61 -30
- package/assets/skills/ovenn-validate/scripts/rules/memory-rules.mjs +7 -4
- package/assets/skills/ovenn-validate/scripts/rules/memory-rules.test.mjs +3 -0
- package/assets/skills/ovenn-validate/scripts/validate.mjs +8 -136
- package/assets/skills/ovenn-wireframe/SKILL.md +1 -1
- package/bin/ovenn.js +8 -0
- package/package.json +2 -2
- package/src/commands/check.js +70 -0
- package/src/commands/info.js +32 -7
- package/src/commands/init.js +26 -30
- package/src/commands/setup-checks.js +80 -0
- package/src/commands/update.js +90 -18
- package/src/data/ctds-releases.json +1 -0
- package/src/utils/assets.js +5 -0
- package/src/utils/component-usage.js +7 -1
- package/src/utils/design-workflow.js +6 -2
- package/src/utils/doctor.js +7 -1
- package/src/utils/legacy-ctds.js +169 -0
- package/src/utils/managed-assets.js +16 -3
- package/src/utils/route.js +17 -0
- package/src/utils/rules-context.js +91 -0
- package/src/utils/update-transaction.js +16 -3
- package/assets/prompts/FEEDBACK_PROCESS.md +0 -19
- package/assets/prompts/GUIDE.md +0 -307
- package/assets/prompts/MEMORY.md +0 -202
- package/assets/prompts/TEMPLATE_PREVIEWS.md +0 -21
- package/assets/prompts/components/README.md +0 -84
|
@@ -36,14 +36,20 @@ import {
|
|
|
36
36
|
useEffect,
|
|
37
37
|
useMemo,
|
|
38
38
|
useState,
|
|
39
|
+
useCallback,
|
|
40
|
+
useRef,
|
|
39
41
|
type ComponentPropsWithoutRef,
|
|
40
42
|
type Dispatch,
|
|
41
43
|
type ReactNode,
|
|
42
44
|
type SetStateAction,
|
|
45
|
+
type RefObject,
|
|
43
46
|
} from "react";
|
|
44
47
|
|
|
45
48
|
import { Icon, IconAxisProvider, useIconAxis, type IconName } from "../Icon";
|
|
46
49
|
import { MenuItem, type MenuItemAction, type MenuItemSize } from "../MenuItem";
|
|
50
|
+
import { EmptyState } from "../EmptyState";
|
|
51
|
+
import { Button, type ButtonProps } from "../Button";
|
|
52
|
+
import { Shortcut } from "../Shortcut";
|
|
47
53
|
import { useTheme } from "../ThemeController";
|
|
48
54
|
import styles from "./CommandPalette.module.css";
|
|
49
55
|
|
|
@@ -52,11 +58,13 @@ const CP_LABELS = {
|
|
|
52
58
|
label: "명령 검색",
|
|
53
59
|
placeholder: "검색",
|
|
54
60
|
empty: "결과가 없어요",
|
|
61
|
+
emptyDescription: "다른 검색어를 입력해 보세요.",
|
|
55
62
|
},
|
|
56
63
|
en: {
|
|
57
64
|
label: "Search commands",
|
|
58
65
|
placeholder: "Search",
|
|
59
66
|
empty: "No results",
|
|
67
|
+
emptyDescription: "Try a different search.",
|
|
60
68
|
},
|
|
61
69
|
} as const;
|
|
62
70
|
|
|
@@ -68,16 +76,27 @@ const SizeContext = createContext<MenuItemSize>("md");
|
|
|
68
76
|
uncontrolled면 Input onValueChange로 수집. */
|
|
69
77
|
const QueryContext = createContext<string>("");
|
|
70
78
|
const SetQueryContext = createContext<Dispatch<SetStateAction<string>> | null>(null);
|
|
79
|
+
const TriggerContext = createContext<RefObject<HTMLButtonElement | null> | null>(null);
|
|
71
80
|
|
|
72
81
|
/* Root ─────────────────────────────────────────────────────────── */
|
|
73
82
|
|
|
74
|
-
export interface CommandPaletteProps {
|
|
83
|
+
export interface CommandPaletteProps extends Pick<ComponentPropsWithoutRef<typeof Command>, "value" | "defaultValue" | "onValueChange" | "onKeyDown"> {
|
|
75
84
|
open: boolean;
|
|
76
85
|
onOpenChange: (open: boolean) => void;
|
|
77
86
|
/** 리스트 아이템 밀도. 기본 md. */
|
|
78
87
|
size?: MenuItemSize;
|
|
79
88
|
/** 스크린리더 라벨. 시각적으로 숨겨진 다이얼로그 타이틀. */
|
|
80
89
|
label?: string;
|
|
90
|
+
/** 문서나 상주 검색 영역에서는 inline으로 표시한다. */
|
|
91
|
+
presentation?: "dialog" | "inline" | "expand";
|
|
92
|
+
/** 다이얼로그 밖에 표시할 CommandPalette.Trigger. expand에서는 모션의 시작점. */
|
|
93
|
+
trigger?: ReactNode;
|
|
94
|
+
/** 배경 딤. 탑바에서 확장하는 검색은 false 권장. */
|
|
95
|
+
dimmed?: boolean;
|
|
96
|
+
className?: string;
|
|
97
|
+
onCloseAutoFocus?: ComponentPropsWithoutRef<typeof RadixDialog.Content>["onCloseAutoFocus"];
|
|
98
|
+
/** 하위 화면에서는 preventDefault 후 뒤로 가기로 연결할 수 있다. */
|
|
99
|
+
onEscapeKeyDown?: ComponentPropsWithoutRef<typeof RadixDialog.Content>["onEscapeKeyDown"];
|
|
81
100
|
/**
|
|
82
101
|
* cmdk 커스텀 필터. (value, search, keywords) → 0~1 점수.
|
|
83
102
|
* 생략 시 cmdk 기본 scorer. 라벨 매치 가산 등 외부에서 랭킹을 제어하고 싶을 때 전달.
|
|
@@ -87,63 +106,223 @@ export interface CommandPaletteProps {
|
|
|
87
106
|
}
|
|
88
107
|
|
|
89
108
|
const Root = forwardRef<HTMLDivElement, CommandPaletteProps>(function CommandPalette(
|
|
90
|
-
{ open, onOpenChange, size = "md", label: labelProp, filter, children
|
|
109
|
+
{ open, onOpenChange, size = "md", label: labelProp, filter, children,
|
|
110
|
+
presentation = "dialog", trigger, dimmed = true, className, onCloseAutoFocus, onEscapeKeyDown, value, defaultValue, onValueChange, onKeyDown },
|
|
91
111
|
ref,
|
|
92
112
|
) {
|
|
93
113
|
const { lang } = useTheme();
|
|
94
114
|
const label = labelProp ?? CP_LABELS[lang].label;
|
|
95
115
|
const iconAxis = useIconAxis();
|
|
96
116
|
const materialScope = useMaterialScope();
|
|
117
|
+
const triggerRef = useRef<HTMLButtonElement>(null);
|
|
118
|
+
const surfaceRef = useRef<HTMLDivElement | null>(null);
|
|
119
|
+
const [mountedSurface, setMountedSurface] = useState<HTMLDivElement | null>(null);
|
|
120
|
+
const geometryFrame = useRef(0);
|
|
121
|
+
const positionExpansion = useCallback((surface: HTMLDivElement) => {
|
|
122
|
+
const anchor = triggerRef.current;
|
|
123
|
+
if (presentation !== "expand") return;
|
|
124
|
+
if (!anchor) {
|
|
125
|
+
surface.dataset.presentation = "dialog";
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
const rect = anchor.getBoundingClientRect();
|
|
129
|
+
if (!rect.width || rect.bottom <= 0 || rect.top >= window.innerHeight) {
|
|
130
|
+
surface.dataset.presentation = "dialog";
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
surface.dataset.presentation = "expand";
|
|
134
|
+
const css = getComputedStyle(surface);
|
|
135
|
+
// scroll-margin resolves calc-based density tokens to CSS pixels.
|
|
136
|
+
const gutter = parseFloat(css.scrollMarginTop);
|
|
137
|
+
const maxWidth = parseFloat(css.maxWidth);
|
|
138
|
+
const viewport = window.visualViewport;
|
|
139
|
+
const viewportLeft = viewport?.offsetLeft ?? 0;
|
|
140
|
+
const viewportTop = viewport?.offsetTop ?? 0;
|
|
141
|
+
const viewportWidth = viewport?.width ?? window.innerWidth;
|
|
142
|
+
const viewportHeight = viewport?.height ?? window.innerHeight;
|
|
143
|
+
const width = Math.min(maxWidth, viewportWidth - gutter * 2);
|
|
144
|
+
const left = Math.max(viewportLeft + gutter, Math.min(rect.left + rect.width / 2 - width / 2, viewportLeft + viewportWidth - gutter - width));
|
|
145
|
+
const top = Math.max(viewportTop + gutter, Math.min(rect.top, viewportTop + viewportHeight - gutter - Math.min(surface.scrollHeight, viewportHeight - gutter * 2)));
|
|
146
|
+
surface.style.setProperty("--expand-left", `${left}px`);
|
|
147
|
+
surface.style.setProperty("--expand-top", `${top}px`);
|
|
148
|
+
surface.style.setProperty("--expand-width", `${width}px`);
|
|
149
|
+
surface.style.setProperty("--expand-max-height", `${viewportTop + viewportHeight - top - gutter}px`);
|
|
150
|
+
surface.style.setProperty("--expand-from-left", `${rect.left}px`);
|
|
151
|
+
surface.style.setProperty("--expand-from-top", `${rect.top}px`);
|
|
152
|
+
surface.style.setProperty("--expand-from-width", `${rect.width}px`);
|
|
153
|
+
surface.style.setProperty("--expand-from-height", `${rect.height}px`);
|
|
154
|
+
// Measure the resting surface, rather than an intermediate animation frame.
|
|
155
|
+
surface.style.animation = "none";
|
|
156
|
+
surface.style.setProperty("--expand-height", `${surface.getBoundingClientRect().height}px`);
|
|
157
|
+
surface.style.removeProperty("animation");
|
|
158
|
+
}, [presentation]);
|
|
159
|
+
const surfaceHandle = useCallback((node: HTMLDivElement | null) => {
|
|
160
|
+
cancelAnimationFrame(geometryFrame.current);
|
|
161
|
+
surfaceRef.current = node;
|
|
162
|
+
setMountedSurface(node);
|
|
163
|
+
if (typeof ref === "function") ref(node);
|
|
164
|
+
else if (ref) ref.current = node;
|
|
165
|
+
if (node && presentation === "expand") {
|
|
166
|
+
// cmdk settles its initial empty/result state in descendant layout effects.
|
|
167
|
+
// Measure after those updates, before showing the first expansion frame.
|
|
168
|
+
geometryFrame.current = requestAnimationFrame(() => {
|
|
169
|
+
if (surfaceRef.current !== node || node.dataset.state !== "open") return;
|
|
170
|
+
positionExpansion(node);
|
|
171
|
+
node.dataset.expansionReady = "true";
|
|
172
|
+
node.querySelector<HTMLInputElement>("[cmdk-input]")?.focus({ preventScroll: true });
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
}, [ref, positionExpansion, presentation]);
|
|
176
|
+
const captureCloseFrame = useCallback((surface: HTMLDivElement) => {
|
|
177
|
+
const rect = surface.getBoundingClientRect();
|
|
178
|
+
surface.style.setProperty("--expand-close-left", `${rect.left}px`);
|
|
179
|
+
surface.style.setProperty("--expand-close-top", `${rect.top}px`);
|
|
180
|
+
surface.style.setProperty("--expand-close-width", `${rect.width}px`);
|
|
181
|
+
surface.style.setProperty("--expand-close-height", `${rect.height}px`);
|
|
182
|
+
surface.style.setProperty("--expand-close-opacity", getComputedStyle(surface).opacity);
|
|
183
|
+
const anchor = triggerRef.current?.getBoundingClientRect();
|
|
184
|
+
if (anchor) {
|
|
185
|
+
surface.style.setProperty("--expand-from-left", `${anchor.left}px`);
|
|
186
|
+
surface.style.setProperty("--expand-from-top", `${anchor.top}px`);
|
|
187
|
+
surface.style.setProperty("--expand-from-width", `${anchor.width}px`);
|
|
188
|
+
surface.style.setProperty("--expand-from-height", `${anchor.height}px`);
|
|
189
|
+
}
|
|
190
|
+
}, []);
|
|
191
|
+
const changeOpen = useCallback((next: boolean) => {
|
|
192
|
+
if (!next && presentation === "expand" && surfaceRef.current) captureCloseFrame(surfaceRef.current);
|
|
193
|
+
onOpenChange(next);
|
|
194
|
+
}, [onOpenChange, presentation, captureCloseFrame]);
|
|
195
|
+
useEffect(() => {
|
|
196
|
+
if (!open || presentation !== "expand") return;
|
|
197
|
+
const reposition = () => {
|
|
198
|
+
if (surfaceRef.current) positionExpansion(surfaceRef.current);
|
|
199
|
+
};
|
|
200
|
+
window.addEventListener("resize", reposition);
|
|
201
|
+
window.visualViewport?.addEventListener("resize", reposition);
|
|
202
|
+
return () => {
|
|
203
|
+
window.removeEventListener("resize", reposition);
|
|
204
|
+
window.visualViewport?.removeEventListener("resize", reposition);
|
|
205
|
+
};
|
|
206
|
+
}, [open, presentation, positionExpansion]);
|
|
97
207
|
/* 쿼리 상태는 cmdk 내부에도 있지만, Highlight 서브컴포넌트가 외부에서 참조하려면
|
|
98
208
|
React 트리 안에 publish가 필요. Input이 onValueChange로 setQuery, Highlight가 subscribe.
|
|
99
209
|
팔레트가 닫히면 쿼리 리셋 — 다시 열 때 이전 쿼리가 남지 않게. */
|
|
100
210
|
const [query, setQuery] = useState("");
|
|
101
211
|
useEffect(() => {
|
|
102
|
-
|
|
103
|
-
|
|
212
|
+
const surface = mountedSurface;
|
|
213
|
+
if (!open || presentation !== "expand" || !surface) return;
|
|
214
|
+
let frame = 0;
|
|
215
|
+
const trackFrame = () => {
|
|
216
|
+
cancelAnimationFrame(frame);
|
|
217
|
+
if (surface.dataset.state !== "open" || surface.dataset.expansionReady !== "true") return;
|
|
218
|
+
captureCloseFrame(surface);
|
|
219
|
+
if (surface.getAnimations().some((animation) => animation.playState === "running")) {
|
|
220
|
+
frame = requestAnimationFrame(trackFrame);
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
surface.style.setProperty("--expand-height", `${surface.getBoundingClientRect().height}px`);
|
|
224
|
+
};
|
|
225
|
+
const observer = new ResizeObserver(trackFrame);
|
|
226
|
+
observer.observe(surface);
|
|
227
|
+
trackFrame();
|
|
228
|
+
surface.addEventListener("animationstart", trackFrame);
|
|
229
|
+
surface.addEventListener("animationend", trackFrame);
|
|
230
|
+
return () => {
|
|
231
|
+
cancelAnimationFrame(frame);
|
|
232
|
+
observer.disconnect();
|
|
233
|
+
surface.removeEventListener("animationstart", trackFrame);
|
|
234
|
+
surface.removeEventListener("animationend", trackFrame);
|
|
235
|
+
};
|
|
236
|
+
}, [open, presentation, mountedSurface, captureCloseFrame]);
|
|
237
|
+
useEffect(() => {
|
|
238
|
+
if (presentation !== "inline" && !open) setQuery("");
|
|
239
|
+
}, [open, presentation]);
|
|
240
|
+
const command = (
|
|
241
|
+
<IconAxisProvider value={iconAxis}>
|
|
242
|
+
<SizeContext.Provider value={size}>
|
|
243
|
+
<QueryContext.Provider value={query}>
|
|
244
|
+
<SetQueryContext.Provider value={setQuery}>
|
|
245
|
+
<Command className={styles.command} label={label} filter={filter}
|
|
246
|
+
value={value} defaultValue={defaultValue} onValueChange={onValueChange} onKeyDown={onKeyDown}>
|
|
247
|
+
{children}
|
|
248
|
+
</Command>
|
|
249
|
+
</SetQueryContext.Provider>
|
|
250
|
+
</QueryContext.Provider>
|
|
251
|
+
</SizeContext.Provider>
|
|
252
|
+
</IconAxisProvider>
|
|
253
|
+
);
|
|
254
|
+
const surfaceClass = [styles.content, className].filter(Boolean).join(" ");
|
|
255
|
+
if (presentation === "inline") {
|
|
256
|
+
return <div ref={ref} data-material={materialScope} data-presentation="inline" className={surfaceClass}>{command}</div>;
|
|
257
|
+
}
|
|
104
258
|
return (
|
|
105
|
-
<RadixDialog.Root open={open} onOpenChange={
|
|
259
|
+
<RadixDialog.Root open={open} onOpenChange={changeOpen}>
|
|
260
|
+
<TriggerContext.Provider value={triggerRef}>{trigger}</TriggerContext.Provider>
|
|
106
261
|
<RadixDialog.Portal>
|
|
107
|
-
<RadixDialog.Overlay data-material={materialScope} className={styles.overlay} />
|
|
262
|
+
<RadixDialog.Overlay data-material={materialScope} data-dimmed={dimmed} className={styles.overlay} />
|
|
108
263
|
<RadixDialog.Content
|
|
109
264
|
data-material={materialScope}
|
|
110
|
-
ref={
|
|
111
|
-
|
|
265
|
+
ref={surfaceHandle}
|
|
266
|
+
data-presentation={presentation === "expand" && !trigger ? "dialog" : presentation}
|
|
267
|
+
className={surfaceClass}
|
|
112
268
|
aria-label={label}
|
|
269
|
+
onCloseAutoFocus={onCloseAutoFocus}
|
|
270
|
+
onEscapeKeyDown={onEscapeKeyDown}
|
|
113
271
|
>
|
|
114
272
|
<RadixDialog.Title className="visually-hidden">{label}</RadixDialog.Title>
|
|
115
|
-
|
|
116
|
-
<SizeContext.Provider value={size}>
|
|
117
|
-
<QueryContext.Provider value={query}>
|
|
118
|
-
<SetQueryContext.Provider value={setQuery}>
|
|
119
|
-
<Command className={styles.command} label={label} filter={filter}>
|
|
120
|
-
{children}
|
|
121
|
-
</Command>
|
|
122
|
-
</SetQueryContext.Provider>
|
|
123
|
-
</QueryContext.Provider>
|
|
124
|
-
</SizeContext.Provider>
|
|
125
|
-
</IconAxisProvider>
|
|
273
|
+
{command}
|
|
126
274
|
</RadixDialog.Content>
|
|
127
275
|
</RadixDialog.Portal>
|
|
128
276
|
</RadixDialog.Root>
|
|
129
277
|
);
|
|
130
278
|
});
|
|
131
279
|
|
|
280
|
+
/* Trigger stays in the topbar while the same search panel opens in a portal. */
|
|
281
|
+
export interface TriggerProps extends Omit<ButtonProps, "leftIcon" | "rightIcon" | "asChild" | "loading"> {
|
|
282
|
+
shortcut?: string | null;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
const Trigger = forwardRef<HTMLButtonElement, TriggerProps>(function CommandPaletteTrigger(
|
|
286
|
+
{ children, shortcut = "⌘K", className, variant = "outline", size = "md", ...rest }, ref,
|
|
287
|
+
) {
|
|
288
|
+
const anchor = useContext(TriggerContext);
|
|
289
|
+
const { lang } = useTheme();
|
|
290
|
+
return (
|
|
291
|
+
<RadixDialog.Trigger asChild>
|
|
292
|
+
<Button {...rest} variant={variant} size={size}
|
|
293
|
+
ref={(node) => {
|
|
294
|
+
if (anchor) anchor.current = node;
|
|
295
|
+
if (typeof ref === "function") ref(node);
|
|
296
|
+
else if (ref) ref.current = node;
|
|
297
|
+
}}
|
|
298
|
+
className={[styles.trigger, className].filter(Boolean).join(" ")}
|
|
299
|
+
leftIcon={<Icon name="search" />}>
|
|
300
|
+
<span className={styles.triggerLabel}>{children ?? CP_LABELS[lang].placeholder}</span>
|
|
301
|
+
{shortcut && <Shortcut className={styles.triggerShortcut}>{shortcut}</Shortcut>}
|
|
302
|
+
</Button>
|
|
303
|
+
</RadixDialog.Trigger>
|
|
304
|
+
);
|
|
305
|
+
});
|
|
306
|
+
|
|
132
307
|
/* Input ────────────────────────────────────────────────────────── */
|
|
133
308
|
|
|
134
309
|
export interface InputProps
|
|
135
310
|
extends Omit<ComponentPropsWithoutRef<typeof Command.Input>, "ref"> {
|
|
136
311
|
/** 좌측 아이콘. 기본 search. null이면 숨김. */
|
|
137
312
|
leadingIcon?: IconName | null;
|
|
313
|
+
trailing?: ReactNode;
|
|
138
314
|
}
|
|
139
315
|
|
|
140
316
|
const InputCmd = forwardRef<HTMLInputElement, InputProps>(function CommandPaletteInput(
|
|
141
|
-
{ className, leadingIcon = "search", placeholder: placeholderProp, onValueChange, ...rest },
|
|
317
|
+
{ className, leadingIcon = "search", trailing, placeholder: placeholderProp, onValueChange, value, ...rest },
|
|
142
318
|
ref,
|
|
143
319
|
) {
|
|
144
320
|
const { lang } = useTheme();
|
|
145
321
|
const placeholder = placeholderProp ?? CP_LABELS[lang].placeholder;
|
|
146
322
|
const setQuery = useContext(SetQueryContext);
|
|
323
|
+
useEffect(() => {
|
|
324
|
+
if (value !== undefined) setQuery?.(value);
|
|
325
|
+
}, [value, setQuery]);
|
|
147
326
|
return (
|
|
148
327
|
<div className={styles.inputRow}>
|
|
149
328
|
{leadingIcon && (
|
|
@@ -153,6 +332,7 @@ const InputCmd = forwardRef<HTMLInputElement, InputProps>(function CommandPalett
|
|
|
153
332
|
)}
|
|
154
333
|
<Command.Input
|
|
155
334
|
ref={ref}
|
|
335
|
+
value={value}
|
|
156
336
|
placeholder={placeholder}
|
|
157
337
|
className={[styles.input, className ?? ""].filter(Boolean).join(" ")}
|
|
158
338
|
onValueChange={(v) => {
|
|
@@ -161,6 +341,7 @@ const InputCmd = forwardRef<HTMLInputElement, InputProps>(function CommandPalett
|
|
|
161
341
|
}}
|
|
162
342
|
{...rest}
|
|
163
343
|
/>
|
|
344
|
+
{trailing}
|
|
164
345
|
</div>
|
|
165
346
|
);
|
|
166
347
|
});
|
|
@@ -192,7 +373,9 @@ const Empty = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<typeof Command
|
|
|
192
373
|
className={[styles.empty, className ?? ""].filter(Boolean).join(" ")}
|
|
193
374
|
{...rest}
|
|
194
375
|
>
|
|
195
|
-
{children
|
|
376
|
+
{children == null || typeof children === "string"
|
|
377
|
+
? <EmptyState size="sm" icon="search" title={children ?? CP_LABELS[lang].empty} description={CP_LABELS[lang].emptyDescription} />
|
|
378
|
+
: children}
|
|
196
379
|
</Command.Empty>
|
|
197
380
|
);
|
|
198
381
|
},
|
|
@@ -402,6 +585,7 @@ const Item = forwardRef<HTMLDivElement, ItemProps>(function CommandPaletteItem(
|
|
|
402
585
|
/* Compound export ──────────────────────────────────────────────── */
|
|
403
586
|
|
|
404
587
|
type CommandPaletteComponent = typeof Root & {
|
|
588
|
+
Trigger: typeof Trigger;
|
|
405
589
|
Input: typeof InputCmd;
|
|
406
590
|
List: typeof List;
|
|
407
591
|
Empty: typeof Empty;
|
|
@@ -413,6 +597,7 @@ type CommandPaletteComponent = typeof Root & {
|
|
|
413
597
|
};
|
|
414
598
|
|
|
415
599
|
const CommandPalette = Root as CommandPaletteComponent;
|
|
600
|
+
CommandPalette.Trigger = Trigger;
|
|
416
601
|
CommandPalette.Input = InputCmd;
|
|
417
602
|
CommandPalette.List = List;
|
|
418
603
|
CommandPalette.Empty = Empty;
|
|
@@ -2,6 +2,7 @@ export { CommandPalette } from "./CommandPalette";
|
|
|
2
2
|
export type {
|
|
3
3
|
CommandPaletteProps,
|
|
4
4
|
InputProps as CommandPaletteInputProps,
|
|
5
|
+
TriggerProps as CommandPaletteTriggerProps,
|
|
5
6
|
GroupProps as CommandPaletteGroupProps,
|
|
6
7
|
ItemProps as CommandPaletteItemProps,
|
|
7
8
|
} from "./CommandPalette";
|
|
@@ -192,3 +192,33 @@
|
|
|
192
192
|
background: var(--material-floating-bg, var(--bg));
|
|
193
193
|
backdrop-filter: var(--material-floating-filter, none);
|
|
194
194
|
}
|
|
195
|
+
|
|
196
|
+
/* Inline participates in the caller's layout below its page chrome. */
|
|
197
|
+
.content[data-placement="inline"] {
|
|
198
|
+
position: relative;
|
|
199
|
+
inset: auto;
|
|
200
|
+
z-index: auto;
|
|
201
|
+
flex-shrink: 0;
|
|
202
|
+
align-self: stretch;
|
|
203
|
+
min-width: 0;
|
|
204
|
+
min-height: 0;
|
|
205
|
+
max-width: 100%;
|
|
206
|
+
border: 0;
|
|
207
|
+
background: var(--bg);
|
|
208
|
+
box-shadow: none;
|
|
209
|
+
backdrop-filter: none;
|
|
210
|
+
will-change: opacity;
|
|
211
|
+
animation-name: drawer-overlay-in;
|
|
212
|
+
}
|
|
213
|
+
.content[data-placement="inline"][data-side="right"] {
|
|
214
|
+
border-inline-start: var(--hairline) solid var(--border);
|
|
215
|
+
}
|
|
216
|
+
.content[data-placement="inline"][data-side="left"] {
|
|
217
|
+
border-inline-end: var(--hairline) solid var(--border);
|
|
218
|
+
}
|
|
219
|
+
.content[data-placement="inline"][data-size="sm"] { width: 33%; }
|
|
220
|
+
.content[data-placement="inline"][data-size="md"] { width: 50%; }
|
|
221
|
+
.content[data-placement="inline"][data-size="lg"] { width: 67%; }
|
|
222
|
+
.content[data-placement="inline"][data-state="closed"] {
|
|
223
|
+
animation-name: drawer-overlay-out;
|
|
224
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { useMaterialScope } from "../materialScope";
|
|
4
4
|
import * as RadixDialog from "@radix-ui/react-dialog";
|
|
5
|
-
import { forwardRef, type ReactNode } from "react";
|
|
5
|
+
import { forwardRef, useRef, type ReactNode } from "react";
|
|
6
6
|
|
|
7
7
|
import { Icon } from "../Icon";
|
|
8
8
|
import { IconButton } from "../IconButton";
|
|
@@ -10,6 +10,7 @@ import { Topbar } from "../Topbar";
|
|
|
10
10
|
|
|
11
11
|
import styles from "./Drawer.module.css";
|
|
12
12
|
|
|
13
|
+
export type DrawerPlacement = "overlay" | "inline";
|
|
13
14
|
export type DrawerSide = "right" | "left";
|
|
14
15
|
export type DrawerSize = "sm" | "md" | "lg";
|
|
15
16
|
export type DrawerBackdrop = "none" | "dim" | "blur";
|
|
@@ -33,9 +34,11 @@ export interface DrawerProps {
|
|
|
33
34
|
dismissLabel?: string;
|
|
34
35
|
/** ESC 키 닫힘 차단. 중요한 확인/저장 중엔 true. */
|
|
35
36
|
disableEscape?: boolean;
|
|
36
|
-
/**
|
|
37
|
+
/** overlay는 화면 위, inline은 호출 위치의 부모 레이아웃 안에 배치. */
|
|
38
|
+
placement?: DrawerPlacement;
|
|
39
|
+
/** 열리는 방향. 기본 right. inline에서는 DOM 순서도 맞춘다. */
|
|
37
40
|
side?: DrawerSide;
|
|
38
|
-
/** 가로 폭. 기본 md =
|
|
41
|
+
/** 가로 폭. 기본 md = 50%. overlay는 뷰포트, inline은 부모 폭 기준. */
|
|
39
42
|
size?: DrawerSize;
|
|
40
43
|
/**
|
|
41
44
|
* 뒤 배경 타입. 바깥 클릭 닫힘 여부와는 **독립**.
|
|
@@ -72,6 +75,7 @@ const DrawerComponent = forwardRef<HTMLDivElement, DrawerProps>(function Drawer(
|
|
|
72
75
|
dismissible = true,
|
|
73
76
|
dismissLabel,
|
|
74
77
|
disableEscape,
|
|
78
|
+
placement = "overlay",
|
|
75
79
|
side = "right",
|
|
76
80
|
size = "md",
|
|
77
81
|
backdrop = "none",
|
|
@@ -84,6 +88,7 @@ const DrawerComponent = forwardRef<HTMLDivElement, DrawerProps>(function Drawer(
|
|
|
84
88
|
open={open}
|
|
85
89
|
onOpenChange={onOpenChange}
|
|
86
90
|
disableEscape={disableEscape}
|
|
91
|
+
placement={placement}
|
|
87
92
|
side={side}
|
|
88
93
|
size={size}
|
|
89
94
|
backdrop={backdrop}
|
|
@@ -108,6 +113,9 @@ export interface DrawerRootProps {
|
|
|
108
113
|
onOpenChange: (open: boolean) => void;
|
|
109
114
|
children: ReactNode;
|
|
110
115
|
disableEscape?: boolean;
|
|
116
|
+
/** overlay는 화면 위, inline은 호출 위치의 부모 레이아웃 안에 배치. */
|
|
117
|
+
placement?: DrawerPlacement;
|
|
118
|
+
/** 열리는 방향. 기본 right. inline에서는 DOM 순서도 맞춘다. */
|
|
111
119
|
side?: DrawerSide;
|
|
112
120
|
size?: DrawerSize;
|
|
113
121
|
backdrop?: DrawerBackdrop;
|
|
@@ -120,6 +128,7 @@ export const DrawerRoot = forwardRef<HTMLDivElement, DrawerRootProps>(function D
|
|
|
120
128
|
onOpenChange,
|
|
121
129
|
children,
|
|
122
130
|
disableEscape,
|
|
131
|
+
placement = "overlay",
|
|
123
132
|
side = "right",
|
|
124
133
|
size = "md",
|
|
125
134
|
backdrop = "none",
|
|
@@ -128,33 +137,83 @@ export const DrawerRoot = forwardRef<HTMLDivElement, DrawerRootProps>(function D
|
|
|
128
137
|
ref,
|
|
129
138
|
) {
|
|
130
139
|
const materialScope = useMaterialScope();
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
<RadixDialog.Overlay data-material={materialScope} className={styles.overlay} data-backdrop={backdrop} />
|
|
137
|
-
)}
|
|
140
|
+
const isInline = placement === "inline";
|
|
141
|
+
const contentRef = useRef<HTMLDivElement | null>(null);
|
|
142
|
+
const previousFocus = useRef<HTMLElement | null>(null);
|
|
143
|
+
const isModal = !isInline && backdrop !== "none";
|
|
144
|
+
const content = (
|
|
138
145
|
<RadixDialog.Content
|
|
139
146
|
data-material={materialScope}
|
|
140
|
-
ref={
|
|
147
|
+
ref={(node) => {
|
|
148
|
+
contentRef.current = node;
|
|
149
|
+
if (typeof ref === "function") return ref(node);
|
|
150
|
+
if (ref) ref.current = node;
|
|
151
|
+
}}
|
|
141
152
|
className={styles.content}
|
|
153
|
+
data-placement={placement}
|
|
142
154
|
data-side={side}
|
|
143
|
-
data-backdrop={backdrop}
|
|
155
|
+
data-backdrop={isInline ? "none" : backdrop}
|
|
144
156
|
data-size={size}
|
|
157
|
+
onKeyDown={(e) => {
|
|
158
|
+
// Radix loops Dialog focus even in non-modal mode. Inline panels
|
|
159
|
+
// must let Tab continue into the surrounding page at either end.
|
|
160
|
+
if (!isInline || e.defaultPrevented || e.key !== "Tab" || e.altKey || e.ctrlKey || e.metaKey) return;
|
|
161
|
+
const panel = e.currentTarget;
|
|
162
|
+
const candidates = Array.from(document.querySelectorAll<HTMLElement>(
|
|
163
|
+
'a[href], area[href], button, input, select, textarea, summary, iframe, audio[controls], video[controls], [tabindex], [contenteditable="true"]',
|
|
164
|
+
)).filter((node) => node.tabIndex >= 0 && !node.matches(":disabled")
|
|
165
|
+
&& !node.closest('[inert], [data-radix-focus-guard]')
|
|
166
|
+
&& node.getClientRects().length > 0
|
|
167
|
+
&& getComputedStyle(node).visibility !== "hidden");
|
|
168
|
+
const inside = candidates.filter((node) => panel.contains(node));
|
|
169
|
+
const edge = e.shiftKey ? inside[0] : inside[inside.length - 1];
|
|
170
|
+
if (document.activeElement !== edge) return;
|
|
171
|
+
const index = candidates.indexOf(edge);
|
|
172
|
+
const outside = candidates.filter((node) => !panel.contains(node));
|
|
173
|
+
const next = candidates[index + (e.shiftKey ? -1 : 1)]
|
|
174
|
+
?? (e.shiftKey ? outside[outside.length - 1] : outside[0]);
|
|
175
|
+
e.preventDefault();
|
|
176
|
+
if (next) next.focus();
|
|
177
|
+
else edge?.blur();
|
|
178
|
+
}}
|
|
179
|
+
onOpenAutoFocus={(e) => {
|
|
180
|
+
if (isInline) {
|
|
181
|
+
previousFocus.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
182
|
+
e.preventDefault();
|
|
183
|
+
}
|
|
184
|
+
}}
|
|
185
|
+
onCloseAutoFocus={(e) => {
|
|
186
|
+
if (isInline) {
|
|
187
|
+
e.preventDefault();
|
|
188
|
+
const active = document.activeElement;
|
|
189
|
+
if ((active === document.body || contentRef.current?.contains(active)) && previousFocus.current?.isConnected) {
|
|
190
|
+
previousFocus.current.focus();
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}}
|
|
145
194
|
onEscapeKeyDown={(e) => {
|
|
146
|
-
if (disableEscape) e.preventDefault();
|
|
195
|
+
if (disableEscape || (isInline && !contentRef.current?.contains(document.activeElement))) e.preventDefault();
|
|
147
196
|
}}
|
|
148
197
|
onPointerDownOutside={(e) => {
|
|
149
|
-
if (!dismissOnBackdropClick) e.preventDefault();
|
|
198
|
+
if (isInline || !dismissOnBackdropClick) e.preventDefault();
|
|
150
199
|
}}
|
|
151
200
|
onInteractOutside={(e) => {
|
|
152
|
-
if (backdrop === "none" || !dismissOnBackdropClick) e.preventDefault();
|
|
201
|
+
if (isInline || backdrop === "none" || !dismissOnBackdropClick) e.preventDefault();
|
|
153
202
|
}}
|
|
154
203
|
>
|
|
155
204
|
{children}
|
|
156
205
|
</RadixDialog.Content>
|
|
157
|
-
|
|
206
|
+
);
|
|
207
|
+
return (
|
|
208
|
+
<RadixDialog.Root open={open} onOpenChange={onOpenChange} modal={isModal}>
|
|
209
|
+
{isInline ? content : (
|
|
210
|
+
<RadixDialog.Portal>
|
|
211
|
+
{backdrop !== "none" && (
|
|
212
|
+
<RadixDialog.Overlay data-material={materialScope} className={styles.overlay} data-backdrop={backdrop} />
|
|
213
|
+
)}
|
|
214
|
+
{content}
|
|
215
|
+
</RadixDialog.Portal>
|
|
216
|
+
)}
|
|
158
217
|
</RadixDialog.Root>
|
|
159
218
|
);
|
|
160
219
|
});
|
|
@@ -135,6 +135,7 @@ import { ScissorsIcon as PhScissors } from "@phosphor-icons/react/dist/csr/Sciss
|
|
|
135
135
|
import { ClipboardTextIcon as PhClipboardText } from "@phosphor-icons/react/dist/csr/ClipboardText";
|
|
136
136
|
import { CameraIcon as PhCamera } from "@phosphor-icons/react/dist/csr/Camera";
|
|
137
137
|
import { GlobeIcon as PhGlobe } from "@phosphor-icons/react/dist/csr/Globe";
|
|
138
|
+
import { GithubLogoIcon as PhGithubLogo } from "@phosphor-icons/react/dist/csr/GithubLogo";
|
|
138
139
|
import { FolderIcon as PhFolder } from "@phosphor-icons/react/dist/csr/Folder";
|
|
139
140
|
import { FolderOpenIcon as PhFolderOpen } from "@phosphor-icons/react/dist/csr/FolderOpen";
|
|
140
141
|
import { FolderSimpleIcon as PhFolderSimple } from "@phosphor-icons/react/dist/csr/FolderSimple";
|
|
@@ -376,6 +377,7 @@ const phosphorSet: Partial<Record<IconName, AnyComp>> = {
|
|
|
376
377
|
"clipboard-text": PhClipboardText,
|
|
377
378
|
camera: PhCamera,
|
|
378
379
|
globe: PhGlobe,
|
|
380
|
+
"github-logo": PhGithubLogo,
|
|
379
381
|
folder: PhFolder,
|
|
380
382
|
"folder-open": PhFolderOpen,
|
|
381
383
|
"folder-simple": PhFolderSimple,
|
|
@@ -544,6 +546,7 @@ function ArrowsDownUpIcon({
|
|
|
544
546
|
/* 축과 무관하게 phosphor로 고정 노출할 아이콘.
|
|
545
547
|
solar/lucide에 형상이 명확한 등가물이 없거나 기존 매핑이 의미상 틀린 자리. */
|
|
546
548
|
const forcePhosphorFamily = new Set<IconName>([
|
|
549
|
+
"github-logo",
|
|
547
550
|
// Tooltip needs a centered tail; keep the exact silhouette across icon families.
|
|
548
551
|
"chat-centered",
|
|
549
552
|
"text-align-left",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
|
|
34
34
|
/* Variants ──────────────────────────────────────────────── */
|
|
35
35
|
.outline {
|
|
36
|
-
background: var(--bg);
|
|
36
|
+
background: var(--material-field-bg, var(--bg));
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.filled {
|
|
40
|
-
background: var(--bg-subtle);
|
|
40
|
+
background: var(--material-field-filled-bg, var(--bg-subtle));
|
|
41
41
|
border-color: transparent;
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
|
|
50
50
|
.filled:focus-visible:not([data-disabled]):not([data-readonly]),
|
|
51
51
|
.filled:has(:focus-visible):not([data-disabled]):not([data-readonly]) {
|
|
52
|
-
background: linear-gradient(var(--hover), var(--hover)), var(--bg-subtle);
|
|
52
|
+
background: linear-gradient(var(--hover), var(--hover)), var(--material-field-filled-bg, var(--bg-subtle));
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/* line — 아래 선만 (Material 스타일). sizes 뒤에 정의해 radius/padding override. */
|
|
@@ -286,7 +286,7 @@ export function OnboardingAxisPanel({
|
|
|
286
286
|
<div className={styles.voiceGroup} role="radiogroup" aria-label={L.rowVoice}>
|
|
287
287
|
{VOICES.map((v) => (
|
|
288
288
|
<RadioCard key={v} name="onb-axis-voice" value={v} checked={voice === v} onChange={() => setVoice(v)}
|
|
289
|
-
title={
|
|
289
|
+
title={voiceSample[v]} description={v} />
|
|
290
290
|
))}
|
|
291
291
|
</div>
|
|
292
292
|
) : (
|