Skip to content

Commit 6d0cfab

Browse files
committed
chore: finalize branded styling
1 parent 78404da commit 6d0cfab

File tree

8 files changed

+331
-29
lines changed

8 files changed

+331
-29
lines changed

typescript-sdk/apps/dojo/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"@mdx-js/react": "^3.1.0",
3939
"@monaco-editor/react": "^4.7.0",
4040
"@next/mdx": "^15.2.3",
41+
"@phosphor-icons/react": "^2.1.10",
4142
"@radix-ui/react-dropdown-menu": "^2.1.6",
4243
"@radix-ui/react-slot": "^1.1.2",
4344
"@radix-ui/react-tabs": "^1.1.3",

typescript-sdk/apps/dojo/src/app/[integrationId]/feature/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,5 @@ export default function FeatureLayout({ children, params }: Props) {
5555
}
5656
}, [children, codeFiles, readme, view])
5757

58-
return <div className="bg-white rounded-lg w-full h-full">{content}</div>;
58+
return <div className="bg-white rounded-lg overflow-hidden w-full h-full">{content}</div>;
5959
}

typescript-sdk/apps/dojo/src/app/globals.css

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,17 +129,23 @@
129129
--spacing-spacing-18: 72px;
130130

131131
/* CopilotCloud Border Radius */
132-
--radius-xs: 2px;
133-
--radius-sm: 4px;
134-
--radius-md: 8px;
135-
--radius-lg: 12px;
136-
--radius-xl: 16px;
137-
--radius-2xl: 20px;
138-
--radius-3xl: 24px;
132+
--radius-xs: 4px;
133+
--radius-sm: 8px;
134+
--radius-md: 12px;
135+
--radius-lg: 16px;
136+
--radius-xl: 24px;
137+
--radius-2xl: 48px;
138+
--radius-3xl: 200px;
139139

140140
/* Font Families */
141141
--font-family-sans: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
142142
--font-family-mono: 'Spline Sans Mono', ui-monospace, SFMono-Regular, monospace;
143+
144+
/* Elevation/Shadows */
145+
--shadow-sm: 0px 1px 3px 0px rgba(1, 5, 7, 0.08);
146+
--shadow-md: 0px 6px 6px -2px rgba(1, 5, 7, 0.08);
147+
--shadow-lg: 0px 16px 24px -8px rgba(1, 5, 7, 0.12);
148+
--shadow-xl: 0px 24px 32px -12px rgba(1, 5, 7, 0.16);
143149
}
144150

145151
:root {
@@ -234,6 +240,6 @@
234240
@apply border-border outline-ring/50;
235241
}
236242
body {
237-
@apply bg-background text-foreground;
243+
@apply bg-background text-foreground font-sans;
238244
}
239245
}

typescript-sdk/apps/dojo/src/components/demo-list/demo-list.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ export function DemoList({ demos, selectedDemo, onSelect, llmSelector }: DemoLis
1414
return (
1515
<div className="h-full">
1616
<div className="px-4 pt-3 pb-2">
17-
<h2 className="text-xs uppercase tracking-wider font-semibold text-muted-foreground mb-1">
17+
<h2
18+
className={cn(
19+
"transition-all duration-300 ease-in-out inline-block whitespace-nowrap paragraphs-Small-Regular-Uppercase text-[10px] text-palette-text-secondary opacity-100 scale-100 w-fit",
20+
)}
21+
>
1822
Demos
1923
</h2>
2024
{llmSelector && <div className="mt-2">{llmSelector}</div>}

typescript-sdk/apps/dojo/src/components/sidebar/sidebar.tsx

Lines changed: 48 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
"use client";
22

33
import React, { useState, useEffect } from "react";
4-
import Image from "next/image";
4+
import { EyeIcon as Eye, CodeIcon as Code, BookOpenTextIcon as Book } from "@phosphor-icons/react";
5+
import { cn } from "@/lib/utils";
56
import { useRouter, usePathname } from "next/navigation";
67
import { DemoList } from "@/components/demo-list/demo-list";
78
import { ThemeToggle } from "@/components/ui/theme-toggle";
8-
import { Eye, Code, Book, ChevronDown } from "lucide-react";
9+
import { ChevronDown } from "lucide-react";
910
import featureConfig from "@/config";
1011
import {
1112
DropdownMenu,
@@ -98,8 +99,10 @@ export function Sidebar({ isMobile, onMobileClose }: SidebarProps) {
9899
}
99100
}, []);
100101

102+
const tabClass = `cursor-pointer flex-1 h-8 px-2 text-sm text-primary shadow-none bg-none border-none font-medium gap-1 rounded-lg data-[state=active]:bg-white data-[state=active]:text-primary data-[state=active]:shadow-none`
103+
101104
return (
102-
<div className={`flex flex-col h-full bg-white/50 border-r
105+
<div className={`flex flex-col h-full bg-white/50 border-2 overflow-hidden border-palette-border-default
103106
${isMobile ? 'w-80 shadow-xl' : 'w-74 min-w-[296px] flex-shrink-0 rounded-lg'}
104107
`}>
105108
{/* Sidebar Header */}
@@ -111,7 +114,7 @@ export function Sidebar({ isMobile, onMobileClose }: SidebarProps) {
111114
</h1>
112115
</div>
113116

114-
<ThemeToggle />
117+
{/*<ThemeToggle />*/}
115118
</div>
116119
</div>
117120

@@ -120,21 +123,23 @@ export function Sidebar({ isMobile, onMobileClose }: SidebarProps) {
120123
<div className="p-4 border-b">
121124
{/* Integration picker */}
122125
{!frameworkPickerHidden&& (
123-
<div className="mb-1">
124-
<label className="block text-sm font-medium text-muted-foreground mb-2">Integrations</label>
126+
<div className="mb-spacing-4">
127+
<SectionTitle title="Integrations" />
125128
<DropdownMenu>
126129
<DropdownMenuTrigger asChild>
127-
<Button variant="outline" className="w-full justify-between">
128-
{currentIntegration ? currentIntegration.name : "Select Integration"}
129-
<ChevronDown className="h-4 w-4 opacity-50" />
130-
</Button>
130+
<div className="flex items-center justify-between h-spacing-8 rounded-sm gap-spacing-2 px-spacing-3 transition-colors hover:bg-palette-surface-containerHovered cursor-pointer">
131+
<span className="pb-[2px] text-palette-text-primary font-medium leading-[22px] inline-block truncate">
132+
{currentIntegration ? currentIntegration.name : "Select Integration"}
133+
</span>
134+
<ChevronDown className="text-palette-icon-default transition-transform" size={16} />
135+
</div>
131136
</DropdownMenuTrigger>
132-
<DropdownMenuContent className="w-56">
137+
<DropdownMenuContent className="w-64 bg-palette-surface-container border-palette-border-container shadow-elevation-md">
133138
{menuIntegrations.map((integration) => (
134139
<DropdownMenuItem
135140
key={integration.id}
136141
onClick={() => handleIntegrationSelect(integration.id)}
137-
className="cursor-pointer"
142+
className="cursor-pointer hover:bg-palette-grey-200 text-palette-text-primary text-base h-10 rounded-sm"
138143
>
139144
<span>{integration.name}</span>
140145
</DropdownMenuItem>
@@ -147,30 +152,30 @@ export function Sidebar({ isMobile, onMobileClose }: SidebarProps) {
147152
{/* Preview/Code Tabs */}
148153
{!viewPickerHidden &&
149154
<div className="mb-1">
150-
<label className="block text-sm font-medium text-muted-foreground mb-2">View</label>
155+
<SectionTitle title="View" />
151156
<Tabs
152157
value={view}
153158
onValueChange={tab => setView(tab as View)}
154-
className="w-full"
159+
className="w-full rounded-lg bg-none border-none"
155160
>
156-
<TabsList className="w-full h-9 border shadow-sm rounded-lg p-1">
161+
<TabsList className="w-full rounded-lg h-8 p-0 bg-transparent border-none">
157162
<TabsTrigger
158163
value="preview"
159-
className="flex-1 h-7 px-2 text-sm font-medium gap-1 rounded-md data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow"
164+
className={tabClass}
160165
>
161166
<Eye className="h-3 w-3" />
162167
<span>Preview</span>
163168
</TabsTrigger>
164169
<TabsTrigger
165170
value="code"
166-
className="flex-1 h-7 px-2 text-sm font-medium gap-1 rounded-md data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow"
171+
className={tabClass}
167172
>
168173
<Code className="h-3 w-3" />
169174
<span>Code</span>
170175
</TabsTrigger>
171176
<TabsTrigger
172177
value="readme"
173-
className="flex-1 h-7 px-2 text-sm font-medium gap-1 rounded-md data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:shadow"
178+
className={tabClass}
174179
>
175180
<Book className="h-3 w-3" />
176181
<span>Docs</span>
@@ -199,3 +204,28 @@ export function Sidebar({ isMobile, onMobileClose }: SidebarProps) {
199204
</div>
200205
);
201206
}
207+
208+
function SectionTitle({ title }: { title: string }) {
209+
return (
210+
<div
211+
className={cn(
212+
"items-center",
213+
"flex px-spacing-1 gap-spacing-2 mb-2",
214+
)}
215+
>
216+
<label
217+
className={cn(
218+
"transition-all duration-300 ease-in-out inline-block whitespace-nowrap paragraphs-Small-Regular-Uppercase text-[10px] text-palette-text-secondary opacity-100 scale-100 w-fit",
219+
)}
220+
>
221+
{title}
222+
</label>
223+
<div
224+
className={cn(
225+
"h-[1px] bg-palette-border-container transition-all duration-300 ease-[cubic-bezier(0.36,0.01,0.22,1)]",
226+
"w-full",
227+
)}
228+
/>
229+
</div>
230+
);
231+
}

0 commit comments

Comments
 (0)