fix(colors): Replace hardcoded black with background color token (#5815)
* Update all black to background * remove --canvas token, keep intentional bg-black * Move bg-black from grid container to individual viewport panes --------- Co-authored-by: Alireza <ar.sedghi@gmail.com>
This commit is contained in:
1 parent
cfe7efd3ef
commit
dbc31a5d4e
39 files changed
+61
-61
No files matched your search
@@ -255,7 +255,7 @@ const DataRowComponent = React.forwardRef<HTMLDivElement, DataRowProps>(
|
||||
{/* Number Box */}
|
||||
{number !== null && (
|
||||
<div
|
||||
className={`flex h-7 max-h-7 w-7 flex-shrink-0 items-center justify-center rounded-l border-r border-black text-base ${
|
||||
className={`flex h-7 max-h-7 w-7 flex-shrink-0 items-center justify-center rounded-l border-r border-background text-base ${
|
||||
isSelected ? 'bg-highlight text-black' : 'bg-muted text-muted-foreground'
|
||||
} overflow-hidden`}
|
||||
>
|
||||
|
||||
@@ -92,7 +92,7 @@ export function DatePickerWithRange({
|
||||
value={start}
|
||||
onChange={e => handleInputChange(e, 'start')}
|
||||
className={cn(
|
||||
'border-inputfield-main focus:border-inputfield-focus hover:text-foreground h-[32px] w-full justify-start rounded border bg-black py-[6.5px] pl-[6.5px] pr-[6.5px] text-left text-base font-normal hover:bg-black',
|
||||
'border-inputfield-main focus:border-inputfield-focus hover:text-foreground h-[32px] w-full justify-start rounded border bg-background py-[6.5px] pl-[6.5px] pr-[6.5px] text-left text-base font-normal hover:bg-background',
|
||||
!start && 'text-muted-foreground'
|
||||
)}
|
||||
data-cy="input-date-range-start"
|
||||
@@ -129,7 +129,7 @@ export function DatePickerWithRange({
|
||||
value={end}
|
||||
onChange={e => handleInputChange(e, 'end')}
|
||||
className={cn(
|
||||
'border-inputfield-main focus:border-inputfield-focus hover:text-foreground h-full w-full justify-start rounded border bg-black py-[6.5px] pl-[6.5px] pr-[6.5px] text-left text-base font-normal hover:bg-black',
|
||||
'border-inputfield-main focus:border-inputfield-focus hover:text-foreground h-full w-full justify-start rounded border bg-background py-[6.5px] pl-[6.5px] pr-[6.5px] text-left text-base font-normal hover:bg-background',
|
||||
!end && 'text-muted-foreground'
|
||||
)}
|
||||
data-cy="input-date-range-end"
|
||||
|
||||
@@ -54,7 +54,7 @@ const DialogOverlay = React.forwardRef<
|
||||
<div
|
||||
ref={ref}
|
||||
className={cn(
|
||||
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-40 bg-black/60',
|
||||
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-40 bg-background/60',
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
|
||||
@@ -332,7 +332,7 @@ const GridSelector = ({ rows = 3, columns = 4, className }: GridSelectorProps) =
|
||||
};
|
||||
|
||||
const Divider = ({ className }: { className?: string }) => (
|
||||
<div className={cn('h-px bg-black', className)}></div>
|
||||
<div className={cn('h-px bg-background', className)}></div>
|
||||
);
|
||||
|
||||
const HelpText = ({ children, className }: { children: React.ReactNode; className?: string }) => (
|
||||
|
||||
@@ -17,7 +17,7 @@ const NavBar = ({
|
||||
return (
|
||||
<div
|
||||
className={classnames(
|
||||
'bg-popover z-20 border-black px-1',
|
||||
'bg-popover z-20 border-background px-1',
|
||||
isSticky && stickyClasses,
|
||||
!isSticky && notStickyClasses,
|
||||
className
|
||||
|
||||
@@ -26,7 +26,7 @@ function PresetBody({ children, className }: PresetBodyProps) {
|
||||
<div
|
||||
className={cn(
|
||||
// Adjust these classes for your desired look
|
||||
'border-foreground/10 flex min-h-0 flex-1 flex-col rounded-md border bg-black p-2',
|
||||
'border-foreground/10 flex min-h-0 flex-1 flex-col rounded-md border bg-background p-2',
|
||||
className
|
||||
)}
|
||||
>
|
||||
|
||||
@@ -41,7 +41,7 @@ function ImageVisual({ children, className }: ImageVisualProps) {
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
'flex-1 items-center justify-center rounded-2xl bg-black/80 p-4 sm:flex-[7]',
|
||||
'flex-1 items-center justify-center rounded-2xl bg-background/80 p-4 sm:flex-[7]',
|
||||
'flex', // ensure the container is a flex box
|
||||
className
|
||||
)}
|
||||
|
||||
@@ -10,7 +10,7 @@ const ProgressDiscreteBar = ({ options }: { options: ProgressDropdownOption[] })
|
||||
<div
|
||||
key={i}
|
||||
className={classnames('mr-1 h-1 grow first:rounded-l-sm last:mr-0 last:rounded-r-sm', {
|
||||
'bg-black': !option.activated && !option.completed,
|
||||
'bg-background': !option.activated && !option.completed,
|
||||
'bg-primary/40': option.activated && !option.completed,
|
||||
'bg-highlight': option.completed,
|
||||
})}
|
||||
|
||||
@@ -58,7 +58,7 @@ const closeIconWidth = 30;
|
||||
const gridHorizontalPadding = 10;
|
||||
const tabSpacerWidth = 2;
|
||||
|
||||
const baseClasses = 'bg-black border-black justify-start box-content flex flex-col';
|
||||
const baseClasses = 'bg-background border-background justify-start box-content flex flex-col';
|
||||
|
||||
const openStateIconName = {
|
||||
left: 'SidePanelCloseLeft',
|
||||
@@ -447,7 +447,7 @@ const SidePanel = ({
|
||||
</div>
|
||||
<Separator
|
||||
orientation="horizontal"
|
||||
className="bg-black"
|
||||
className="bg-background"
|
||||
thickness="2px"
|
||||
/>
|
||||
</>
|
||||
|
||||
@@ -55,13 +55,13 @@ export function StudyBrowserSort({ servicesManager }: withAppTypes) {
|
||||
<DropdownMenu>
|
||||
<Tooltip>
|
||||
<TooltipTrigger className="w-full overflow-hidden">
|
||||
<DropdownMenuTrigger className="border-input focus:border-input text-foreground flex h-[26px] w-full items-center justify-start overflow-hidden whitespace-nowrap rounded border bg-black p-2 text-base">
|
||||
<DropdownMenuTrigger className="border-input focus:border-input text-foreground flex h-[26px] w-full items-center justify-start overflow-hidden whitespace-nowrap rounded border bg-background p-2 text-base">
|
||||
{selectedSort.label}
|
||||
</DropdownMenuTrigger>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>{selectedSort.label}</TooltipContent>
|
||||
</Tooltip>
|
||||
<DropdownMenuContent className="bg-black">
|
||||
<DropdownMenuContent className="bg-background">
|
||||
{sortFunctions.map(sort => (
|
||||
<DropdownMenuItem
|
||||
key={sort.label}
|
||||
@@ -77,7 +77,7 @@ export function StudyBrowserSort({ servicesManager }: withAppTypes) {
|
||||
<TooltipTrigger>
|
||||
<button
|
||||
onClick={toggleSortDirection}
|
||||
className="flex h-[26px] items-center justify-center bg-black"
|
||||
className="flex h-[26px] items-center justify-center bg-background"
|
||||
>
|
||||
{sortDirection === 'ascending' ? (
|
||||
<Icons.SortingAscending className="text-primary w-2" />
|
||||
|
||||
@@ -18,13 +18,13 @@ export function StudyBrowserViewOptions({ tabs, onSelectTab, activeTabName }: wi
|
||||
<DropdownMenu>
|
||||
<Tooltip>
|
||||
<TooltipTrigger className="w-full w-[50%] overflow-hidden">
|
||||
<DropdownMenuTrigger className="border-input focus:border-input text-foreground flex h-[26px] w-full items-center justify-start rounded border bg-black p-2 text-base">
|
||||
<DropdownMenuTrigger className="border-input focus:border-input text-foreground flex h-[26px] w-full items-center justify-start rounded border bg-background p-2 text-base">
|
||||
{activeTab?.label}
|
||||
</DropdownMenuTrigger>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>{activeTab?.label}</TooltipContent>
|
||||
</Tooltip>
|
||||
<DropdownMenuContent className="bg-black">
|
||||
<DropdownMenuContent className="bg-background">
|
||||
{tabs.map(tab => {
|
||||
const { name, label, studies } = tab;
|
||||
const isActive = activeTabName === name;
|
||||
|
||||
@@ -67,7 +67,7 @@ const Thumbnail = ({
|
||||
)}
|
||||
>
|
||||
<div className="h-[114px] w-[128px]">
|
||||
<div className="relative bg-black">
|
||||
<div className="relative bg-background">
|
||||
{imageSrc ? (
|
||||
<img
|
||||
src={imageSrc}
|
||||
|
||||
@@ -58,7 +58,7 @@ function ViewportPane({
|
||||
onScroll={onInteractionHandler}
|
||||
onWheel={onInteractionHandler}
|
||||
className={classNames(
|
||||
'group/pane relative h-full w-full overflow-hidden transition duration-300',
|
||||
'group/pane relative h-full w-full overflow-hidden bg-black transition duration-300',
|
||||
className
|
||||
)}
|
||||
style={customStyle}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
--neutral: 213 22% 59%;
|
||||
--neutral-light: 214 69% 81%;
|
||||
--neutral-dark: 214 16% 21%;
|
||||
--background: 236 62% 5%;
|
||||
--background: 0 0% 0%;
|
||||
--foreground: 0 0% 98%;
|
||||
--card: 234 64% 10%;
|
||||
--card-foreground: 0 0% 98%;
|
||||
@@ -215,7 +215,7 @@
|
||||
}
|
||||
|
||||
body {
|
||||
@apply !bg-black;
|
||||
@apply !bg-background;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user