@nextclaw/ui 0.14.2 → 0.14.3
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/CHANGELOG.md +12 -0
- package/dist/assets/{api-a14tR_z1.js → api-BP_8IaxB.js} +3 -3
- package/dist/assets/{channels-list-page-CFGkm4DT.js → channels-list-page-DEh5Jjqx.js} +1 -1
- package/dist/assets/chat-page-BRB0N5WW.js +105 -0
- package/dist/assets/config-split-page-CRhlZ_pH.js +1 -0
- package/dist/assets/{confirm-dialog-ClH_Ec7n.js → confirm-dialog-DsivFJ4r.js} +2 -2
- package/dist/assets/{desktop-update-config-DPNDnVpk.js → desktop-update-config-B0w9p2ep.js} +1 -1
- package/dist/assets/{dist-BtCS2Ucq.js → dist-CikkhOlq.js} +1 -1
- package/dist/assets/{dist-CLGGLm8b.js → dist-PVA_xL1D.js} +1 -1
- package/dist/assets/doc-browser-BoNJ7-tE.js +1 -0
- package/dist/assets/doc-browser-CdJ_d4ik.js +1 -0
- package/dist/assets/{doc-browser-context-D4JwMMxK.js → doc-browser-context-MTw4EvKd.js} +1 -1
- package/dist/assets/{ellipsis-CtJXjIol.js → ellipsis-y6vDtq4M.js} +1 -1
- package/dist/assets/{external-link-CdJiG13p.js → external-link-DVJIQf_G.js} +1 -1
- package/dist/assets/index-BiE-K8-q.css +1 -0
- package/dist/assets/index-D9BAE_L_.js +105 -0
- package/dist/assets/{mcp-marketplace-page-BU0kIjhR.js → mcp-marketplace-page-B1SZNY5m.js} +1 -1
- package/dist/assets/mcp-marketplace-page-Cq_Tw42T.js +1 -0
- package/dist/assets/{model-config-page-D6hYXROd.js → model-config-page-DotaTUHb.js} +1 -1
- package/dist/assets/plus-BbZqquJe.js +1 -0
- package/dist/assets/{provider-scoped-model-input-DAX2HgmR.js → provider-scoped-model-input-DsFRuWJH.js} +1 -1
- package/dist/assets/providers-config-page-DW4tQSLN.js +1 -0
- package/dist/assets/{react-C6cZgP44.js → react-VNqT5Zp7.js} +1 -1
- package/dist/assets/remote-B8TiUfwW.js +1 -0
- package/dist/assets/rotate-cw-DjHDTkCv.js +1 -0
- package/dist/assets/{runtime-config-page-C5xKaV3i.js → runtime-config-page-S6ErRHR8.js} +1 -1
- package/dist/assets/{save-DKA0x4zk.js → save-BOJ477H-.js} +1 -1
- package/dist/assets/{search-BNlcoj5c.js → search-BEti5beA.js} +1 -1
- package/dist/assets/{search-config-page-Cq9uJ-N8.js → search-config-page-DGj5am03.js} +1 -1
- package/dist/assets/{secrets-config-page-CxSbZLBo.js → secrets-config-page--IzrIOid.js} +1 -1
- package/dist/assets/{select-CvTlDZTQ.js → select-hoj8dK4K.js} +2 -2
- package/dist/assets/{tag-chip-8ffF2y2C.js → tag-chip-T8-h-die.js} +1 -1
- package/dist/assets/{use-config-DmT0o1gv.js → use-config-CjRV2hwL.js} +1 -1
- package/dist/assets/x-D9PXs_xP.js +1 -0
- package/dist/index.html +69 -19
- package/index.html +55 -5
- package/package.json +7 -7
- package/src/app/components/layout/__tests__/sidebar.layout.test.tsx +3 -3
- package/src/app/components/layout/header.tsx +3 -3
- package/src/app/components/layout/page-layout.tsx +2 -2
- package/src/app/components/layout/runtime-status-entry.tsx +7 -7
- package/src/app/components/layout/sidebar-items.tsx +10 -10
- package/src/app/components/layout/sidebar-rail.styles.ts +2 -2
- package/src/app/components/layout/sidebar.tsx +6 -6
- package/src/app/styles/design-system.css +388 -26
- package/src/app/test/vitest-setup.ts +31 -0
- package/src/features/chat/components/chat-sidebar-list-mode-switch.tsx +3 -3
- package/src/features/chat/components/conversation/__tests__/chat-conversation-header.test.tsx +4 -2
- package/src/features/chat/components/conversation/chat-conversation-header-section.tsx +1 -1
- package/src/features/chat/components/conversation/chat-conversation-header.tsx +7 -6
- package/src/features/chat/components/conversation/chat-conversation-panel.tsx +1 -1
- package/src/features/chat/components/conversation/chat-conversation-skeleton.tsx +13 -13
- package/src/features/chat/components/layout/__tests__/chat-sidebar.test.tsx +2 -2
- package/src/features/chat/components/layout/chat-page-shell.tsx +1 -1
- package/src/features/chat/components/layout/chat-sidebar-desktop-layout.tsx +3 -3
- package/src/features/chat/components/layout/chat-sidebar-toolbar.tsx +14 -14
- package/src/features/chat/components/layout/chat-sidebar-utility-menu.tsx +15 -15
- package/src/features/chat/components/layout/chat-sidebar.tsx +3 -3
- package/src/features/chat/features/conversation/components/__tests__/session-conversation-area.test.tsx +225 -0
- package/src/features/chat/features/conversation/components/__tests__/session-conversation-input.streaming.test.tsx +199 -0
- package/src/features/chat/features/conversation/components/session-conversation-area.tsx +28 -9
- package/src/features/chat/features/conversation/components/session-conversation-input.tsx +18 -6
- package/src/features/chat/features/conversation/hooks/use-session-conversation-controller.ts +3 -13
- package/src/features/chat/features/conversation/hooks/use-session-conversation-input-query.ts +19 -3
- package/src/features/chat/features/message/components/chat-inline-panel-app-card.tsx +7 -7
- package/src/features/chat/features/message/components/chat-message-list.container.tsx +6 -6
- package/src/features/chat/features/session/components/chat-sidebar-project-groups.tsx +5 -5
- package/src/features/chat/features/session/components/chat-sidebar-session-list.tsx +4 -4
- package/src/features/chat/features/session/components/session-context-icon.tsx +2 -2
- package/src/features/chat/features/session/components/session-header/__tests__/chat-session-project-badge.test.tsx +2 -2
- package/src/features/chat/features/session/components/session-header/chat-session-header-actions.tsx +1 -1
- package/src/features/chat/features/session/components/session-header/chat-session-header-menu-item.tsx +1 -1
- package/src/features/chat/features/session/components/session-header/chat-session-metadata-dialog.tsx +1 -1
- package/src/features/chat/features/session/components/session-header/chat-session-project-badge.tsx +3 -3
- package/src/features/chat/features/session/components/session-run-badge.tsx +1 -1
- package/src/features/chat/features/session-type/hooks/use-chat-session-type-state.ts +10 -2
- package/src/features/chat/features/welcome/components/__tests__/chat-welcome.test.tsx +0 -7
- package/src/features/chat/features/welcome/components/chat-welcome-agent-picker.tsx +3 -3
- package/src/features/chat/features/welcome/components/chat-welcome-capability-grid.tsx +4 -4
- package/src/features/chat/features/welcome/components/chat-welcome-project-picker.tsx +14 -19
- package/src/features/chat/features/welcome/components/chat-welcome-session-type-picker.tsx +3 -3
- package/src/features/chat/features/welcome/components/chat-welcome.tsx +4 -4
- package/src/features/chat/features/welcome/utils/__tests__/chat-welcome-project-options.utils.test.ts +6 -8
- package/src/features/chat/features/welcome/utils/chat-welcome-project-options.utils.ts +1 -16
- package/src/features/panel-apps/components/panel-app-list-item.tsx +8 -8
- package/src/features/panel-apps/components/panel-app-toolbar.tsx +4 -4
- package/src/features/panel-apps/components/panel-apps-list.tsx +20 -20
- package/src/features/pwa/managers/__tests__/pwa-shell-theme.manager.test.ts +70 -6
- package/src/features/pwa/managers/pwa-shell-theme.manager.ts +10 -5
- package/src/features/service-apps/components/service-action-authorization-dialog.tsx +8 -8
- package/src/features/service-apps/components/service-apps-panel.tsx +24 -24
- package/src/features/settings/components/config/provider-advanced-settings-section.tsx +5 -5
- package/src/features/settings/components/config/provider-auth-section.tsx +7 -7
- package/src/features/settings/components/config/provider-form.tsx +10 -10
- package/src/features/settings/components/config/provider-models-section.tsx +16 -16
- package/src/features/settings/components/config/provider-pill-selector.tsx +1 -1
- package/src/features/settings/pages/providers-config-page.tsx +17 -17
- package/src/shared/components/config-split-page.tsx +11 -11
- package/src/shared/components/doc-browser/doc-browser-home-page.tsx +2 -2
- package/src/shared/components/doc-browser/doc-browser-panel-parts.tsx +4 -4
- package/src/shared/components/doc-browser/doc-browser-tab-strip.tsx +4 -4
- package/src/shared/components/doc-browser/doc-browser.tsx +3 -3
- package/src/shared/components/resizable-right-panel/resizable-right-panel.tsx +1 -1
- package/src/shared/components/ui/actions/icon-action-button.tsx +1 -1
- package/src/shared/components/ui/button.tsx +4 -4
- package/src/shared/components/ui/card.tsx +4 -4
- package/src/shared/components/ui/dialog.tsx +5 -5
- package/src/shared/components/ui/input.tsx +1 -1
- package/src/shared/components/ui/label.tsx +1 -1
- package/src/shared/components/ui/popover.tsx +1 -1
- package/src/shared/components/ui/select.tsx +3 -3
- package/src/shared/components/ui/switch.tsx +3 -3
- package/src/shared/components/ui/tabs.tsx +4 -4
- package/src/shared/components/ui/textarea.tsx +1 -1
- package/src/shared/lib/i18n/locales/en-US/core.json +7 -2
- package/src/shared/lib/i18n/locales/zh-CN/core.json +7 -2
- package/src/shared/lib/theme/index.ts +94 -52
- package/dist/assets/chat-page-CEdavJXc.js +0 -105
- package/dist/assets/config-split-page-B5b9B0uE.js +0 -1
- package/dist/assets/doc-browser-5nMWYKBD.js +0 -1
- package/dist/assets/doc-browser-BJRLhztv.js +0 -1
- package/dist/assets/index-BDN1zzMQ.js +0 -105
- package/dist/assets/index-g3uSZXoc.css +0 -1
- package/dist/assets/mcp-marketplace-page-sMNFSq_T.js +0 -1
- package/dist/assets/plus-DPjb0piO.js +0 -1
- package/dist/assets/providers-config-page-BzAeaACA.js +0 -1
- package/dist/assets/remote-B0G80uPr.js +0 -1
- package/dist/assets/rotate-cw-DnEB1Rju.js +0 -1
- package/dist/assets/x-BiSSpgqB.js +0 -1
package/index.html
CHANGED
|
@@ -11,27 +11,77 @@
|
|
|
11
11
|
<meta name="apple-mobile-web-app-title" content="NextClaw" />
|
|
12
12
|
<meta name="mobile-web-app-capable" content="yes" />
|
|
13
13
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
14
|
-
<meta name="theme-color" content="#
|
|
14
|
+
<meta name="theme-color" content="#FAF9F7" />
|
|
15
15
|
<meta name="color-scheme" content="light" />
|
|
16
16
|
<style>
|
|
17
17
|
html,
|
|
18
18
|
body,
|
|
19
19
|
#root {
|
|
20
|
-
background: #
|
|
20
|
+
background: #faf9f7;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
html[data-theme="minimal"],
|
|
24
|
+
html[data-theme="minimal"] body,
|
|
25
|
+
html[data-theme="minimal"] #root {
|
|
26
|
+
background: #ffffff;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
html[data-theme="warm"],
|
|
30
|
+
html[data-theme="warm"] body,
|
|
31
|
+
html[data-theme="warm"] #root {
|
|
32
|
+
background: #faf8f4;
|
|
21
33
|
}
|
|
22
34
|
|
|
23
35
|
html[data-theme="cool"],
|
|
24
36
|
html[data-theme="cool"] body,
|
|
25
37
|
html[data-theme="cool"] #root {
|
|
26
|
-
background: #
|
|
38
|
+
background: #f8fafc;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
html[data-theme="dawn"],
|
|
42
|
+
html[data-theme="dawn"] body,
|
|
43
|
+
html[data-theme="dawn"] #root {
|
|
44
|
+
background: #faf7f4;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
html[data-theme="graphite"],
|
|
48
|
+
html[data-theme="graphite"] body,
|
|
49
|
+
html[data-theme="graphite"] #root {
|
|
50
|
+
background: #f8f8f7;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
html[data-theme="probe"],
|
|
54
|
+
html[data-theme="probe"] body,
|
|
55
|
+
html[data-theme="probe"] #root {
|
|
56
|
+
background: #fefcf6;
|
|
27
57
|
}
|
|
28
58
|
</style>
|
|
29
59
|
<script>
|
|
30
60
|
(() => {
|
|
31
61
|
const storageKey = 'nextclaw.ui.theme';
|
|
32
62
|
const storedTheme = window.localStorage.getItem(storageKey);
|
|
33
|
-
const
|
|
34
|
-
|
|
63
|
+
const themeColors = {
|
|
64
|
+
natural: '#FAF9F7',
|
|
65
|
+
minimal: '#FFFFFF',
|
|
66
|
+
warm: '#FAF8F4',
|
|
67
|
+
cool: '#F8FAFC',
|
|
68
|
+
dawn: '#FAF7F4',
|
|
69
|
+
graphite: '#F8F8F7',
|
|
70
|
+
probe: '#FEFCF6'
|
|
71
|
+
};
|
|
72
|
+
const legacyThemeAliases = {
|
|
73
|
+
leaf: 'warm'
|
|
74
|
+
};
|
|
75
|
+
const normalizedStoredTheme = typeof storedTheme === 'string' && Object.prototype.hasOwnProperty.call(legacyThemeAliases, storedTheme)
|
|
76
|
+
? legacyThemeAliases[storedTheme]
|
|
77
|
+
: storedTheme;
|
|
78
|
+
const nextTheme = Object.prototype.hasOwnProperty.call(themeColors, normalizedStoredTheme)
|
|
79
|
+
? normalizedStoredTheme
|
|
80
|
+
: 'natural';
|
|
81
|
+
if (storedTheme !== nextTheme) {
|
|
82
|
+
window.localStorage.setItem(storageKey, nextTheme);
|
|
83
|
+
}
|
|
84
|
+
const themeColor = themeColors[nextTheme];
|
|
35
85
|
document.documentElement.setAttribute('data-theme', nextTheme);
|
|
36
86
|
document.documentElement.style.backgroundColor = themeColor;
|
|
37
87
|
document.documentElement.style.colorScheme = 'light';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextclaw/ui",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
"tailwind-merge": "^2.5.4",
|
|
29
29
|
"zod": "^3.23.8",
|
|
30
30
|
"zustand": "^5.0.2",
|
|
31
|
-
"@nextclaw/agent-chat": "0.
|
|
32
|
-
"@nextclaw/client-sdk": "0.4.
|
|
33
|
-
"@nextclaw/agent-chat-ui": "0.5.2",
|
|
31
|
+
"@nextclaw/agent-chat-ui": "0.5.3",
|
|
32
|
+
"@nextclaw/client-sdk": "0.4.6",
|
|
34
33
|
"@nextclaw/ncp": "0.6.5",
|
|
35
|
-
"@nextclaw/ncp-http-agent-client": "0.3.47",
|
|
36
34
|
"@nextclaw/ncp-toolkit": "0.5.40",
|
|
37
|
-
"@nextclaw/
|
|
38
|
-
"@nextclaw/
|
|
35
|
+
"@nextclaw/shared": "0.3.2",
|
|
36
|
+
"@nextclaw/ncp-http-agent-client": "0.3.47",
|
|
37
|
+
"@nextclaw/agent-chat": "0.2.15",
|
|
38
|
+
"@nextclaw/ncp-react": "0.4.55"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@testing-library/react": "^16.3.0",
|
|
@@ -101,7 +101,7 @@ describe("Sidebar", () => {
|
|
|
101
101
|
expect(backLink).toBeTruthy();
|
|
102
102
|
expect(header.className).not.toContain("bg-white");
|
|
103
103
|
expect(header.className).not.toContain("rounded-2xl");
|
|
104
|
-
expect(backLink.className).toContain("hover:bg-
|
|
104
|
+
expect(backLink.className).toContain("hover:bg-accent");
|
|
105
105
|
});
|
|
106
106
|
|
|
107
107
|
it("keeps the settings navigation in the expected product order", () => {
|
|
@@ -148,8 +148,8 @@ describe("Sidebar", () => {
|
|
|
148
148
|
expect(accountEntry.textContent).toContain("Account");
|
|
149
149
|
expect(screen.getByText("user@example.com")).toBeTruthy();
|
|
150
150
|
expect(accountEntry.className).toContain("py-2");
|
|
151
|
-
expect(accountEntry.className).toContain("text-
|
|
152
|
-
expect(accountEntry.className).toContain("hover:bg-
|
|
151
|
+
expect(accountEntry.className).toContain("text-muted-foreground");
|
|
152
|
+
expect(accountEntry.className).toContain("hover:bg-accent");
|
|
153
153
|
expect(accountStatus.className).toContain("text-[11px]");
|
|
154
154
|
});
|
|
155
155
|
|
|
@@ -5,13 +5,13 @@ interface HeaderProps {
|
|
|
5
5
|
|
|
6
6
|
export function Header({ title, description }: HeaderProps) {
|
|
7
7
|
return (
|
|
8
|
-
<header className="
|
|
8
|
+
<header className="sticky top-0 z-10 flex h-14 items-center bg-background/90 px-6 backdrop-blur-sm transition-all duration-base">
|
|
9
9
|
<div className="flex items-center gap-3">
|
|
10
10
|
{title && (
|
|
11
11
|
<div>
|
|
12
|
-
<h2 className="text-[15px] font-semibold text-
|
|
12
|
+
<h2 className="text-[15px] font-semibold text-foreground">{title}</h2>
|
|
13
13
|
{description && (
|
|
14
|
-
<p className="text-xs text-
|
|
14
|
+
<p className="mt-0.5 text-xs text-muted-foreground">{description}</p>
|
|
15
15
|
)}
|
|
16
16
|
</div>
|
|
17
17
|
)}
|
|
@@ -43,9 +43,9 @@ export function PageHeader({ title, description, actions, className }: PageHeade
|
|
|
43
43
|
return (
|
|
44
44
|
<div className={cn('flex items-center justify-between mb-6 shrink-0', className)}>
|
|
45
45
|
<div>
|
|
46
|
-
<h2 className="text-xl font-semibold text-
|
|
46
|
+
<h2 className="text-xl font-semibold text-foreground">{title}</h2>
|
|
47
47
|
{description && (
|
|
48
|
-
<p className="text-sm text-
|
|
48
|
+
<p className="text-sm text-muted-foreground mt-1">{description}</p>
|
|
49
49
|
)}
|
|
50
50
|
</div>
|
|
51
51
|
{actions && <div className="flex items-center gap-2 shrink-0">{actions}</div>}
|
|
@@ -12,7 +12,7 @@ type RuntimeStatusTone = 'healthy' | 'attention' | 'inactive';
|
|
|
12
12
|
const runtimeStatusToneStyles: Record<RuntimeStatusTone, string> = {
|
|
13
13
|
healthy: 'bg-emerald-500 shadow-[0_0_0_3px_rgba(16,185,129,0.14)]',
|
|
14
14
|
attention: 'bg-amber-400 shadow-[0_0_0_3px_rgba(251,191,36,0.16)]',
|
|
15
|
-
inactive: 'bg-
|
|
15
|
+
inactive: 'bg-muted-foreground/45 shadow-[0_0_0_3px_rgba(156,163,175,0.12)]'
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
type RuntimeStatusSummary = {
|
|
@@ -66,11 +66,11 @@ export function RuntimeStatusEntry() {
|
|
|
66
66
|
<PopoverContent
|
|
67
67
|
align="start"
|
|
68
68
|
sideOffset={10}
|
|
69
|
-
className="w-[290px] space-y-3 rounded-2xl border border-
|
|
69
|
+
className="w-[290px] space-y-3 rounded-2xl border border-border bg-popover p-4 text-popover-foreground"
|
|
70
70
|
>
|
|
71
71
|
<div className="space-y-1">
|
|
72
|
-
<div className="text-sm font-semibold text-
|
|
73
|
-
<p className="text-xs leading-5 text-
|
|
72
|
+
<div className="text-sm font-semibold text-foreground">{summary.title}</div>
|
|
73
|
+
<p className="text-xs leading-5 text-muted-foreground">{summary.description}</p>
|
|
74
74
|
</div>
|
|
75
75
|
{summary.reasonLines.length > 0 ? (
|
|
76
76
|
<div className="space-y-2">
|
|
@@ -85,13 +85,13 @@ export function RuntimeStatusEntry() {
|
|
|
85
85
|
</div>
|
|
86
86
|
) : null}
|
|
87
87
|
{summary.actionLabel ? (
|
|
88
|
-
<div className="flex items-center justify-between border-t border-
|
|
89
|
-
<span className="text-[11px] text-
|
|
88
|
+
<div className="flex items-center justify-between border-t border-border/70 pt-1">
|
|
89
|
+
<span className="text-[11px] text-muted-foreground">{t('runtimeStatusActionHint')}</span>
|
|
90
90
|
<button
|
|
91
91
|
type="button"
|
|
92
92
|
onClick={() => void handleRestart()}
|
|
93
93
|
disabled={summary.isBusy}
|
|
94
|
-
className="text-sm font-semibold text-
|
|
94
|
+
className="text-sm font-semibold text-primary transition-colors hover:text-primary-hover disabled:text-muted-foreground/45"
|
|
95
95
|
>
|
|
96
96
|
{summary.isBusy ? t('runtimeStatusRestartingAction') : summary.actionLabel}
|
|
97
97
|
</button>
|
|
@@ -111,10 +111,10 @@ export function SidebarNavLinkItem({
|
|
|
111
111
|
isActive
|
|
112
112
|
? collapsed
|
|
113
113
|
? SIDEBAR_RAIL_ACTIVE_SURFACE_CLASS
|
|
114
|
-
: "bg-
|
|
114
|
+
: "bg-accent text-accent-foreground shadow-sm"
|
|
115
115
|
: collapsed
|
|
116
116
|
? SIDEBAR_RAIL_SURFACE_CLASS
|
|
117
|
-
: "text-
|
|
117
|
+
: "text-muted-foreground hover:bg-accent hover:text-accent-foreground",
|
|
118
118
|
className,
|
|
119
119
|
)}
|
|
120
120
|
>
|
|
@@ -123,8 +123,8 @@ export function SidebarNavLinkItem({
|
|
|
123
123
|
collapsed ? SIDEBAR_RAIL_ICON_CLASS : tone.icon,
|
|
124
124
|
"shrink-0 transition-colors",
|
|
125
125
|
isActive
|
|
126
|
-
? "text-
|
|
127
|
-
: "text-
|
|
126
|
+
? "text-accent-foreground"
|
|
127
|
+
: "text-muted-foreground/75 group-hover:text-accent-foreground",
|
|
128
128
|
)}
|
|
129
129
|
/>
|
|
130
130
|
<span className={collapsed ? "sr-only" : "min-w-0 flex-1 text-left"}>
|
|
@@ -174,7 +174,7 @@ export function SidebarActionItem({
|
|
|
174
174
|
onClick={onClick}
|
|
175
175
|
aria-label={label}
|
|
176
176
|
className={cn(
|
|
177
|
-
"group flex w-full items-center rounded-xl font-medium text-
|
|
177
|
+
"group flex w-full items-center rounded-xl font-medium text-muted-foreground transition-all duration-base hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35",
|
|
178
178
|
collapsed
|
|
179
179
|
? cn(
|
|
180
180
|
SIDEBAR_RAIL_CONTROL_CLASS,
|
|
@@ -189,7 +189,7 @@ export function SidebarActionItem({
|
|
|
189
189
|
<Icon
|
|
190
190
|
className={cn(
|
|
191
191
|
collapsed ? SIDEBAR_RAIL_ICON_CLASS : tone.icon,
|
|
192
|
-
"shrink-0 text-
|
|
192
|
+
"shrink-0 text-muted-foreground/75 transition-colors group-hover:text-accent-foreground",
|
|
193
193
|
)}
|
|
194
194
|
/>
|
|
195
195
|
<span
|
|
@@ -203,7 +203,7 @@ export function SidebarActionItem({
|
|
|
203
203
|
{!collapsed && trailing ? (
|
|
204
204
|
<span
|
|
205
205
|
className={cn(
|
|
206
|
-
"shrink-0 text-
|
|
206
|
+
"shrink-0 text-muted-foreground",
|
|
207
207
|
tone.value,
|
|
208
208
|
trailingClassName,
|
|
209
209
|
)}
|
|
@@ -248,7 +248,7 @@ export function SidebarSelectItem({
|
|
|
248
248
|
<SelectTrigger
|
|
249
249
|
aria-label={label}
|
|
250
250
|
className={cn(
|
|
251
|
-
"group h-auto w-full rounded-xl border-0 bg-transparent font-medium text-
|
|
251
|
+
"group h-auto w-full rounded-xl border-0 bg-transparent font-medium text-muted-foreground shadow-none hover:bg-accent hover:text-accent-foreground focus:ring-0 focus-visible:ring-2 focus-visible:ring-primary/35",
|
|
252
252
|
collapsed
|
|
253
253
|
? cn(
|
|
254
254
|
SIDEBAR_RAIL_CONTROL_CLASS,
|
|
@@ -267,13 +267,13 @@ export function SidebarSelectItem({
|
|
|
267
267
|
<Icon
|
|
268
268
|
className={cn(
|
|
269
269
|
collapsed ? SIDEBAR_RAIL_ICON_CLASS : tone.icon,
|
|
270
|
-
"shrink-0 text-
|
|
270
|
+
"shrink-0 text-muted-foreground/75 transition-colors group-hover:text-accent-foreground",
|
|
271
271
|
)}
|
|
272
272
|
/>
|
|
273
273
|
<span className={collapsed ? "sr-only" : "text-left"}>{label}</span>
|
|
274
274
|
</div>
|
|
275
275
|
{!collapsed ? (
|
|
276
|
-
<span className={cn("ml-auto text-
|
|
276
|
+
<span className={cn("ml-auto text-muted-foreground", tone.value)}>
|
|
277
277
|
{valueLabel}
|
|
278
278
|
</span>
|
|
279
279
|
) : null}
|
|
@@ -7,9 +7,9 @@ export const SIDEBAR_RAIL_STACK_CLASS = "space-y-1";
|
|
|
7
7
|
export const SIDEBAR_RAIL_ITEM_GAP_CLASS = "gap-1";
|
|
8
8
|
|
|
9
9
|
export const SIDEBAR_RAIL_SURFACE_CLASS =
|
|
10
|
-
"text-
|
|
10
|
+
"text-muted-foreground transition-colors duration-base hover:bg-accent hover:text-accent-foreground active:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35";
|
|
11
11
|
|
|
12
|
-
export const SIDEBAR_RAIL_ACTIVE_SURFACE_CLASS = "bg-
|
|
12
|
+
export const SIDEBAR_RAIL_ACTIVE_SURFACE_CLASS = "bg-accent text-accent-foreground";
|
|
13
13
|
|
|
14
14
|
export const SIDEBAR_RAIL_PRIMARY_SURFACE_CLASS =
|
|
15
15
|
"bg-primary/10 text-primary transition-colors duration-base hover:bg-primary/15 hover:text-primary-700 active:bg-primary/20 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35";
|
|
@@ -105,7 +105,7 @@ function SettingsSidebarHeader({
|
|
|
105
105
|
to="/chat"
|
|
106
106
|
aria-label={t("backToMain")}
|
|
107
107
|
className={cn(
|
|
108
|
-
"group inline-flex min-w-0 items-center rounded-lg text-[12px] font-medium text-
|
|
108
|
+
"group inline-flex min-w-0 items-center rounded-lg text-[12px] font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35",
|
|
109
109
|
isCollapsed
|
|
110
110
|
? cn(
|
|
111
111
|
SIDEBAR_RAIL_CONTROL_CLASS,
|
|
@@ -118,7 +118,7 @@ function SettingsSidebarHeader({
|
|
|
118
118
|
<ArrowLeft
|
|
119
119
|
className={cn(
|
|
120
120
|
isCollapsed ? SIDEBAR_RAIL_ICON_CLASS : "h-3.5 w-3.5",
|
|
121
|
-
"shrink-0 text-
|
|
121
|
+
"shrink-0 text-muted-foreground/75 group-hover:text-accent-foreground",
|
|
122
122
|
)}
|
|
123
123
|
/>
|
|
124
124
|
<span className={isCollapsed ? "sr-only" : "truncate"}>
|
|
@@ -128,10 +128,10 @@ function SettingsSidebarHeader({
|
|
|
128
128
|
{!isCollapsed ? (
|
|
129
129
|
<>
|
|
130
130
|
<span
|
|
131
|
-
className="h-4 w-px shrink-0 bg-
|
|
131
|
+
className="h-4 w-px shrink-0 bg-border"
|
|
132
132
|
aria-hidden="true"
|
|
133
133
|
/>
|
|
134
|
-
<h1 className="truncate text-[15px] font-semibold tracking-[-0.01em] text-
|
|
134
|
+
<h1 className="truncate text-[15px] font-semibold tracking-[-0.01em] text-foreground">
|
|
135
135
|
{t("settings")}
|
|
136
136
|
</h1>
|
|
137
137
|
<div className="ml-auto">
|
|
@@ -258,7 +258,7 @@ export function Sidebar({ mode }: SidebarProps) {
|
|
|
258
258
|
const isSettingsMode = mode === "settings";
|
|
259
259
|
const currentThemeLabel = t(
|
|
260
260
|
THEME_OPTIONS.find((option) => option.value === theme)?.labelKey ??
|
|
261
|
-
"
|
|
261
|
+
"themeNatural",
|
|
262
262
|
);
|
|
263
263
|
const accountEmail = remoteStatus.data?.account.email?.trim();
|
|
264
264
|
const accountConnected = Boolean(remoteStatus.data?.account.loggedIn);
|
|
@@ -326,7 +326,7 @@ export function Sidebar({ mode }: SidebarProps) {
|
|
|
326
326
|
{/* Footer actions stay reachable while the nav scrolls independently. */}
|
|
327
327
|
<div
|
|
328
328
|
className={cn(
|
|
329
|
-
"shrink-0 border-t border-
|
|
329
|
+
"shrink-0 border-t border-border/70 bg-secondary",
|
|
330
330
|
isCollapsed
|
|
331
331
|
? "mt-2 pt-2"
|
|
332
332
|
: isSettingsMode
|