From 9c808dcc10c5b4909a151f032f3d1b869684b3f9 Mon Sep 17 00:00:00 2001 From: Cody Bender Date: Wed, 23 Oct 2024 12:08:56 -0400 Subject: [PATCH] style: more colors --- packages/frontend/src/components/SearchBar.tsx | 2 +- .../projects/ProjectSearchBar/ProjectSearchBar.tsx | 4 ++-- .../ProjectSearchBar/ProjectSearchBarEmpty.tsx | 4 ++-- .../src/components/shared/Button/Button.theme.ts | 6 ++++-- .../src/components/shared/Input/Input.theme.ts | 14 +++++++++++--- .../src/components/shared/Tabs/Tabs.theme.ts | 6 ++++++ packages/frontend/src/layouts/ProjectSearch.tsx | 2 +- packages/frontend/tailwind.config.js | 1 + 8 files changed, 28 insertions(+), 11 deletions(-) diff --git a/packages/frontend/src/components/SearchBar.tsx b/packages/frontend/src/components/SearchBar.tsx index af369271..23bed3fb 100644 --- a/packages/frontend/src/components/SearchBar.tsx +++ b/packages/frontend/src/components/SearchBar.tsx @@ -10,7 +10,7 @@ const SearchBar: React.ForwardRefRenderFunction< return (
} + leftIcon={} onChange={onChange} value={value} type="search" diff --git a/packages/frontend/src/components/projects/ProjectSearchBar/ProjectSearchBar.tsx b/packages/frontend/src/components/projects/ProjectSearchBar/ProjectSearchBar.tsx index df3b09b2..465b833d 100644 --- a/packages/frontend/src/components/projects/ProjectSearchBar/ProjectSearchBar.tsx +++ b/packages/frontend/src/components/projects/ProjectSearchBar/ProjectSearchBar.tsx @@ -59,12 +59,12 @@ export const ProjectSearchBar = ({ onChange }: ProjectSearchBarProps) => { }, [fetchProjects, debouncedInputValue]); return ( -
+
diff --git a/packages/frontend/src/components/projects/ProjectSearchBar/ProjectSearchBarEmpty.tsx b/packages/frontend/src/components/projects/ProjectSearchBar/ProjectSearchBarEmpty.tsx index 74c4d033..b901cec0 100644 --- a/packages/frontend/src/components/projects/ProjectSearchBar/ProjectSearchBarEmpty.tsx +++ b/packages/frontend/src/components/projects/ProjectSearchBar/ProjectSearchBarEmpty.tsx @@ -13,10 +13,10 @@ export const ProjectSearchBarEmpty = ({ {...props} className={cn('flex items-center px-2 py-2 gap-3', className)} > -
+
-

+

No projects matching this name

diff --git a/packages/frontend/src/components/shared/Button/Button.theme.ts b/packages/frontend/src/components/shared/Button/Button.theme.ts index c6ffd5b6..bbc45c6b 100644 --- a/packages/frontend/src/components/shared/Button/Button.theme.ts +++ b/packages/frontend/src/components/shared/Button/Button.theme.ts @@ -49,11 +49,11 @@ export const buttonTheme = tv( 'disabled:shadow-none', ], secondary: [ - 'text-elements-on-secondary', + 'text-primary', 'border', 'border-transparent', 'bg-secondary', - 'hover:bg-controls-secondary-hovered', + 'hover:bg-overlay2', 'focus-visible:bg-controls-secondary-hovered', 'disabled:text-elements-on-disabled', 'disabled:bg-controls-disabled', @@ -77,10 +77,12 @@ export const buttonTheme = tv( ], ghost: [ 'text-elements-on-tertiary', + 'dark:text-foreground-secondary', 'border', 'border-transparent', 'bg-transparent', 'hover:bg-controls-tertiary-hovered', + 'dark:hover:bg-overlay2', 'hover:border-border-interactive-hovered', 'focus-visible:bg-controls-tertiary-hovered', 'focus-visible:border-border-interactive-hovered', diff --git a/packages/frontend/src/components/shared/Input/Input.theme.ts b/packages/frontend/src/components/shared/Input/Input.theme.ts index 0144d578..323b9773 100644 --- a/packages/frontend/src/components/shared/Input/Input.theme.ts +++ b/packages/frontend/src/components/shared/Input/Input.theme.ts @@ -24,12 +24,14 @@ export const inputTheme = tv( 'shadow-sm', 'border', 'rounded-lg', + 'dark:bg-overlay2', + 'dark:text-foreground', 'text-elements-mid-em', 'border-border-interactive', 'disabled:shadow-none', 'disabled:border-none', ], - icon: ['text-elements-low-em'], + icon: ['text-elements-low-em dark:text-foreground-secondary'], iconContainer: [ 'absolute', 'inset-y-0', @@ -39,7 +41,13 @@ export const inputTheme = tv( 'cursor-pointer', ], helperIcon: [], - helperText: ['flex', 'gap-2', 'items-center', 'text-elements-danger'], + helperText: [ + 'flex', + 'gap-2', + 'items-center', + 'text-elements-danger', + 'dark:text-primary', + ], }, variants: { state: { @@ -54,7 +62,7 @@ export const inputTheme = tv( 'shadow-none', 'focus:outline-border-danger', ], - helperText: 'text-elements-danger', + helperText: 'text-error', }, }, size: { diff --git a/packages/frontend/src/components/shared/Tabs/Tabs.theme.ts b/packages/frontend/src/components/shared/Tabs/Tabs.theme.ts index 31b12cef..ea944c0b 100644 --- a/packages/frontend/src/components/shared/Tabs/Tabs.theme.ts +++ b/packages/frontend/src/components/shared/Tabs/Tabs.theme.ts @@ -15,6 +15,7 @@ export const tabsTheme = tv({ 'border-transparent', 'hover:border-border-interactive/10', 'hover:text-elements-mid-em', + 'dark:hover:text-foreground-secondary', 'focus-within:border-border-interactive/10', 'data-[state=active]:font-medium', 'data-[state=active]:text-elements-high-em', @@ -27,6 +28,7 @@ export const tabsTheme = tv({ 'data-[orientation=vertical]:rounded-xl', 'data-[orientation=vertical]:border-transparent', 'data-[orientation=vertical]:hover:bg-base-bg-emphasized', + 'data-[orientation=vertical]:dark:hover:bg-overlay2', 'data-[orientation=vertical]:hover:text-elements-mid-em', 'data-[orientation=vertical]:hover:border-transparent', 'data-[orientation=vertical]:focus-visible:border-transparent', @@ -34,13 +36,17 @@ export const tabsTheme = tv({ 'data-[orientation=vertical]:focus-visible:text-elements-mid-em', 'data-[orientation=vertical]:data-[state=active]:font-normal', 'data-[orientation=vertical]:data-[state=active]:bg-base-bg-emphasized', + 'data-[orientation=vertical]:data-[state=active]:dark:bg-overlay', 'data-[orientation=vertical]:data-[state=active]:border-transparent', 'data-[orientation=vertical]:data-[state=active]:hover:text-elements-high-em', 'data-[orientation=vertical]:data-[state=active]:focus-visible:text-elements-high-em', // TODO: demo additions 'data-[orientation=vertical]:data-[state=active]:bg-snowball-200', + 'data-[orientation=vertical]:data-[state=active]:dark:bg-overlay', 'data-[orientation=vertical]:data-[state=active]:hover:bg-snowball-200', + 'data-[orientation=vertical]:data-[state=active]:dark:hover:bg-overlay2', 'data-[orientation=vertical]:data-[state=active]:text-snowball-800', + 'data-[orientation=vertical]:data-[state=active]:dark:text-foreground', 'data-[orientation=vertical]:data-[state=active]:hover:text-snowball-800', 'data-[orientation=vertical]:data-[state=active]:shadow-[0px_1px_0px_0px_rgba(8,47,86,0.06)_inset]', ], diff --git a/packages/frontend/src/layouts/ProjectSearch.tsx b/packages/frontend/src/layouts/ProjectSearch.tsx index b04db295..5bb5daa0 100644 --- a/packages/frontend/src/layouts/ProjectSearch.tsx +++ b/packages/frontend/src/layouts/ProjectSearch.tsx @@ -32,7 +32,7 @@ const ProjectSearch = () => { return (
{/* Header */} -
+