@conscience-technology/ovenn 0.7.4 → 0.7.5

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.
Files changed (90) hide show
  1. package/assets/components/AIMessage/AIMessage.module.css +10 -0
  2. package/assets/components/AIMessage/AIMessage.tsx +6 -2
  3. package/assets/components/Breadcrumb/Breadcrumb.module.css +82 -23
  4. package/assets/components/Breadcrumb/Breadcrumb.tsx +44 -26
  5. package/assets/components/Breadcrumb/index.ts +1 -0
  6. package/assets/components/Button/Button.module.css +2 -4
  7. package/assets/components/Callout/Callout.module.css +44 -18
  8. package/assets/components/Callout/Callout.tsx +9 -4
  9. package/assets/components/Callout/index.ts +1 -1
  10. package/assets/components/Canvas/Canvas.module.css +13 -0
  11. package/assets/components/Canvas/Canvas.tsx +378 -94
  12. package/assets/components/Canvas/clipboard.ts +5 -1
  13. package/assets/components/Canvas/collision.ts +5 -1
  14. package/assets/components/Canvas/graph.ts +14 -5
  15. package/assets/components/Canvas/history.ts +11 -4
  16. package/assets/components/Canvas/index.ts +2 -1
  17. package/assets/components/Canvas/types.ts +36 -1
  18. package/assets/components/CanvasEdge/tokens.css +14 -1
  19. package/assets/components/CanvasNode/tokens.css +13 -10
  20. package/assets/components/ChatInput/ChatInput.tsx +1 -1
  21. package/assets/components/ColorField/ColorField.module.css +6 -1
  22. package/assets/components/ColorPicker/ColorPicker.module.css +3 -0
  23. package/assets/components/CommandPalette/CommandPalette.module.css +114 -0
  24. package/assets/components/CommandPalette/CommandPalette.tsx +206 -21
  25. package/assets/components/CommandPalette/index.ts +1 -0
  26. package/assets/components/Drawer/Drawer.module.css +30 -0
  27. package/assets/components/Drawer/Drawer.tsx +75 -16
  28. package/assets/components/Drawer/index.ts +1 -0
  29. package/assets/components/Icon/Icon.tsx +3 -0
  30. package/assets/components/Input/Input.module.css +3 -3
  31. package/assets/components/Select/Select.module.css +1 -1
  32. package/assets/components/SocialLoginButton/SocialLoginButton.module.css +198 -0
  33. package/assets/components/SocialLoginButton/SocialLoginButton.tsx +86 -0
  34. package/assets/components/SocialLoginButton/assets/amazon.svg +1 -0
  35. package/assets/components/SocialLoginButton/assets/apple.svg +3 -0
  36. package/assets/components/SocialLoginButton/assets/discord.svg +3 -0
  37. package/assets/components/SocialLoginButton/assets/facebook-white.png +0 -0
  38. package/assets/components/SocialLoginButton/assets/facebook.png +0 -0
  39. package/assets/components/SocialLoginButton/assets/github.svg +3 -0
  40. package/assets/components/SocialLoginButton/assets/google-mark.png +0 -0
  41. package/assets/components/SocialLoginButton/assets/kakao.svg +3 -0
  42. package/assets/components/SocialLoginButton/assets/line-icon.png +0 -0
  43. package/assets/components/SocialLoginButton/assets/line-white.png +0 -0
  44. package/assets/components/SocialLoginButton/assets/linkedin-white.png +0 -0
  45. package/assets/components/SocialLoginButton/assets/linkedin.png +0 -0
  46. package/assets/components/SocialLoginButton/assets/microsoft.svg +6 -0
  47. package/assets/components/SocialLoginButton/assets/naver.png +0 -0
  48. package/assets/components/SocialLoginButton/assets/slack.svg +17 -0
  49. package/assets/components/SocialLoginButton/assets/spotify.svg +3 -0
  50. package/assets/components/SocialLoginButton/assets/twitch.svg +21 -0
  51. package/assets/components/SocialLoginButton/assets/wechat.png +0 -0
  52. package/assets/components/SocialLoginButton/assets/x.svg +3 -0
  53. package/assets/components/SocialLoginButton/index.ts +2 -0
  54. package/assets/components/SocialLoginButton/provider-tokens.css +30 -0
  55. package/assets/components/SocialLoginButton/providers.ts +23 -0
  56. package/assets/components/_data.ts +1 -1
  57. package/assets/components/component-registry.json +30 -1
  58. package/assets/components/index.ts +1 -0
  59. package/assets/components/tokens.css +13 -6
  60. package/assets/prompts/ASSEMBLY.md +2 -0
  61. package/assets/prompts/CATALOG.md +1 -0
  62. package/assets/prompts/axes/material.md +4 -4
  63. package/assets/prompts/axes/shape.md +2 -2
  64. package/assets/prompts/components/_variants.md +1 -1
  65. package/assets/prompts/components/ai-message.md +6 -2
  66. package/assets/prompts/components/breadcrumb.md +11 -5
  67. package/assets/prompts/components/button.md +1 -1
  68. package/assets/prompts/components/callout.md +8 -4
  69. package/assets/prompts/components/canvas-edge.md +1 -1
  70. package/assets/prompts/components/canvas-node.md +1 -1
  71. package/assets/prompts/components/canvas.md +24 -8
  72. package/assets/prompts/components/command-palette.md +52 -44
  73. package/assets/prompts/components/drawer.md +15 -1
  74. package/assets/prompts/components/list-item.md +1 -1
  75. package/assets/prompts/components/social-login-button.md +117 -0
  76. package/assets/prompts/design-examples/ai-chat-full-page.png +0 -0
  77. package/assets/prompts/design-examples/catalog.json +9 -9
  78. package/assets/prompts/design-examples/sources/ai-chat-full-page/ChatExperience.module.css +37 -1
  79. package/assets/prompts/design-examples/sources/ai-chat-full-page/ChatExperience.tsx +113 -18
  80. package/assets/prompts/design-examples/sources/ai-chat-full-page/FullPageChat.tsx +2 -2
  81. package/assets/prompts/design-examples/sources/ai-chat-full-page/REFERENCE.md +3 -1
  82. package/assets/prompts/design-examples/sources/ai-chat-full-page/useChatDemo.ts +99 -51
  83. package/assets/prompts/tokens/material.md +5 -2
  84. package/assets/prompts/tokens/radius.md +1 -1
  85. package/assets/prompts/use-cases/chat-chat-input.md +382 -74
  86. package/assets/prompts/use-cases/data-list-item.md +38 -431
  87. package/assets/prompts/use-cases/feedback-drawer.md +112 -33
  88. package/assets/prompts/use-cases/overlay-command-palette.md +2004 -0
  89. package/assets/prompts/use-cases/structure-canvas.md +1016 -0
  90. package/package.json +1 -1
@@ -18,6 +18,11 @@
18
18
  margin-bottom: var(--space-1);
19
19
  }
20
20
 
21
+ .before {
22
+ width: 100%;
23
+ min-width: 0;
24
+ }
25
+
21
26
  .body {
22
27
  color: var(--fg);
23
28
  font-size: var(--text-base);
@@ -103,6 +108,11 @@
103
108
  .body > :global(p) {
104
109
  margin: 0;
105
110
  }
111
+ .body :global(a) {
112
+ color: var(--primary);
113
+ text-decoration: underline;
114
+ overflow-wrap: anywhere;
115
+ }
106
116
  /* 블록 요소 (CodeBlock·MessageQuote·MessageSources·MessageTable wrapper) — 섹션 분리감 */
107
117
  .body > :global(div),
108
118
  .body > :global(blockquote) {
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { useEffect, useState, type HTMLAttributes, type ReactNode } from "react";
3
+ import { useEffect, useState, type HTMLAttributes, type MouseEvent, type ReactNode } from "react";
4
4
  import {
5
5
  MessageActions,
6
6
  type MessageAction,
@@ -19,6 +19,8 @@ export interface AIMessageProps extends HTMLAttributes<HTMLDivElement> {
19
19
  children: ReactNode;
20
20
  /** 메시지 위 작은 라벨 ("LongText", "Code Block" 등). 없으면 숨김. */
21
21
  label?: ReactNode;
22
+ /** 본문 위에 표시하는 작업 요약 등 부가 콘텐츠. */
23
+ before?: ReactNode;
22
24
  /** 액션 노출. 기본 hover. */
23
25
  actionsVisibility?: AIMessageActionsVisibility;
24
26
  /** 액션 커스터마이즈. 기본 [copy, regenerate]. 비우려면 []. */
@@ -26,7 +28,7 @@ export interface AIMessageProps extends HTMLAttributes<HTMLDivElement> {
26
28
  /** 소스 목록 — 액션바 옆에 inline chip으로 노출. */
27
29
  sources?: MessageSource[];
28
30
  /** sources chip 클릭 시 (popover 열기 등). */
29
- onSourcesClick?: () => void;
31
+ onSourcesClick?: (event: MouseEvent<HTMLButtonElement>) => void;
30
32
  /** 생성 중이면 액션 숨김. */
31
33
  isGenerating?: boolean;
32
34
  /** 본문 수신 중. children에 누적 본문을 전달하며 액션은 완료 후 표시. */
@@ -77,6 +79,7 @@ function MessageText({ text, streaming }: { text: string; streaming: boolean })
77
79
  export function AIMessage({
78
80
  children,
79
81
  label,
82
+ before,
80
83
  actionsVisibility = "hover",
81
84
  actions = DEFAULT_ACTIONS,
82
85
  sources,
@@ -101,6 +104,7 @@ export function AIMessage({
101
104
  {...rest}
102
105
  >
103
106
  {label ? <div className={styles.label}>{label}</div> : null}
107
+ {before != null ? <div className={styles.before}>{before}</div> : null}
104
108
  <div className={styles.body} data-ai-message-body>
105
109
  {isGenerating && !isStreaming ? (
106
110
  <>
@@ -10,13 +10,31 @@
10
10
  */
11
11
 
12
12
  .root {
13
+ --breadcrumb-height: var(--control-h-xs);
14
+ --breadcrumb-font-size: var(--label-sm-size);
15
+ --breadcrumb-line-height: var(--label-sm-line-height);
16
+ --breadcrumb-icon-size: var(--size-3);
17
+ --breadcrumb-caret-size: var(--size-3);
18
+ --breadcrumb-gap: var(--space-0_5);
19
+ --breadcrumb-slot-gap: var(--space-1);
20
+ --breadcrumb-padding: var(--space-1);
13
21
  min-width: 0;
14
22
  }
23
+ .root[data-size="lg"] {
24
+ --breadcrumb-height: var(--control-h-sm);
25
+ --breadcrumb-font-size: var(--label-md-size);
26
+ --breadcrumb-line-height: var(--label-md-line-height);
27
+ --breadcrumb-icon-size: var(--size-4);
28
+ --breadcrumb-caret-size: calc(var(--size-3) + var(--size-0-5));
29
+ --breadcrumb-gap: var(--space-1_5);
30
+ --breadcrumb-slot-gap: var(--space-1_5);
31
+ --breadcrumb-padding: var(--space-1_5);
32
+ }
15
33
 
16
34
  .list {
17
35
  display: inline-flex;
18
36
  align-items: center;
19
- gap: var(--space-0_5);
37
+ gap: var(--breadcrumb-gap, var(--space-0_5));
20
38
  margin: 0;
21
39
  padding: 0;
22
40
  list-style: none;
@@ -48,15 +66,15 @@
48
66
  display: inline-flex;
49
67
  align-items: center;
50
68
  justify-content: center;
51
- gap: var(--space-1);
52
- height: var(--control-h-xs);
53
- padding-inline: var(--space-1);
69
+ gap: var(--breadcrumb-slot-gap, var(--space-1));
70
+ height: var(--breadcrumb-height, var(--control-h-xs));
71
+ padding-inline: var(--breadcrumb-padding, var(--space-1));
54
72
  corner-shape: var(--corner-shape);
55
73
  border-radius: var(--radius-xs);
56
74
  font-family: var(--label-font);
57
75
  font-weight: var(--font-weight-regular);
58
- font-size: var(--label-sm-size);
59
- line-height: var(--label-sm-line-height);
76
+ font-size: var(--breadcrumb-font-size, var(--label-sm-size));
77
+ line-height: var(--breadcrumb-line-height, var(--label-sm-line-height));
60
78
  letter-spacing: var(--label-tracking);
61
79
  color: var(--fg-muted);
62
80
  background: transparent;
@@ -87,7 +105,7 @@
87
105
 
88
106
  /* Icon-only 변형 — children 없이 leftIcon만 있을 때. 정사각 hit box. */
89
107
  .linkIconOnly {
90
- width: var(--control-h-xs);
108
+ width: var(--breadcrumb-height, var(--control-h-xs));
91
109
  padding-inline: 0;
92
110
  gap: 0;
93
111
  }
@@ -96,13 +114,15 @@
96
114
  .current {
97
115
  display: inline-flex;
98
116
  align-items: center;
99
- gap: var(--space-1);
100
- height: var(--control-h-xs);
101
- padding-inline: var(--space-1);
117
+ justify-content: center;
118
+ gap: var(--breadcrumb-slot-gap, var(--space-1));
119
+ height: var(--breadcrumb-height, var(--control-h-xs));
120
+ border: 1px solid transparent;
121
+ padding-inline: var(--breadcrumb-padding, var(--space-1));
102
122
  font-family: var(--label-font);
103
123
  font-weight: var(--font-weight-regular);
104
- font-size: var(--label-sm-size);
105
- line-height: var(--label-sm-line-height);
124
+ font-size: var(--breadcrumb-font-size, var(--label-sm-size));
125
+ line-height: var(--breadcrumb-line-height, var(--label-sm-line-height));
106
126
  letter-spacing: var(--label-tracking);
107
127
  color: var(--fg-strong);
108
128
  min-width: 0;
@@ -136,8 +156,8 @@
136
156
  display: inline-flex;
137
157
  align-items: center;
138
158
  justify-content: center;
139
- height: var(--control-h-xs);
140
- padding-inline: var(--space-1);
159
+ height: var(--breadcrumb-height, var(--control-h-xs));
160
+ padding-inline: var(--breadcrumb-padding, var(--space-1));
141
161
  border: 1px solid transparent;
142
162
  corner-shape: var(--corner-shape);
143
163
  border-radius: var(--radius-xs);
@@ -145,8 +165,8 @@
145
165
  color: var(--fg-muted);
146
166
  font-family: var(--label-font);
147
167
  font-weight: var(--font-weight-regular);
148
- font-size: var(--label-sm-size);
149
- line-height: var(--label-sm-line-height);
168
+ font-size: var(--breadcrumb-font-size, var(--label-sm-size));
169
+ line-height: var(--breadcrumb-line-height, var(--label-sm-line-height));
150
170
  letter-spacing: var(--label-tracking);
151
171
  cursor: pointer;
152
172
  user-select: none;
@@ -168,15 +188,15 @@
168
188
  color: var(--fg);
169
189
  }
170
190
 
171
- /* Menu trigger ─── segment 자체가 트리거. Link와 같은 xs · ghost 스펙 + ▾ caret.
191
+ /* Menu trigger ─── segment 자체가 트리거. Link와 같은 xs · ghost 스펙 + 상하 caret.
172
192
  active=true일 때는 Current와 같은 톤(--fg-strong) + hover는 그대로 유지. */
173
193
  .menuTrigger {
174
194
  display: inline-flex;
175
195
  align-items: center;
176
196
  justify-content: center;
177
- gap: var(--space-1);
178
- height: var(--control-h-xs);
179
- padding-inline: var(--space-1);
197
+ gap: var(--breadcrumb-slot-gap, var(--space-1));
198
+ height: var(--breadcrumb-height, var(--control-h-xs));
199
+ padding-inline: var(--breadcrumb-padding, var(--space-1));
180
200
  border: 1px solid transparent;
181
201
  corner-shape: var(--corner-shape);
182
202
  border-radius: var(--radius-xs);
@@ -184,8 +204,8 @@
184
204
  color: var(--fg-muted);
185
205
  font-family: var(--label-font);
186
206
  font-weight: var(--font-weight-regular);
187
- font-size: var(--label-sm-size);
188
- line-height: var(--label-sm-line-height);
207
+ font-size: var(--breadcrumb-font-size, var(--label-sm-size));
208
+ line-height: var(--breadcrumb-line-height, var(--label-sm-line-height));
189
209
  letter-spacing: var(--label-tracking);
190
210
  cursor: pointer;
191
211
  user-select: none;
@@ -215,7 +235,7 @@
215
235
  opacity: 1;
216
236
  }
217
237
 
218
- /* ▾ caret ─── 트리거 끝에 붙는 작은 꼬리표. Separator처럼 반응 없음. */
238
+ /* 상하 caret ─── 트리거 끝에 붙는 작은 꼬리표. Separator처럼 반응 없음. */
219
239
  .menuCaret {
220
240
  display: inline-flex;
221
241
  align-items: center;
@@ -233,6 +253,45 @@
233
253
  opacity: 0.9;
234
254
  }
235
255
 
256
+ /* Collapse only the decorative caret; the labelled trigger stays available. */
257
+ .menuTrigger[data-caret-visibility="hover"] {
258
+ column-gap: 0;
259
+ }
260
+ .menuTrigger[data-caret-visibility="hover"] > .linkIcon {
261
+ margin-inline-end: var(--breadcrumb-slot-gap, var(--space-1));
262
+ }
263
+ .menuTrigger[data-caret-visibility="hover"] .menuCaret {
264
+ width: 0;
265
+ margin-inline-start: 0;
266
+ overflow: hidden;
267
+ opacity: 0;
268
+ pointer-events: none;
269
+ transition:
270
+ width var(--duration-base) var(--ease-out),
271
+ margin-inline-start var(--duration-base) var(--ease-out),
272
+ opacity var(--duration-base) var(--ease-out);
273
+ }
274
+ .menuTrigger[data-caret-visibility="hover"] .menuCaret > svg {
275
+ flex-shrink: 0;
276
+ }
277
+ .menuTrigger[data-caret-visibility="hover"]:is(:hover, :focus-visible, [data-state="open"]) .menuCaret {
278
+ width: var(--breadcrumb-caret-size, var(--size-3));
279
+ margin-inline-start: var(--breadcrumb-slot-gap, var(--space-1));
280
+ opacity: 0.9;
281
+ }
282
+ @media (hover: none), (pointer: coarse) {
283
+ .menuTrigger[data-caret-visibility="hover"] .menuCaret {
284
+ width: var(--breadcrumb-caret-size, var(--size-3));
285
+ margin-inline-start: var(--breadcrumb-slot-gap, var(--space-1));
286
+ opacity: 0.5;
287
+ }
288
+ }
289
+ @media (prefers-reduced-motion: reduce) {
290
+ .menuTrigger[data-caret-visibility="hover"] .menuCaret {
291
+ transition: none;
292
+ }
293
+ }
294
+
236
295
  /* Popover surface ─── Select · ContextMenu와 동일한 팝오버 표면.
237
296
  ContextMenu.module.css의 .surface를 composes해 시각 규칙 원본을 재사용. */
238
297
  .popoverContent {
@@ -4,6 +4,8 @@ import {
4
4
  Children,
5
5
  Fragment,
6
6
  cloneElement,
7
+ createContext,
8
+ useContext,
7
9
  forwardRef,
8
10
  isValidElement,
9
11
  type AnchorHTMLAttributes,
@@ -19,8 +21,11 @@ import { Icon, IconAxisProvider, useIconAxis } from "../Icon";
19
21
  import { MenuItem } from "../MenuItem";
20
22
  import styles from "./Breadcrumb.module.css";
21
23
 
22
- /** 트리거 내부 아이콘 렌더 사이즈 — Button xs와 동일한 12px. */
23
- const ICON_SIZE = 12;
24
+ /** 루트 크기를 상속하며 단독 사용 시 기존 크기로 fallback. */
25
+ const ICON_SIZE = "var(--breadcrumb-icon-size, var(--size-3))";
26
+
27
+ export type BreadcrumbSize = "md" | "lg";
28
+ const BreadcrumbSizeContext = createContext<BreadcrumbSize>("md");
24
29
 
25
30
  function sizedIcon(node: ReactNode): ReactNode {
26
31
  if (!isValidElement(node)) return node;
@@ -34,6 +39,8 @@ function sizedIcon(node: ReactNode): ReactNode {
34
39
  // ────────────────────────────────────────────────────────────
35
40
 
36
41
  export interface BreadcrumbProps extends Omit<HTMLAttributes<HTMLElement>, "children"> {
42
+ /** md는 기존 크기, lg는 아이콘·간격을 넓힌 큰 크기. */
43
+ size?: BreadcrumbSize;
37
44
  /** 스크린리더용 라벨. 기본 "Breadcrumb". */
38
45
  "aria-label"?: string;
39
46
  /** 항목 사이 구분자. 기본은 caret-right 아이콘. */
@@ -42,30 +49,37 @@ export interface BreadcrumbProps extends Omit<HTMLAttributes<HTMLElement>, "chil
42
49
  }
43
50
 
44
51
  const Root = forwardRef<HTMLElement, BreadcrumbProps>(
45
- ({ className, separator, children, "aria-label": ariaLabel = "Breadcrumb", ...rest }, ref) => {
46
- const sep = separator ?? <Icon name="caret-right" size={12} />;
52
+ ({ className, size = "md", separator, children, "aria-label": ariaLabel = "Breadcrumb", ...rest }, ref) => {
53
+ const sep = separator === "/" ? (
54
+ <svg width={ICON_SIZE} height={ICON_SIZE} viewBox="0 0 256 256" fill="none" aria-hidden="true">
55
+ <path d="M160 40 96 216" stroke="currentColor" strokeWidth={16} strokeLinecap="round" />
56
+ </svg>
57
+ ) : separator ?? <Icon name="caret-right" size={ICON_SIZE} />;
47
58
  const items = Children.toArray(children).filter(isValidElement);
48
59
 
49
60
  return (
50
- <nav
51
- ref={ref}
52
- aria-label={ariaLabel}
53
- className={[styles.root, className ?? ""].filter(Boolean).join(" ")}
54
- {...rest}
55
- >
56
- <ol className={styles.list}>
57
- {items.map((child, i) => (
58
- <Fragment key={(child as ReactElement).key ?? i}>
59
- <li className={styles.item}>{child}</li>
60
- {i < items.length - 1 && (
61
- <li className={styles.separator} aria-hidden>
62
- {sep}
63
- </li>
64
- )}
65
- </Fragment>
66
- ))}
67
- </ol>
68
- </nav>
61
+ <BreadcrumbSizeContext.Provider value={size}>
62
+ <nav
63
+ ref={ref}
64
+ aria-label={ariaLabel}
65
+ data-size={size}
66
+ className={[styles.root, className ?? ""].filter(Boolean).join(" ")}
67
+ {...rest}
68
+ >
69
+ <ol className={styles.list}>
70
+ {items.map((child, i) => (
71
+ <Fragment key={(child as ReactElement).key ?? i}>
72
+ <li className={styles.item}>{child}</li>
73
+ {i < items.length - 1 && (
74
+ <li className={styles.separator} aria-hidden>
75
+ {sep}
76
+ </li>
77
+ )}
78
+ </Fragment>
79
+ ))}
80
+ </ol>
81
+ </nav>
82
+ </BreadcrumbSizeContext.Provider>
69
83
  );
70
84
  },
71
85
  );
@@ -282,7 +296,7 @@ const Ellipsis = forwardRef<HTMLButtonElement, BreadcrumbEllipsisProps>(
282
296
  Ellipsis.displayName = "Breadcrumb.Ellipsis";
283
297
 
284
298
  // ────────────────────────────────────────────────────────────
285
- // Menu — segment 자체가 트리거. ▾ caret으로 형제 전환 UI 노출.
299
+ // Menu — segment 자체가 트리거. 상하 caret으로 형제 전환 UI 노출.
286
300
  // active=true면 aria-current="page" 유지 (현재 페이지 자리로 쓸 때).
287
301
  // ────────────────────────────────────────────────────────────
288
302
 
@@ -296,12 +310,15 @@ export interface BreadcrumbMenuProps
296
310
  items: BreadcrumbMenuItem[];
297
311
  /** 현재 페이지 자리에 쓸 때 true. aria-current="page" + fg-strong 톤. */
298
312
  active?: boolean;
313
+ /** 메뉴 화살표 표시 방식. hover는 포커스·열림·터치에서도 표시. */
314
+ caretVisibility?: "always" | "hover";
299
315
  /** 팝오버 side offset (px). 기본 6. */
300
316
  sideOffset?: number;
301
317
  }
302
318
 
303
319
  const Menu = forwardRef<HTMLButtonElement, BreadcrumbMenuProps>(
304
- ({ className, children, leftIcon, items, active = false, sideOffset = 6, ...rest }, ref) => {
320
+ ({ className, children, leftIcon, items, active = false, caretVisibility = "always", sideOffset = 6, ...rest }, ref) => {
321
+ const size = useContext(BreadcrumbSizeContext);
305
322
  const cls = [styles.menuTrigger, active ? styles.menuTriggerActive : "", className ?? ""]
306
323
  .filter(Boolean)
307
324
  .join(" ");
@@ -314,6 +331,7 @@ const Menu = forwardRef<HTMLButtonElement, BreadcrumbMenuProps>(
314
331
  aria-current={active ? "page" : undefined}
315
332
  aria-haspopup="menu"
316
333
  className={cls}
334
+ data-caret-visibility={caretVisibility}
317
335
  {...rest}
318
336
  >
319
337
  {leftIcon && (
@@ -323,7 +341,7 @@ const Menu = forwardRef<HTMLButtonElement, BreadcrumbMenuProps>(
323
341
  )}
324
342
  <span className={styles.linkLabel}>{children}</span>
325
343
  <span className={styles.menuCaret} aria-hidden>
326
- <Icon name="caret-down" size={ICON_SIZE} />
344
+ <Icon name={size === "lg" ? "caret-up-down" : "caret-down"} size="var(--breadcrumb-caret-size, var(--size-3))" />
327
345
  </span>
328
346
  </button>
329
347
  </RPopover.Trigger>
@@ -1,6 +1,7 @@
1
1
  export { Breadcrumb } from "./Breadcrumb";
2
2
  export type {
3
3
  BreadcrumbProps,
4
+ BreadcrumbSize,
4
5
  BreadcrumbLinkProps,
5
6
  BreadcrumbCurrentProps,
6
7
  BreadcrumbEllipsisProps,
@@ -293,16 +293,14 @@
293
293
  --button-fg: var(--fg-muted);
294
294
  --button-border: var(--border);
295
295
  }
296
- /* Paint the thin outline outside the shared control box. The 1px native border
297
- stays transparent for layout; padding-box inset -2 hairlines extends the
298
- visible contour by one hairline without changing heights or icon-only squares. */
296
+ /* Match the button's outer edge by offsetting the padding box by its transparent border. */
299
297
  .outline {
300
298
  border-color: transparent;
301
299
  }
302
300
  .outline:not([data-slot="control-group"][data-composition="buttons"] > *)::before {
303
301
  content: "";
304
302
  position: absolute;
305
- inset: calc(var(--hairline) * -2);
303
+ inset: calc(var(--hairline) * -1);
306
304
  box-sizing: border-box;
307
305
  border: var(--hairline) solid var(--button-border);
308
306
  corner-shape: inherit;
@@ -4,39 +4,60 @@
4
4
  패딩·gap은 사진의 밸런스를 재현 — 아이콘 좌우 gap은 타이틀 line-height 보정으로
5
5
  space-3, 헤더-본문-액션은 space-3 리듬. */
6
6
  .root {
7
- /* 광색역 배경이 sRGB 범위를 넘을 때 글래스 합성 색의 왜곡을 방지한다. */
8
- --callout-material-bg: rgb(from var(--material-floating-bg) clamp(0, r, 255) clamp(0, g, 255) clamp(0, b, 255) / alpha); /* lint-hardcoded: ignore — 기존 Material 색의 채널 범위만 정규화하는 로컬 토큰 정의 */
7
+ --callout-padding: var(--space-4);
8
+ --callout-row-gap: var(--space-1_5);
9
+ --callout-item-gap: var(--space-2);
10
+ --callout-text-gap: var(--space-1);
11
+ --callout-inline-padding-block: var(--space-3);
12
+ --callout-inline-action-inset: var(--space-2);
9
13
  display: flex;
10
14
  flex-direction: column;
11
- gap: var(--space-1_5);
12
- padding: var(--space-4);
15
+ gap: var(--callout-row-gap);
16
+ padding: var(--callout-padding);
13
17
  corner-shape: var(--card-corner-shape);
14
18
  border-radius: var(--radius-md);
15
19
  color: var(--fg);
16
- border: 1px solid var(--material-border, transparent);
17
- backdrop-filter: var(--material-floating-filter, none);
20
+ border: 1px solid transparent;
18
21
  font-family: var(--font-sans);
19
22
  }
20
23
 
24
+ .root[data-size="sm"] {
25
+ --callout-padding: var(--space-3);
26
+ --callout-row-gap: var(--space-1);
27
+ --callout-item-gap: var(--space-1_5);
28
+ --callout-text-gap: var(--space-0_5);
29
+ --callout-inline-padding-block: var(--space-2);
30
+ --callout-inline-action-inset: var(--space-1_5);
31
+ }
32
+
21
33
  /* Variants
22
34
  fill: tone subtle 표면 (8% 알파).
23
- outline: 표면 투명 + tone border (32% 알파).
35
+ outline: 표면 투명 + tone 경계.
36
+ outline-tint: 같은 경계 + fill의 절반 농도.
24
37
  tone별로 --callout-subtle / --callout-border를 스왑해서 재사용. */
25
38
  .fill {
26
- background: var(--callout-material-bg, var(--callout-subtle));
39
+ background: var(--callout-subtle);
40
+ }
41
+ .outline,
42
+ .outlineTint {
43
+ border-color: var(--callout-border);
27
44
  }
28
45
  .outline {
29
- background: var(--callout-material-bg, transparent);
30
- border-color: var(--material-border, var(--callout-border));
46
+ background: transparent;
31
47
  box-shadow: var(--shadow-sm);
32
48
  }
49
+ .outlineTint {
50
+ --callout-outline-tint: color-mix(in oklab, var(--callout-subtle) 50%, transparent);
51
+ background: var(--callout-outline-tint);
52
+ background-clip: padding-box;
53
+ }
33
54
 
34
55
  /* Head: icon | title | dismiss ─────────────────────────────── */
35
56
  /* 아이콘은 타이틀 line-height와 같은 높이 박스로 잡아 첫 줄 baseline과 맞춤 */
36
57
  .head {
37
58
  display: flex;
38
59
  align-items: flex-start;
39
- gap: var(--space-2);
60
+ gap: var(--callout-item-gap);
40
61
  }
41
62
  .icon {
42
63
  display: inline-flex;
@@ -67,6 +88,7 @@
67
88
 
68
89
  /* 버튼 영역과 글리프 크기는 독립적이다. 안내 아이콘은 유지하고 X만 중간 크기로 맞춘다. */
69
90
  .root .dismiss > svg {
91
+ color: color-mix(in oklab, var(--fg-muted), var(--fg-subtle));
70
92
  width: var(--icon-size-sm);
71
93
  height: var(--icon-size-sm);
72
94
  }
@@ -79,7 +101,7 @@
79
101
  }
80
102
  /* title-body는 같은 텍스트 블록으로 묶여 보이도록 gap을 좁힘 (한 단계 축소). */
81
103
  .head + .body {
82
- margin-top: calc(var(--space-1) - var(--space-1_5));
104
+ margin-top: calc(var(--callout-text-gap) - var(--callout-row-gap));
83
105
  }
84
106
 
85
107
  /* Actions ─────────────────────────────────────────────────── */
@@ -95,7 +117,7 @@
95
117
  .actionsRight {
96
118
  display: grid;
97
119
  grid-template-columns: 1fr auto;
98
- gap: var(--space-1_5) var(--space-4);
120
+ gap: var(--callout-row-gap) var(--callout-padding);
99
121
  }
100
122
  .actionsRight .head {
101
123
  /* 좌측 박스 head: icon + title만. dismiss는 우측 사이드로 분리되므로 head 자체는 아이콘·타이틀만 담는다. */
@@ -104,7 +126,7 @@
104
126
  display: flex;
105
127
  flex-direction: column;
106
128
  align-items: flex-end;
107
- gap: var(--space-2);
129
+ gap: var(--callout-item-gap);
108
130
  grid-row: 1 / span 2;
109
131
  grid-column: 2;
110
132
  }
@@ -161,9 +183,13 @@
161
183
  flex-direction: row;
162
184
  align-items: center;
163
185
  flex-wrap: wrap;
164
- gap: var(--space-2);
165
- padding: var(--space-3) var(--space-4);
186
+ gap: var(--callout-item-gap);
187
+ padding: var(--callout-inline-padding-block) var(--callout-padding);
188
+ }
189
+ .inline > .icon {
190
+ align-self: flex-start;
166
191
  }
192
+
167
193
  .message {
168
194
  flex: 1;
169
195
  min-width: 0;
@@ -174,19 +200,19 @@
174
200
  .message .title,
175
201
  .message .body {
176
202
  display: inline;
203
+ line-height: inherit;
177
204
  }
178
205
  .message > .body:only-child {
179
206
  color: var(--fg);
180
207
  }
181
208
  .message .title + .body::before {
182
209
  content: " ";
183
- white-space: pre-wrap;
184
210
  }
185
211
  .inline > .actions {
186
212
  max-width: 100%;
187
213
  /* 컨트롤이 기존 세로 패딩을 사용하도록 해 한 줄 높이를 늘리지 않는다.
188
214
  xs/sm 액션 및 md 컨트롤까지 본문 행의 중심에 배치한다. */
189
- margin-block: calc(var(--space-2) * -1);
215
+ margin-block: calc(var(--callout-inline-action-inset) * -1);
190
216
  }
191
217
  .inline > .actions > .dismiss {
192
218
  margin-block: 0;
@@ -16,8 +16,9 @@ import styles from "./Callout.module.css";
16
16
  * - dismissible=true면 우상단 닫기 IconButton 렌더 + onDismiss 호출 (controlled 정책).
17
17
  */
18
18
  export type CalloutTone = "neutral" | "brand" | "success" | "warning" | "destructive";
19
+ export type CalloutSize = "sm" | "md";
19
20
  export type CalloutLayout = "card" | "inline";
20
- export type CalloutVariant = "fill" | "outline";
21
+ export type CalloutVariant = "fill" | "outline" | "outline-tint";
21
22
  export type CalloutActionsPlacement = "bottom" | "right";
22
23
 
23
24
  export interface CalloutProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
@@ -38,7 +39,9 @@ export interface CalloutProps extends Omit<HTMLAttributes<HTMLDivElement>, "titl
38
39
  actionsPlacement?: CalloutActionsPlacement;
39
40
  /** card=기존 카드, inline=아이콘·메시지·액션·닫기를 가로 배치. 긴 내용은 줄바꿈. */
40
41
  layout?: CalloutLayout;
41
- /** 카드 표면 강도. fill=tone tint 표면, outline=표면 투명 + 경계. */
42
+ /** 내부 패딩과 간격. */
43
+ size?: CalloutSize;
44
+ /** 배경과 경계 표현. outline-tint는 경계에 아주 옅은 tone 배경을 더한다. */
42
45
  variant?: CalloutVariant;
43
46
  /** tone은 아이콘·강조 색만 스왑. 표면·본문 텍스트는 유지. */
44
47
  tone?: CalloutTone;
@@ -60,6 +63,7 @@ const toneClass: Record<CalloutTone, string> = {
60
63
  const variantClass: Record<CalloutVariant, string> = {
61
64
  fill: styles.fill,
62
65
  outline: styles.outline,
66
+ "outline-tint": styles.outlineTint,
63
67
  };
64
68
 
65
69
  /**
@@ -83,6 +87,7 @@ const Callout = forwardRef<HTMLDivElement, CalloutProps>(
83
87
  actions,
84
88
  actionsPlacement = "bottom",
85
89
  layout = "card",
90
+ size = "md",
86
91
  variant = "fill",
87
92
  tone = "brand",
88
93
  dismissible = false,
@@ -128,7 +133,7 @@ const Callout = forwardRef<HTMLDivElement, CalloutProps>(
128
133
 
129
134
  if (layout === "inline") {
130
135
  return (
131
- <div ref={ref} className={rootClass} {...rest}>
136
+ <div ref={ref} className={rootClass} {...rest} data-size={size}>
132
137
  {iconNode && <span className={styles.icon} aria-hidden>{iconNode}</span>}
133
138
  <div className={styles.message}>
134
139
  {title != null && <div className={styles.title}>{title}</div>}
@@ -145,7 +150,7 @@ const Callout = forwardRef<HTMLDivElement, CalloutProps>(
145
150
  }
146
151
 
147
152
  return (
148
- <div ref={ref} className={rootClass} {...rest}>
153
+ <div ref={ref} className={rootClass} {...rest} data-size={size}>
149
154
  <div className={styles.head}>
150
155
  {iconNode && (
151
156
  <span className={styles.icon} aria-hidden>
@@ -1,2 +1,2 @@
1
1
  export { Callout } from "./Callout";
2
- export type { CalloutProps, CalloutLayout, CalloutTone, CalloutVariant, CalloutActionsPlacement } from "./Callout";
2
+ export type { CalloutProps, CalloutSize, CalloutLayout, CalloutTone, CalloutVariant, CalloutActionsPlacement } from "./Callout";
@@ -24,11 +24,24 @@
24
24
  background-position: var(--canvas-grid-x) var(--canvas-grid-y);
25
25
  }
26
26
  .root[data-pan-ready] { cursor: grab; }
27
+ .root[data-viewport-locked] { overflow: clip; touch-action: pan-y pinch-zoom; }
28
+ .root[data-viewport-locked][data-read-only] .node :global([data-slot="canvas-node"]) button { touch-action: inherit; cursor: pointer; }
27
29
  .root[data-panning] { cursor: grabbing; }
30
+ .root[data-high-contrast] > .world > .node > :global([data-slot="canvas-node"]),
31
+ .root[data-high-contrast] > .overlay {
32
+ --node-border: var(--fg);
33
+ --node-selected-border: var(--fg-strong);
34
+ }
35
+ .root[data-high-contrast] > .world > .edges :global([data-slot="canvas-edge"]) {
36
+ --edge-foreground-weight: 100%;
37
+ --edge-hover-color: var(--fg-strong);
38
+ --edge-selected-color: var(--fg-strong);
39
+ }
28
40
  .marquee { corner-shape: round; position: absolute; pointer-events: none; z-index: var(--canvas-marquee-layer); border: 1px solid var(--canvas-marquee-border); background: var(--canvas-marquee-fill); border-radius: var(--canvas-marquee-radius); }
29
41
  .guides { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: var(--canvas-guide-layer); }
30
42
  .guides line { stroke: var(--canvas-guide-color); stroke-width: var(--canvas-guide-width); stroke-dasharray: var(--canvas-guide-dash); vector-effect: non-scaling-stroke; }
31
43
  .world { position: absolute; inset: 0; transform-origin: 0 0; z-index: var(--canvas-world-layer); pointer-events: none; }
44
+ .overlay { position: absolute; inset: 0; z-index: var(--canvas-guide-layer); pointer-events: none; }
32
45
  .edges { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
33
46
  .node { position: absolute; width: max-content; z-index: var(--canvas-node-layer); pointer-events: auto; }
34
47
  .node:is([data-dragging], [data-settling]) { z-index: var(--canvas-drag-layer); }