Skip to content

Commit 2c0bfd0

Browse files
committed
feat: new light theme / inset theme for light and black theme
1 parent d2cffed commit 2c0bfd0

File tree

8 files changed

+13
-17
lines changed

8 files changed

+13
-17
lines changed

packages/ui/src/components/more-submenu.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export function MoreSubmenu({ showMoreMenu, handleMoreMenu, items }: MoreSubmenu
1818
<Sheet.Content
1919
className={cn(
2020
'inset-y-0 z-40 h-screen w-[328px] bg-transparent p-0',
21-
isInset ? 'left-[228px]' : 'left-[220px]'
21+
isInset ? 'border-l left-[228px]' : 'left-[220px]'
2222
)}
2323
closeClassName="text-sidebar-icon-3 hover:text-sidebar-icon-1"
2424
side="left"

packages/ui/src/components/navbar-skeleton/item.tsx

+5-4
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ export const Item = forwardRef<HTMLDivElement, ItemProps>(
4343
<div
4444
className={cn(
4545
'sub-menu-icon-bg relative flex size-8 place-content-center place-items-center rounded border border-borders-1 bg-background-2',
46-
{ 'border-sidebar-border-3 bg-sidebar-background-7': isMainNav },
47-
{ 'border-sidebar-border-6 bg-sidebar-background-8': active && isLightTheme }
46+
{ 'border-sidebar-border-3 bg-sidebar-background-7': isMainNav }
47+
// { 'border-sidebar-border-6 bg-sidebar-background-8': active && isLightTheme }
4848
)}
4949
>
5050
<Icon
@@ -67,8 +67,9 @@ export const Item = forwardRef<HTMLDivElement, ItemProps>(
6767
weight="medium"
6868
className={cn(
6969
'text-foreground-2 group-hover:text-foreground-1 z-10 w-full duration-0 ease-in-out',
70-
{ 'text-sidebar-foreground-2': isMainNav && (!isInset || isLightTheme) },
71-
{ 'text-sidebar-foreground-3': isMainNav && isInset && !isLightTheme },
70+
// { 'text-sidebar-foreground-2': isMainNav && (!isInset || isLightTheme) },
71+
// { 'text-sidebar-foreground-3': isMainNav && isInset && !isLightTheme },
72+
{ 'text-sidebar-foreground-2 group-hover:text-sidebar-foreground-1': isMainNav },
7273
{ 'text-foreground-1': active },
7374
{ 'text-sidebar-foreground-1': active && isMainNav }
7475
)}

packages/ui/src/components/settings-menu.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const SettingsMenu = ({ showSettingMenu, handleSettingsMenu, items }: Sys
1818
<Sheet.Content
1919
className={cn(
2020
'inset-y-0 z-40 h-screen w-[364px] bg-transparent p-0',
21-
isInset ? 'left-[228px]' : 'left-[220px]'
21+
isInset ? 'border-l left-[228px]' : 'left-[220px]'
2222
)}
2323
closeClassName="text-sidebar-icon-3 hover:text-sidebar-icon-1"
2424
side="left"

packages/ui/src/components/sheet.tsx

+2-7
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,13 @@ const SheetOverlay = React.forwardRef<React.ElementRef<typeof SheetPrimitive.Ove
5252
)
5353
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName
5454

55-
const sheetVariants = cva('fixed z-50 gap-4 bg-background p-6 transition ease-in-out', {
55+
const sheetVariants = cva('fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out', {
5656
variants: {
5757
side: {
5858
top: 'inset-x-0 top-0 border-b',
5959
bottom: 'inset-x-0 bottom-0 border-t',
6060
left: 'inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',
6161
right: 'inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm'
62-
},
63-
isLightTheme: {
64-
true: 'border-l border-sidebar-border-1',
65-
false: 'shadow-lg'
6662
}
6763
},
6864
defaultVariants: {
@@ -96,10 +92,9 @@ const SheetContent = React.forwardRef<React.ElementRef<typeof SheetPrimitive.Con
9692
ref
9793
) => {
9894
const { portalContainer } = usePortal()
99-
const { isLightTheme } = useTheme()
10095

10196
const content = (
102-
<SheetPrimitive.Content ref={ref} className={cn(sheetVariants({ side, isLightTheme }), className)} {...props}>
97+
<SheetPrimitive.Content ref={ref} className={cn(sheetVariants({ side }), className)} {...props}>
10398
{children}
10499
{!hideCloseButton && (
105100
<SheetPrimitive.Close

packages/ui/src/components/topbar.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const Topbar = {
1818
return (
1919
<div
2020
className={cx(
21-
`grid w-full ${gridCols} font-regular h-[58px] topbar-bottom-border items-center gap-6 px-5 text-sm`,
21+
`grid w-full ${gridCols} font-regular h-[55px] topbar-bottom-border items-center gap-6 px-5 text-sm`,
2222
className
2323
)}
2424
>

packages/ui/src/shared-style-variables.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -2035,7 +2035,7 @@
20352035
--canary-sidebar-background-07: 240 7% 8%; /* icons background inside menu */
20362036
--canary-sidebar-background-08: 240 6% 15%; /* scrollbar */
20372037
--canary-sidebar-background-09: 240 6% 10%; /* letter K in search background */
2038-
--canary-sidebar-border-01: 240 6% 15%; /* menu items divider */
2038+
--canary-sidebar-border-01: 240 6% 20%; /* menu items divider */
20392039
--canary-sidebar-border-02: 240 6% 20%; /* search border */
20402040
--canary-sidebar-border-03: 240 6% 15%; /* menu items group hover */
20412041
--canary-sidebar-border-04: 240 6% 20%; /* searchbar border */

packages/ui/src/views/repo/repo-files/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export const RepoFiles: FC<RepoFilesProps> = ({
145145
])
146146

147147
return (
148-
<SandboxLayout.Main fullWidth>
148+
<SandboxLayout.Main className="bg-transparent" fullWidth>
149149
<SandboxLayout.Content className="flex h-full flex-col pt-4">
150150
{isView && !isRepoEmpty && (
151151
<PathActionBar

packages/ui/src/views/repo/repo-sidebar/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export const RepoSidebar = ({
7373
</SandboxLayout.LeftSubPanel>
7474
</div>
7575
{/* Sticky right border */}
76-
<div className="sticky top-0 h-screen w-px border-r border-borders-4" />
76+
<div className="sticky top-0 w-px border-r border-borders-4" />
7777
</>
7878
)
7979
}

0 commit comments

Comments
 (0)