devnonla-ui 0.12.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -245
- package/package.json +2 -2
- package/src/app/App.tsx +6 -22
- package/src/app/context.ts +2 -17
- package/src/avatar/AgentAvatar.tsx +17 -6
- package/src/avatar/avatar.css +107 -0
- package/src/button/Button.tsx +4 -4
- package/src/button/ButtonCopy.tsx +1 -1
- package/src/calendar/Calendar.tsx +1 -1
- package/src/card/Card.tsx +2 -5
- package/src/chat/AgentChatbox.tsx +1 -1
- package/src/chat/AgentPanel.tsx +1 -1
- package/src/chat/chatMessageList.tsx +1 -4
- package/src/chat/message-ui/ChatAgentMessage.tsx +6 -4
- package/src/chat/message-ui/ChatError.tsx +1 -1
- package/src/chat/message-ui/ChatInput.tsx +5 -4
- package/src/chat/message-ui/ChatMarkdown.tsx +2 -2
- package/src/chat/message-ui/ChatUserMessage.tsx +3 -3
- package/src/chat/tool-ui/BackgroundTasksBar.tsx +3 -3
- package/src/chat/tool-ui/CallAgentToolUI.tsx +2 -2
- package/src/chat/tool-ui/ChatToolCall.tsx +3 -3
- package/src/chat/tool-ui/ReadSkillToolUI.tsx +2 -2
- package/src/chat/tool-ui/RunJsToolUI.tsx +1 -1
- package/src/chat/tool-ui/ToolUiBadge.tsx +1 -1
- package/src/chat/tool-ui/WebFetchToolUI.tsx +1 -1
- package/src/checkbox/Checkbox.tsx +2 -2
- package/src/codeblock/CodeBlock.tsx +2 -2
- package/src/colorpicker/ColorPicker.tsx +10 -8
- package/src/datepicker/DatePicker.tsx +3 -3
- package/src/desktop/DesktopHeader.tsx +2 -2
- package/src/desktop/DesktopStage.tsx +1 -1
- package/src/desktop/DesktopWindow.tsx +3 -3
- package/src/desktop/MeadowDesktop.tsx +2 -2
- package/src/drawer/Drawer.tsx +6 -2
- package/src/dropdown/menuClasses.ts +1 -1
- package/src/empty/Empty.tsx +1 -1
- package/src/form/variants/FieldRadio.tsx +1 -1
- package/src/form/variants/FieldRepeaterItem.tsx +1 -1
- package/src/index.ts +7 -5
- package/src/input/EditableInput.tsx +3 -2
- package/src/input/Input.tsx +15 -7
- package/src/lib/sizes.ts +6 -6
- package/src/lib/surface.ts +14 -4
- package/src/markdown-editor/MarkdownDiff.tsx +4 -4
- package/src/markdown-editor/MarkdownPreview.tsx +6 -6
- package/src/markdown-editor/MarkdownSource.tsx +1 -1
- package/src/markdown-editor/MarkdownTable.tsx +2 -2
- package/src/markdown-editor/MarkdownViewer.tsx +54 -56
- package/src/markdown-editor/MermaidBlock.tsx +2 -2
- package/src/markdown-editor/ReactCode.tsx +6 -7
- package/src/markdown-editor/ReactCodeFrame.tsx +45 -15
- package/src/markdown-editor/ReactCodeSandbox.tsx +1 -1
- package/src/markdown-editor/markdownScale.ts +149 -0
- package/src/menu/Menu.tsx +1 -1
- package/src/message/message.tsx +18 -8
- package/src/modal/Modal.tsx +13 -7
- package/src/pagination/Pagination.tsx +3 -3
- package/src/popover/Popover.tsx +1 -1
- package/src/scroll/OverlayScroll.tsx +2 -2
- package/src/segmented/Segmented.tsx +1 -1
- package/src/select/Select.tsx +4 -4
- package/src/sidebar/Sidebar.tsx +35 -32
- package/src/skeleton/Skeleton.tsx +4 -4
- package/src/spin/Spin.tsx +14 -2
- package/src/splitter/Splitter.tsx +1 -1
- package/src/styles.css +171 -813
- package/src/table/Table.tsx +12 -12
- package/src/tabs/Tabs.tsx +261 -0
- package/src/tag/Tag.tsx +16 -16
- package/src/theme.ts +53 -232
- package/src/timepicker/TimePicker.tsx +2 -2
- package/src/typography/Typography.tsx +41 -35
|
@@ -5,7 +5,6 @@ import type { AgentMessage } from "./common/types";
|
|
|
5
5
|
import { formatToolName } from "./common/utils";
|
|
6
6
|
import { ChatAgentMessage } from "./message-ui/ChatAgentMessage";
|
|
7
7
|
import { ChatError } from "./message-ui/ChatError";
|
|
8
|
-
import { ChatMarkdown } from "./message-ui/ChatMarkdown";
|
|
9
8
|
import { ChatThinking } from "./message-ui/ChatThinking";
|
|
10
9
|
import { ChatUserMessage } from "./message-ui/ChatUserMessage";
|
|
11
10
|
import { BackgroundTaskToolUI } from "./tool-ui/BackgroundTaskToolUI";
|
|
@@ -78,9 +77,7 @@ export function MessageRow({ msg, generating, toolUis }: { msg: AgentMessage; ge
|
|
|
78
77
|
const thinking = msg.meta?.thinking;
|
|
79
78
|
const thinkingDuration = msg.meta?.thinkingDuration;
|
|
80
79
|
return (
|
|
81
|
-
<ChatAgentMessage thinking={thinking} thinkingDuration={thinkingDuration ?? 0} thinkingStreaming={thinking != null && thinkingDuration == null}
|
|
82
|
-
{msg.content ? <ChatMarkdown content={msg.content} streaming={!!msg.streaming} /> : null}
|
|
83
|
-
</ChatAgentMessage>
|
|
80
|
+
<ChatAgentMessage content={msg.content} streaming={!!msg.streaming} thinking={thinking} thinkingDuration={thinkingDuration ?? 0} thinkingStreaming={thinking != null && thinkingDuration == null} />
|
|
84
81
|
);
|
|
85
82
|
}
|
|
86
83
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import { cn } from "../../lib/cn";
|
|
3
|
+
import { ChatMarkdown } from "./ChatMarkdown";
|
|
3
4
|
import { ChatThinking } from "./ChatThinking";
|
|
4
5
|
|
|
5
6
|
export type ChatAgentMessageProps = {
|
|
6
|
-
/**
|
|
7
|
+
/** Markdown body. Rendered with `MarkdownViewer` `variant="chat"`. */
|
|
7
8
|
content?: string;
|
|
8
|
-
|
|
9
|
+
streaming?: boolean;
|
|
10
|
+
/** Extra row content. Replaces `content` when set. */
|
|
9
11
|
children?: ReactNode;
|
|
10
12
|
thinking?: string;
|
|
11
13
|
thinkingDuration?: number;
|
|
@@ -13,8 +15,8 @@ export type ChatAgentMessageProps = {
|
|
|
13
15
|
className?: string;
|
|
14
16
|
};
|
|
15
17
|
|
|
16
|
-
export function ChatAgentMessage({ content, children, thinking, thinkingDuration, thinkingStreaming, className }: ChatAgentMessageProps) {
|
|
17
|
-
const body = children ?? (content ? <
|
|
18
|
+
export function ChatAgentMessage({ content, streaming = false, children, thinking, thinkingDuration, thinkingStreaming, className }: ChatAgentMessageProps) {
|
|
19
|
+
const body = children ?? (content ? <ChatMarkdown content={content} streaming={streaming} /> : null);
|
|
18
20
|
|
|
19
21
|
return (
|
|
20
22
|
<div className={cn("nonla-chat-agent mt-1", className)}>
|
|
@@ -12,7 +12,7 @@ export function ChatError({ children, className }: ChatErrorProps) {
|
|
|
12
12
|
<div className={cn("nonla-chat-error px-4 py-1", className)}>
|
|
13
13
|
<div
|
|
14
14
|
role="alert"
|
|
15
|
-
className="flex items-center gap-2 rounded-lg border border-destructive/40 bg-[color-mix(in_oklab,var(--destructive)_14%,var(--nonla-surface))] px-3 py-2 text-
|
|
15
|
+
className="flex items-center gap-2 rounded-lg border border-destructive/40 bg-[color-mix(in_oklab,var(--destructive)_14%,var(--nonla-surface))] px-3 py-2 text-[15px] leading-6 text-destructive"
|
|
16
16
|
>
|
|
17
17
|
<SolarIcon name="close-circle-linear" size={16} className="shrink-0" />
|
|
18
18
|
<div className="min-w-0">{children}</div>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type KeyboardEvent as ReactKeyboardEvent, type ReactNode, useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
2
2
|
import { SolarIcon } from "../../icon/SolarIcon";
|
|
3
3
|
import { cn } from "../../lib/cn";
|
|
4
|
+
import { glassSurfaceClass } from "../../lib/surface";
|
|
4
5
|
|
|
5
6
|
export type ChatInputProps = {
|
|
6
7
|
generating?: boolean;
|
|
@@ -124,7 +125,7 @@ export function ChatInput({ generating = false, placeholder = "Message…", disa
|
|
|
124
125
|
};
|
|
125
126
|
|
|
126
127
|
return (
|
|
127
|
-
<div className={cn("nonla-
|
|
128
|
+
<div className={cn(glassSurfaceClass, "nonla-chat-input relative isolate mx-4 mb-2.5 flex shrink-0 flex-col overflow-hidden rounded-xl border-(--nonla-input) bg-muted-strong pt-1 [.light:not(.dark)_&]:bg-background [.light:not(.dark)_&]:shadow-none [.light_.nonla-ui:not(.dark)_&]:bg-background [.light_.nonla-ui:not(.dark)_&]:shadow-none", disabled && "opacity-70", className)}>
|
|
128
129
|
<textarea
|
|
129
130
|
ref={textareaRef}
|
|
130
131
|
data-chat-input
|
|
@@ -136,8 +137,8 @@ export function ChatInput({ generating = false, placeholder = "Message…", disa
|
|
|
136
137
|
rows={1}
|
|
137
138
|
className={cn(
|
|
138
139
|
"w-full resize-none appearance-none border-0 bg-transparent shadow-none outline-none focus:outline-none px-2.5 pt-1 pb-2.5",
|
|
139
|
-
"text-
|
|
140
|
-
disabled ? "text-muted-foreground cursor-not-allowed placeholder:text-
|
|
140
|
+
"text-[15px] leading-6 font-normal",
|
|
141
|
+
disabled ? "text-muted-foreground cursor-not-allowed placeholder:text-quaternary-foreground" : "text-foreground placeholder:text-quaternary-foreground",
|
|
141
142
|
)}
|
|
142
143
|
/>
|
|
143
144
|
|
|
@@ -151,7 +152,7 @@ export function ChatInput({ generating = false, placeholder = "Message…", disa
|
|
|
151
152
|
<div className="flex-1" />
|
|
152
153
|
|
|
153
154
|
{generating ? (
|
|
154
|
-
<button type="button" onClick={onCancel} title="Stop" className="w-6 h-6 rounded-full bg-brand text-(--nonla-solid
|
|
155
|
+
<button type="button" onClick={onCancel} title="Stop" className="w-6 h-6 rounded-full bg-brand text-(--nonla-text-on-solid) flex items-center justify-center shrink-0 cursor-pointer hover:bg-brand/90 active:scale-95 transition-all duration-100 border-0">
|
|
155
156
|
<SolarIcon name="stop-bold" size={12} />
|
|
156
157
|
<span className="sr-only">Stop</span>
|
|
157
158
|
</button>
|
|
@@ -5,7 +5,7 @@ export type ChatMarkdownProps = {
|
|
|
5
5
|
streaming?: boolean;
|
|
6
6
|
};
|
|
7
7
|
|
|
8
|
-
/** Agent markdown.
|
|
8
|
+
/** Agent markdown. `MarkdownViewer` on the `chat` scale. */
|
|
9
9
|
export function ChatMarkdown({ content, streaming = false }: ChatMarkdownProps) {
|
|
10
|
-
return <MarkdownViewer value={content} streaming={streaming} />;
|
|
10
|
+
return <MarkdownViewer value={content} streaming={streaming} variant="chat" />;
|
|
11
11
|
}
|
|
@@ -29,15 +29,15 @@ export function ChatUserMessage({ content, className }: ChatUserMessageProps) {
|
|
|
29
29
|
return (
|
|
30
30
|
<div
|
|
31
31
|
className={cn(
|
|
32
|
-
"nonla-chat-user relative isolate mt-6 mb-3
|
|
33
|
-
"
|
|
32
|
+
"nonla-chat-user relative isolate mx-4 mt-6 mb-3 overflow-hidden rounded-xl border border-solid border-(--nonla-input) bg-muted-strong px-3 py-1.5",
|
|
33
|
+
"[.light:not(.dark)_&]:bg-sidebar [.light_.nonla-ui:not(.dark)_&]:bg-sidebar",
|
|
34
34
|
className,
|
|
35
35
|
)}
|
|
36
36
|
>
|
|
37
37
|
<div
|
|
38
38
|
ref={contentRef}
|
|
39
39
|
className={cn(
|
|
40
|
-
"overflow-hidden text-
|
|
40
|
+
"overflow-hidden text-[15px] leading-6 text-foreground whitespace-pre-wrap wrap-break-word",
|
|
41
41
|
collapsed && "mask-[linear-gradient(to_bottom,#000_calc(100%-1.75rem),transparent)]",
|
|
42
42
|
)}
|
|
43
43
|
style={{ maxHeight: collapsed ? MAX_HEIGHT : undefined }}
|
|
@@ -27,7 +27,7 @@ function TaskLogsModal({
|
|
|
27
27
|
|
|
28
28
|
return (
|
|
29
29
|
<Modal open={open} onCancel={onClose} footer={null} title={task ? formatToolName(task.toolName) : "Logs"} width={560}>
|
|
30
|
-
<pre ref={preRef} className="m-0 max-h-[50vh] overflow-auto rounded-md border border-border-
|
|
30
|
+
<pre ref={preRef} className="m-0 max-h-[50vh] overflow-auto rounded-md border border-border-secondary bg-muted px-3 py-2 font-mono text-[13px] leading-relaxed whitespace-pre-wrap break-all text-foreground">
|
|
31
31
|
{logs || "Waiting for output…"}
|
|
32
32
|
</pre>
|
|
33
33
|
</Modal>
|
|
@@ -49,7 +49,7 @@ function TaskRow({
|
|
|
49
49
|
}) {
|
|
50
50
|
return (
|
|
51
51
|
<div className="flex items-center gap-1 px-1.5 py-0.5">
|
|
52
|
-
<button type="button" onClick={onLogs} title="Logs" aria-label={`Logs ${formatToolName(task.toolName)}`} className="flex min-w-0 flex-1 cursor-pointer items-center gap-2 rounded-md px-1 py-[3px] text-left transition-colors hover:bg-
|
|
52
|
+
<button type="button" onClick={onLogs} title="Logs" aria-label={`Logs ${formatToolName(task.toolName)}`} className="flex min-w-0 flex-1 cursor-pointer items-center gap-2 rounded-md px-1 py-[3px] text-left transition-colors hover:bg-muted">
|
|
53
53
|
<Spin variant="agent" size="small" className="shrink-0" />
|
|
54
54
|
<span className="min-w-0 flex-1 truncate text-[13px] font-medium text-foreground">{formatToolName(task.toolName)}</span>
|
|
55
55
|
<span className="shrink-0 text-[12px] tabular-nums text-tertiary-foreground">{formatBgElapsed(task.startedAt, now)}</span>
|
|
@@ -118,7 +118,7 @@ export function BackgroundTasksBar({ children, tasks = [], cancellingIds, onCanc
|
|
|
118
118
|
|
|
119
119
|
{tasks.length > 0 ? (
|
|
120
120
|
<div className="absolute inset-x-6 bottom-[calc(100%)] z-20 overflow-hidden rounded-t-lg border-x border-t border-border">
|
|
121
|
-
<div className={cn("flex h-7.5 items-center gap-1 px-1", open && "border-b border-border-
|
|
121
|
+
<div className={cn("flex h-7.5 items-center gap-1 px-1", open && "border-b border-border-secondary")}>
|
|
122
122
|
<button type="button" onClick={() => setOpen((v) => !v)} className="flex min-w-0 flex-1 cursor-pointer font-medium items-center gap-1 rounded-md px-1.5 py-1 text-[13px] text-muted-foreground/90 transition-colors hover:text-foreground" aria-expanded={open} aria-label={label}>
|
|
123
123
|
<SolarIcon name="alt-arrow-down-linear" size={13} className={cn("shrink-0 transition-transform duration-150", !open && "-rotate-90")} />
|
|
124
124
|
<span className="truncate">{label}</span>
|
|
@@ -122,7 +122,7 @@ export function CallAgentToolUI({ msg, assistantLabel = "Assistant", assistantCo
|
|
|
122
122
|
<ToolUiBadge show={showAvatar} label={assistantLabel} color={assistantColor} />
|
|
123
123
|
<div className="px-4 py-1">
|
|
124
124
|
<div className={cn("overflow-hidden rounded-xl border bg-card", failed ? "border-destructive/35" : "border-border")}>
|
|
125
|
-
<div className="flex items-center gap-2 border-b border-border-
|
|
125
|
+
<div className="flex items-center gap-2 border-b border-border-secondary px-3 py-2">
|
|
126
126
|
{calling ? (
|
|
127
127
|
<Spin variant="agent" size="small" className="shrink-0" />
|
|
128
128
|
) : (
|
|
@@ -138,7 +138,7 @@ export function CallAgentToolUI({ msg, assistantLabel = "Assistant", assistantCo
|
|
|
138
138
|
<div className="flex flex-col gap-3 px-3 py-3">
|
|
139
139
|
{composing || hasRequest ? (
|
|
140
140
|
<AgentTurn name={assistantLabel} align="end">
|
|
141
|
-
<div className="rounded-2xl rounded-tr-sm border border-solid border-(--nonla-input) bg-
|
|
141
|
+
<div className="nonla-chat-user rounded-2xl rounded-tr-sm border border-solid border-(--nonla-input) bg-muted-strong px-3 py-2 text-left [.light:not(.dark)_&]:bg-sidebar [.light_.nonla-ui:not(.dark)_&]:bg-sidebar">
|
|
142
142
|
{composing ? <TypingDots /> : <p className="m-0 text-[14px] leading-[1.55] whitespace-pre-wrap text-foreground">{requestMessage}</p>}
|
|
143
143
|
</div>
|
|
144
144
|
</AgentTurn>
|
|
@@ -53,14 +53,14 @@ export function ChatToolCall({ toolName = "Tool", label, toolInput, toolOutput,
|
|
|
53
53
|
|
|
54
54
|
{open && expandable ? (
|
|
55
55
|
<div className="mt-1.5 mb-1 overflow-hidden rounded-lg border border-border bg-card font-mono text-[13px]">
|
|
56
|
-
{hasInput ? <pre className="m-0 max-h-27.5 overflow-y-auto bg-
|
|
56
|
+
{hasInput ? <pre className="m-0 max-h-27.5 overflow-y-auto bg-muted px-3 py-1.5 break-all whitespace-pre-wrap font-normal leading-[1.65] text-muted-foreground">{prettyJson(toolInput)}</pre> : null}
|
|
57
57
|
{running ? (
|
|
58
|
-
<div className="bg-
|
|
58
|
+
<div className="bg-muted-strong px-3 py-1.5 text-muted-foreground">
|
|
59
59
|
<Shimmer className="italic">Running…</Shimmer>
|
|
60
60
|
</div>
|
|
61
61
|
) : null}
|
|
62
62
|
{!isPending ? (
|
|
63
|
-
<pre className={cn("m-0 max-h-75 overflow-y-auto bg-
|
|
63
|
+
<pre className={cn("m-0 max-h-75 overflow-y-auto bg-muted-strong px-3 py-1.5 break-all whitespace-pre-wrap font-normal leading-[1.65] text-muted-foreground", hasError && "bg-destructive/6")}>
|
|
64
64
|
{hasOutput ? prettyJson(toolOutput) : typeof toolError === "string" ? toolError : "Tool execution failed"}
|
|
65
65
|
</pre>
|
|
66
66
|
) : null}
|
|
@@ -63,13 +63,13 @@ export function ReadSkillToolUI({ msg, assistantLabel = "Assistant", assistantCo
|
|
|
63
63
|
<ToolUiTrailing failed={failed} chevron chevronClassName="group-hover/readskill:opacity-100 group-open/readskill:opacity-100 group-open/readskill:rotate-90" />
|
|
64
64
|
</summary>
|
|
65
65
|
{body ? (
|
|
66
|
-
<pre className={cn("m-0 mt-1.5 mb-1 max-h-40 overflow-y-auto rounded-lg border px-3 py-2 font-mono text-[13px] font-normal leading-[1.65] break-all whitespace-pre-wrap", failed ? "border-destructive/35 bg-destructive/6 text-destructive" : "border-
|
|
66
|
+
<pre className={cn("m-0 mt-1.5 mb-1 max-h-40 overflow-y-auto rounded-lg border px-3 py-2 font-mono text-[13px] font-normal leading-[1.65] break-all whitespace-pre-wrap", failed ? "border-destructive/35 bg-destructive/6 text-destructive" : "border-border bg-card text-muted-foreground")}>{body}</pre>
|
|
67
67
|
) : null}
|
|
68
68
|
{!running && !reference && available.length > 0 ? (
|
|
69
69
|
<div className="mt-0.5 mb-1 flex flex-wrap items-center gap-1">
|
|
70
70
|
<span className="text-[10px] font-medium tracking-wide text-quaternary-foreground uppercase">Refs</span>
|
|
71
71
|
{available.map((name) => (
|
|
72
|
-
<span key={name} className="inline-flex max-w-full items-center rounded-md border border-border-
|
|
72
|
+
<span key={name} className="inline-flex max-w-full items-center rounded-md border border-border-secondary bg-muted/40 px-1.5 py-0.5 font-mono text-[13px] leading-[1.4] text-tertiary-foreground">
|
|
73
73
|
{skillName ? `${skillName} / ${name}` : name}
|
|
74
74
|
</span>
|
|
75
75
|
))}
|
|
@@ -97,7 +97,7 @@ export function RunJsToolUI({ msg, assistantLabel = "Assistant", assistantColor,
|
|
|
97
97
|
{showOutput ? <SandboxOutput running={running} failed={failed} consoleOut={consoleOut} result={resultBody} /> : null}
|
|
98
98
|
</CodeBlock>
|
|
99
99
|
) : showOutput ? (
|
|
100
|
-
<div className={cn("mt-1.5 mb-1 overflow-hidden rounded-lg border", failed ? "border-destructive/35" : "border-
|
|
100
|
+
<div className={cn("mt-1.5 mb-1 overflow-hidden rounded-lg border", failed ? "border-destructive/35" : "border-border")}>
|
|
101
101
|
<SandboxOutput running={running} failed={failed} consoleOut={consoleOut} result={resultBody} />
|
|
102
102
|
</div>
|
|
103
103
|
) : null}
|
|
@@ -2,7 +2,7 @@ export function ToolUiBadge({ show = false, label, color }: { show?: boolean; la
|
|
|
2
2
|
if (!show) return null;
|
|
3
3
|
return (
|
|
4
4
|
<div className="flex items-center gap-2.5 px-4 pt-3 pb-1">
|
|
5
|
-
<span className="inline-flex items-center rounded px-1.5 py-0.5 text-[10px] font-bold tracking-wider uppercase select-none" style={{ background: color ?? "var(--
|
|
5
|
+
<span className="inline-flex items-center rounded px-1.5 py-0.5 text-[10px] font-bold tracking-wider uppercase select-none" style={{ background: color ?? "var(--nonla-text-main)", color: "var(--nonla-bg)", letterSpacing: "0.08em" }}>
|
|
6
6
|
{label}
|
|
7
7
|
</span>
|
|
8
8
|
</div>
|
|
@@ -51,7 +51,7 @@ export function WebFetchToolUI({ msg, assistantLabel = "Assistant", assistantCol
|
|
|
51
51
|
{expandable ? (
|
|
52
52
|
<details className="group/webfetch px-4 pb-2" style={{ overflowAnchor: "none" }}>
|
|
53
53
|
<summary className="flex cursor-pointer list-none items-center gap-2 py-0.5 text-[14px] leading-5.5 select-none [&::-webkit-details-marker]:hidden">{header}</summary>
|
|
54
|
-
<pre className={cn("m-0 mt-1.5 mb-1 max-h-40 overflow-y-auto rounded-lg border px-3 py-2 font-mono text-[13px] font-normal leading-[1.65] break-all whitespace-pre-wrap", failed ? "border-destructive/35 bg-destructive/6 text-destructive" : "border-
|
|
54
|
+
<pre className={cn("m-0 mt-1.5 mb-1 max-h-40 overflow-y-auto rounded-lg border px-3 py-2 font-mono text-[13px] font-normal leading-[1.65] break-all whitespace-pre-wrap", failed ? "border-destructive/35 bg-destructive/6 text-destructive" : "border-border bg-card text-muted-foreground")}>{body}</pre>
|
|
55
55
|
</details>
|
|
56
56
|
) : (
|
|
57
57
|
<div className="px-4 pb-2">
|
|
@@ -17,9 +17,9 @@ export type CheckboxProps = Omit<ComponentPropsWithoutRef<typeof CheckboxPrimiti
|
|
|
17
17
|
|
|
18
18
|
const CHECKED_FILL: Record<CheckboxColor, string> = {
|
|
19
19
|
brand:
|
|
20
|
-
"data-[state=checked]:bg-brand data-[state=checked]:border-brand data-[state=checked]:text-(--nonla-solid
|
|
20
|
+
"data-[state=checked]:bg-brand data-[state=checked]:border-brand data-[state=checked]:text-(--nonla-text-on-solid) data-[state=indeterminate]:bg-brand data-[state=indeterminate]:border-brand data-[state=indeterminate]:text-(--nonla-text-on-solid)",
|
|
21
21
|
success:
|
|
22
|
-
"data-[state=checked]:bg-success data-[state=checked]:border-success data-[state=checked]:text-(--nonla-solid
|
|
22
|
+
"data-[state=checked]:bg-success data-[state=checked]:border-success data-[state=checked]:text-(--nonla-text-on-solid) data-[state=indeterminate]:bg-success data-[state=indeterminate]:border-success data-[state=indeterminate]:text-(--nonla-text-on-solid)",
|
|
23
23
|
white:
|
|
24
24
|
"data-[state=checked]:bg-white data-[state=checked]:border-white data-[state=checked]:text-[#141414] data-[state=indeterminate]:bg-white data-[state=indeterminate]:border-white data-[state=indeterminate]:text-[#141414]",
|
|
25
25
|
};
|
|
@@ -45,7 +45,7 @@ export function CodeBlock({ code, language, title, lineNumbers = false, wordWrap
|
|
|
45
45
|
return (
|
|
46
46
|
<CodeBlockContext.Provider value={{ code }}>
|
|
47
47
|
<div className={cn("nonla-codeblock relative flex min-w-0 w-full flex-col overflow-clip rounded-xl border border-border bg-card text-sm text-foreground", className)} data-language={language} {...props}>
|
|
48
|
-
<div className="flex h-8 items-center justify-between gap-2 pl-3 pr-1 text-xs text-muted-foreground">
|
|
48
|
+
<div className="nonla-codeblock-header flex h-8 items-center justify-between gap-2 pl-3 pr-1 text-xs text-muted-foreground">
|
|
49
49
|
<div className="flex min-w-0 items-center gap-2">
|
|
50
50
|
{label ? <span className="truncate font-medium">{label}</span> : null}
|
|
51
51
|
</div>
|
|
@@ -54,7 +54,7 @@ export function CodeBlock({ code, language, title, lineNumbers = false, wordWrap
|
|
|
54
54
|
|
|
55
55
|
<OverlayScroll
|
|
56
56
|
autoHeight
|
|
57
|
-
className="nonla-codeblock-body nonla-codeblock-well min-w-0 bg-card font-mono text-
|
|
57
|
+
className="nonla-codeblock-body nonla-codeblock-well min-w-0 bg-card font-mono text-(length:--md-code-size,13px) leading-(--md-code-leading,20px) max-h-96"
|
|
58
58
|
innerClassName={wordWrap ? undefined : "overflow-x-auto"}
|
|
59
59
|
>
|
|
60
60
|
<pre className={cn("nonla-codeblock-pre m-0 whitespace-pre break-normal", lineNumbers && "nonla-codeblock-lines", wordWrap && "whitespace-pre-wrap wrap-break-word")}>
|
|
@@ -39,6 +39,11 @@ import {
|
|
|
39
39
|
export type { ColorFormat, ColorType, HsbaColor };
|
|
40
40
|
export { Color, DEFAULT_COLOR, parseColor };
|
|
41
41
|
|
|
42
|
+
const CHECKERED =
|
|
43
|
+
"nonla-color-checkered bg-white [background-image:conic-gradient(#d9d9d9_0.25turn,#fff_0.25turn_0.5turn,#d9d9d9_0.5turn_0.75turn,#fff_0.75turn)] [background-size:8px_8px]";
|
|
44
|
+
const CLEARED =
|
|
45
|
+
"nonla-color-cleared bg-[linear-gradient(to_bottom_left,transparent_calc(50%-1px),var(--destructive)_calc(50%-1px)_calc(50%+1px),transparent_calc(50%+1px))]";
|
|
46
|
+
|
|
42
47
|
export type PresetColorType = {
|
|
43
48
|
label: ReactNode;
|
|
44
49
|
defaultOpen?: boolean;
|
|
@@ -383,10 +388,7 @@ function PresetGroup({
|
|
|
383
388
|
type="button"
|
|
384
389
|
title={color.toHexString()}
|
|
385
390
|
aria-label={color.toHexString()}
|
|
386
|
-
className={cn(
|
|
387
|
-
"nonla-color-checkered size-5 cursor-pointer overflow-hidden rounded-sm border border-glass-border",
|
|
388
|
-
active && "ring-2 ring-brand ring-offset-1 ring-offset-background",
|
|
389
|
-
)}
|
|
391
|
+
className={cn(CHECKERED, "size-5 cursor-pointer overflow-hidden rounded-sm border border-border", active && "ring-2 ring-brand ring-offset-1 ring-offset-background")}
|
|
390
392
|
onClick={() => onPick(color)}
|
|
391
393
|
>
|
|
392
394
|
<span className="block size-full" style={{ backgroundColor: color.toRgbString() }} />
|
|
@@ -411,9 +413,9 @@ function ColorBlock({
|
|
|
411
413
|
style?: CSSProperties;
|
|
412
414
|
}) {
|
|
413
415
|
return (
|
|
414
|
-
<span className={cn("
|
|
416
|
+
<span className={cn(CHECKERED, "relative block overflow-hidden", className)} style={style}>
|
|
415
417
|
<span className="absolute inset-0" style={{ backgroundColor: cleared ? "transparent" : color.toRgbString() }} />
|
|
416
|
-
{cleared ? <span className="
|
|
418
|
+
{cleared ? <span className={cn(CLEARED, "absolute inset-0")} /> : null}
|
|
417
419
|
</span>
|
|
418
420
|
);
|
|
419
421
|
}
|
|
@@ -557,7 +559,7 @@ export function ColorPicker({
|
|
|
557
559
|
/>
|
|
558
560
|
{disabledAlpha ? null : (
|
|
559
561
|
<div className="relative">
|
|
560
|
-
<span className="
|
|
562
|
+
<span className={cn(CHECKERED, "pointer-events-none absolute inset-0 rounded-full")} />
|
|
561
563
|
<Slider
|
|
562
564
|
ariaLabel="Alpha"
|
|
563
565
|
value={hsba.a}
|
|
@@ -701,7 +703,7 @@ export function ColorPicker({
|
|
|
701
703
|
style={styles?.popup}
|
|
702
704
|
>
|
|
703
705
|
{rendered}
|
|
704
|
-
{showArrow ? <PopoverPrimitive.Arrow width={12} height={6} className="fill-
|
|
706
|
+
{showArrow ? <PopoverPrimitive.Arrow width={12} height={6} className="fill-card drop-shadow-[0_1px_0_var(--border)]" /> : null}
|
|
705
707
|
</PopoverPrimitive.Content>
|
|
706
708
|
</PopoverPrimitive.Portal>
|
|
707
709
|
</PopoverPrimitive.Root>
|
|
@@ -278,7 +278,7 @@ const DatePickerRoot = forwardRef<HTMLButtonElement, DatePickerProps>(function D
|
|
|
278
278
|
) : null
|
|
279
279
|
}
|
|
280
280
|
>
|
|
281
|
-
<span className={cn(!selected && "text-
|
|
281
|
+
<span className={cn(!selected && "text-quaternary-foreground")}>{selected ? label : placeholder}</span>
|
|
282
282
|
</TriggerChrome>
|
|
283
283
|
</PopoverPrimitive.Trigger>
|
|
284
284
|
<PopoverPrimitive.Portal container={portal}>
|
|
@@ -418,9 +418,9 @@ const RangePicker = forwardRef<HTMLButtonElement, RangePickerProps>(function Ran
|
|
|
418
418
|
}
|
|
419
419
|
>
|
|
420
420
|
<span className="inline-flex min-w-0 items-center gap-1.5">
|
|
421
|
-
<span className={cn("truncate", !selected?.from && "text-
|
|
421
|
+
<span className={cn("truncate", !selected?.from && "text-quaternary-foreground")}>{selected?.from ? startLabel : placeholders[0]}</span>
|
|
422
422
|
<span className="shrink-0 text-muted-foreground">{separator}</span>
|
|
423
|
-
<span className={cn("truncate", !rangeComplete && "text-
|
|
423
|
+
<span className={cn("truncate", !rangeComplete && "text-quaternary-foreground")}>{rangeComplete ? endLabel : placeholders[1]}</span>
|
|
424
424
|
</span>
|
|
425
425
|
</TriggerChrome>
|
|
426
426
|
</PopoverPrimitive.Trigger>
|
|
@@ -63,7 +63,7 @@ export function DesktopBarItem({
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
export function DesktopBarDivider({ className }: { className?: string }) {
|
|
66
|
-
return <span className={cn("mx-2 h-4 w-px bg-
|
|
66
|
+
return <span className={cn("mx-2 h-4 w-px bg-border", className)} aria-hidden />;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
export type DesktopHeaderProps = {
|
|
@@ -76,7 +76,7 @@ export function DesktopHeader({ left, right, className }: DesktopHeaderProps) {
|
|
|
76
76
|
return (
|
|
77
77
|
<header
|
|
78
78
|
className={cn(
|
|
79
|
-
"nonla-header-layer fixed inset-x-0 top-0 flex h-
|
|
79
|
+
"nonla-header-layer fixed inset-x-0 top-0 z-(--nonla-z-header,40) flex h-[42px] items-center justify-between gap-3 border-0 bg-background px-3",
|
|
80
80
|
className,
|
|
81
81
|
)}
|
|
82
82
|
>
|
|
@@ -2,5 +2,5 @@ import type { ReactNode } from "react";
|
|
|
2
2
|
import { cn } from "../lib/cn";
|
|
3
3
|
|
|
4
4
|
export function DesktopStage({ children, className }: { children?: ReactNode; className?: string }) {
|
|
5
|
-
return <div className={cn("relative h-dvh w-screen overflow-hidden bg-
|
|
5
|
+
return <div className={cn("relative h-dvh w-screen overflow-hidden bg-background", className)}>{children}</div>;
|
|
6
6
|
}
|
|
@@ -605,7 +605,7 @@ export function DesktopWindow({
|
|
|
605
605
|
|
|
606
606
|
return (
|
|
607
607
|
<WindowHeaderSlotContext.Provider value={headerChrome}>
|
|
608
|
-
<div ref={overlayRef} className="nonla-window-layer pointer-events-none absolute inset-x-0 bottom-0 top-
|
|
608
|
+
<div ref={overlayRef} className="nonla-window-layer pointer-events-none absolute inset-x-0 bottom-0 top-[42px] z-(--nonla-z-window,30)">
|
|
609
609
|
<section
|
|
610
610
|
ref={frameRef}
|
|
611
611
|
aria-label={typeof title === "string" && title ? title : "Window"}
|
|
@@ -627,13 +627,13 @@ export function DesktopWindow({
|
|
|
627
627
|
transition: [geom, zoom].filter(Boolean).join(", ") || undefined,
|
|
628
628
|
}}
|
|
629
629
|
data-expanded={expanded || undefined}
|
|
630
|
-
className={cn("absolute flex flex-col rounded-xl pointer-events-auto transform-gpu", glassSurfaceClass, "nonla-window-glass", phase !== "open" && "pointer-events-none")}
|
|
630
|
+
className={cn("absolute flex flex-col rounded-xl pointer-events-auto transform-gpu", glassSurfaceClass, "nonla-window-glass border border-solid border-border bg-background shadow-(--nonla-shadow)", phase !== "open" && "pointer-events-none")}
|
|
631
631
|
>
|
|
632
632
|
<div className="relative flex min-h-0 flex-1 flex-col overflow-hidden rounded-xl">
|
|
633
633
|
{header ? (
|
|
634
634
|
<header
|
|
635
635
|
onPointerDown={startDrag}
|
|
636
|
-
className="nonla-window-header flex h-9 shrink-0 cursor-default items-center gap-4 border-0 px-3 select-none
|
|
636
|
+
className="nonla-window-header flex h-9 shrink-0 cursor-default touch-none items-center gap-4 border-0 bg-bar px-3 select-none"
|
|
637
637
|
>
|
|
638
638
|
<WindowTraffic expanded={expanded} onClose={requestClose} onToggleExpand={onToggleExpand} />
|
|
639
639
|
<div className="flex min-w-0 flex-1 items-center">
|
|
@@ -3,9 +3,9 @@ import { MeadowWallpaper } from "./MeadowWallpaper";
|
|
|
3
3
|
|
|
4
4
|
export function MeadowDesktop({ children, src }: { children?: ReactNode; src?: string }) {
|
|
5
5
|
return (
|
|
6
|
-
<div className="absolute inset-0 bg-
|
|
6
|
+
<div className="absolute inset-0 bg-background">
|
|
7
7
|
<MeadowWallpaper src={src} />
|
|
8
|
-
<div className="nonla-desktop-layer absolute inset-x-0 bottom-0 top-desktop
|
|
8
|
+
<div className="nonla-desktop-layer absolute inset-x-0 bottom-0 top-[42px] z-(--nonla-z-desktop,20)">
|
|
9
9
|
<nav aria-label="Desktop" className="absolute inset-0 overflow-auto pl-0 pr-3 pt-3 pb-3">
|
|
10
10
|
<div className="flex h-full flex-col flex-wrap content-start gap-x-2 gap-y-3">{children}</div>
|
|
11
11
|
</nav>
|
package/src/drawer/Drawer.tsx
CHANGED
|
@@ -83,11 +83,15 @@ export function Drawer({
|
|
|
83
83
|
}}
|
|
84
84
|
>
|
|
85
85
|
<Dialog.Portal container={portal}>
|
|
86
|
-
<Dialog.Overlay className="nonla-overlay" />
|
|
86
|
+
<Dialog.Overlay className="nonla-overlay fixed inset-0 z-(--nonla-z-drawer) bg-(--mask) data-[state=open]:animate-[nonla-overlay-in_var(--nonla-dur)_var(--nonla-ease-out)] data-[state=closed]:animate-[nonla-overlay-out_var(--nonla-dur-fast)_var(--nonla-ease-in)]" />
|
|
87
87
|
<Dialog.Content
|
|
88
88
|
data-side={placement}
|
|
89
89
|
className={cn(
|
|
90
|
-
"nonla-drawer-panel fixed flex flex-col outline-none",
|
|
90
|
+
"nonla-drawer-panel fixed flex flex-col outline-none will-change-transform z-[calc(var(--nonla-z-drawer)+1)]",
|
|
91
|
+
"data-[side=right]:data-[state=open]:animate-[nonla-drawer-in-right_var(--nonla-dur-slow)_var(--nonla-ease-out)] data-[side=right]:data-[state=closed]:animate-[nonla-drawer-out-right_var(--nonla-dur)_var(--nonla-ease-in)]",
|
|
92
|
+
"data-[side=left]:data-[state=open]:animate-[nonla-drawer-in-left_var(--nonla-dur-slow)_var(--nonla-ease-out)] data-[side=left]:data-[state=closed]:animate-[nonla-drawer-out-left_var(--nonla-dur)_var(--nonla-ease-in)]",
|
|
93
|
+
"data-[side=bottom]:data-[state=open]:animate-[nonla-drawer-in-bottom_var(--nonla-dur-slow)_var(--nonla-ease-out)] data-[side=bottom]:data-[state=closed]:animate-[nonla-drawer-out-bottom_var(--nonla-dur)_var(--nonla-ease-in)]",
|
|
94
|
+
"data-[side=top]:data-[state=open]:animate-[nonla-drawer-in-top_var(--nonla-dur-slow)_var(--nonla-ease-out)] data-[side=top]:data-[state=closed]:animate-[nonla-drawer-out-top_var(--nonla-dur)_var(--nonla-ease-in)]",
|
|
91
95
|
glassSurfaceClass,
|
|
92
96
|
placement === "right" && "top-0 right-0 bottom-0 max-w-[100vw]",
|
|
93
97
|
placement === "left" && "top-0 left-0 bottom-0 max-w-[100vw]",
|
|
@@ -2,7 +2,7 @@ import { cn } from "../lib/cn";
|
|
|
2
2
|
import { glassOverlayClass } from "../lib/surface";
|
|
3
3
|
|
|
4
4
|
export const menuItemClass =
|
|
5
|
-
"nonla-menu-item relative flex cursor-default select-none items-center gap-2 rounded-lg border border-solid border-transparent px-2.5 py-1 text-sm leading-5 outline-none data-[disabled]:opacity-40";
|
|
5
|
+
"nonla-menu-item relative flex cursor-default select-none items-center gap-2 rounded-lg border border-solid border-transparent px-2.5 py-1 text-sm leading-5 outline-none data-[disabled]:opacity-40 data-highlighted:border-border data-highlighted:bg-ink-hover";
|
|
6
6
|
|
|
7
7
|
export const menuContentClass = cn(glassOverlayClass, "min-w-40 overflow-hidden p-1");
|
|
8
8
|
|
package/src/empty/Empty.tsx
CHANGED
|
@@ -22,7 +22,7 @@ function LogoMark() {
|
|
|
22
22
|
<ellipse cx="607.5" cy="705" rx="44.5" ry="68" />
|
|
23
23
|
<ellipse cx="921.5" cy="705" rx="44.5" ry="68" />
|
|
24
24
|
</g>
|
|
25
|
-
<g fill="var(--nonla-solid
|
|
25
|
+
<g fill="var(--nonla-text-on-solid)">
|
|
26
26
|
<ellipse cx="618" cy="678" rx="13" ry="19" />
|
|
27
27
|
<ellipse cx="932" cy="678" rx="13" ry="19" />
|
|
28
28
|
</g>
|
|
@@ -27,7 +27,7 @@ export function FieldRadio({ field, choices }: Props) {
|
|
|
27
27
|
/>
|
|
28
28
|
<span
|
|
29
29
|
aria-hidden
|
|
30
|
-
className="pointer-events-none size-4 rounded-full border border-solid border-input bg-
|
|
30
|
+
className="pointer-events-none size-4 rounded-full border border-solid border-input bg-muted peer-checked:border-brand"
|
|
31
31
|
/>
|
|
32
32
|
<span aria-hidden className="pointer-events-none absolute inset-[3.5px] rounded-full bg-brand opacity-0 peer-checked:opacity-100" />
|
|
33
33
|
</span>
|
|
@@ -37,7 +37,7 @@ export function FieldRepeaterItem({ index, remove, namePrefix, childItems, contr
|
|
|
37
37
|
<button
|
|
38
38
|
type="button"
|
|
39
39
|
aria-label="Remove item"
|
|
40
|
-
className="inline-flex size-5 items-center justify-center rounded border-0 bg-muted text-muted-foreground cursor-pointer hover:bg-destructive hover:text-
|
|
40
|
+
className="inline-flex size-5 items-center justify-center rounded border-0 bg-muted text-muted-foreground cursor-pointer hover:bg-destructive hover:text-(--nonla-text-on-solid)"
|
|
41
41
|
onClick={() => remove(index)}
|
|
42
42
|
>
|
|
43
43
|
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" aria-hidden>
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type { AppProps, NonlaAppConfig } from "./app/App";
|
|
2
|
-
export { App, useApp, useAppConfig, usePopupContainer
|
|
2
|
+
export { App, useApp, useAppConfig, usePopupContainer } from "./app/App";
|
|
3
3
|
export type { ButtonColor, ButtonGroupProps, ButtonProps, ButtonSize, ButtonType, ButtonVariant } from "./button/Button";
|
|
4
4
|
export { Button } from "./button/Button";
|
|
5
5
|
export type { ButtonCopyProps } from "./button/ButtonCopy";
|
|
@@ -15,7 +15,7 @@ export type InputRef = HTMLInputElement;
|
|
|
15
15
|
|
|
16
16
|
export type { AlertProps, AlertType } from "./alert/Alert";
|
|
17
17
|
export { Alert } from "./alert/Alert";
|
|
18
|
-
export type { AgentAvatarConfig, AgentAvatarLook, AgentAvatarMotion, AgentAvatarProps } from "./avatar/AgentAvatar";
|
|
18
|
+
export type { AgentAvatarConfig, AgentAvatarEyeColor, AgentAvatarLook, AgentAvatarMotion, AgentAvatarProps } from "./avatar/AgentAvatar";
|
|
19
19
|
export { AGENT_AVATAR_PARTS, AgentAvatar } from "./avatar/AgentAvatar";
|
|
20
20
|
export type { CalendarProps } from "./calendar/Calendar";
|
|
21
21
|
export { Calendar } from "./calendar/Calendar";
|
|
@@ -163,7 +163,7 @@ export type { LogoProps, LogoVariant } from "./logo/Logo";
|
|
|
163
163
|
export { Logo } from "./logo/Logo";
|
|
164
164
|
export type { MarkdownDiffLayout, MarkdownEditorMode, MarkdownEditorProps } from "./markdown-editor/MarkdownEditor";
|
|
165
165
|
export { MarkdownEditor } from "./markdown-editor/MarkdownEditor";
|
|
166
|
-
export type { MarkdownViewerProps } from "./markdown-editor/MarkdownViewer";
|
|
166
|
+
export type { MarkdownVariant, MarkdownViewerProps } from "./markdown-editor/MarkdownViewer";
|
|
167
167
|
export { MarkdownViewer } from "./markdown-editor/MarkdownViewer";
|
|
168
168
|
export type { MermaidBlockProps } from "./markdown-editor/MermaidBlock";
|
|
169
169
|
export { MermaidBlock } from "./markdown-editor/MermaidBlock";
|
|
@@ -213,10 +213,12 @@ export type {
|
|
|
213
213
|
TableRowSelection,
|
|
214
214
|
} from "./table/Table";
|
|
215
215
|
export { Table } from "./table/Table";
|
|
216
|
+
export type { TabsItem, TabsProps } from "./tabs/Tabs";
|
|
217
|
+
export { Tabs } from "./tabs/Tabs";
|
|
216
218
|
export type { TagProps, TagVariant } from "./tag/Tag";
|
|
217
219
|
export { Tag } from "./tag/Tag";
|
|
218
|
-
export type { NonlaColorMode, NonlaColorPreference
|
|
219
|
-
export {
|
|
220
|
+
export type { NonlaColorMode, NonlaColorPreference } from "./theme";
|
|
221
|
+
export { getColorMode, getColorPreference, initColorMode, NONLA_COLOR_MODE_KEY, setColorMode, setColorPreference } from "./theme";
|
|
220
222
|
export type { ThemeSwitcherProps } from "./theme-switcher/ThemeSwitcher";
|
|
221
223
|
export { ThemeSwitcher, useColorPreference } from "./theme-switcher/ThemeSwitcher";
|
|
222
224
|
export type { ThemeToggleProps } from "./theme-toggle/ThemeToggle";
|
|
@@ -5,6 +5,7 @@ import { Button } from "../button/Button";
|
|
|
5
5
|
import { SolarIcon } from "../icon/SolarIcon";
|
|
6
6
|
import { cn } from "../lib/cn";
|
|
7
7
|
import { type CanonicalSize, type ControlSize, controlHeightVar, controlRadiusVar, getSizeTokens, useControlSize } from "../lib/sizes";
|
|
8
|
+
import { glassSurfaceClass } from "../lib/surface";
|
|
8
9
|
import { message } from "../message/message";
|
|
9
10
|
|
|
10
11
|
const POPUP_PAD: Record<CanonicalSize, number> = { small: 12, default: 16, large: 20 };
|
|
@@ -12,7 +13,7 @@ const FIELD_INSET: Record<CanonicalSize, string> = { small: "-4px", default: "-6
|
|
|
12
13
|
const MULTILINE_MIN: Record<CanonicalSize, number> = { small: 56, default: 72, large: 96 };
|
|
13
14
|
const GLASS_BORDER = 1;
|
|
14
15
|
|
|
15
|
-
const fieldClass = (saving: boolean) => cn("relative z-1 m-0 w-full border-0 bg-transparent text-foreground placeholder:text-
|
|
16
|
+
const fieldClass = (saving: boolean) => cn("relative z-1 m-0 w-full border-0 bg-transparent text-foreground placeholder:text-quaternary-foreground focus:outline-none", saving && "opacity-60");
|
|
16
17
|
|
|
17
18
|
type Lock = {
|
|
18
19
|
top: number;
|
|
@@ -187,7 +188,7 @@ function EditorPopover({
|
|
|
187
188
|
|
|
188
189
|
return createPortal(
|
|
189
190
|
<div
|
|
190
|
-
className="nonla-popup-layer
|
|
191
|
+
className={cn(glassSurfaceClass, "nonla-popup-layer outline-none")}
|
|
191
192
|
style={{
|
|
192
193
|
position: "fixed",
|
|
193
194
|
zIndex: "var(--nonla-z-popup, 1050)",
|