Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Dark mode for Admin SPA (#13991)

Damian Legawiec7d2f389a425b
diff --git a/packages/admin/index.html b/packages/admin/index.html
index 70d00f720e..dec13fbb57 100644
--- a/packages/admin/index.html
+++ b/packages/admin/index.html
@@ -6,6 +6,21 @@
<title>Spree Admin</title>
</head>
<body>
+ <script>
+ (() => {
+ try {
+ const stored = localStorage.getItem('spree-admin-theme');
+ const mode = stored === 'light' || stored === 'dark' ? stored : 'system';
+ const dark =
+ mode === 'dark' ||
+ (mode === 'system' && window.matchMedia('(prefers-color-scheme: dark)').matches);
+ if (dark) document.documentElement.classList.add('dark');
+ document.documentElement.style.colorScheme = dark ? 'dark' : 'light';
+ } catch (_) {
+ /* localStorage unavailable */
+ }
+ })();
+ </script>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
diff --git a/packages/admin/src/components/spree/back-button.tsx b/packages/admin/src/components/spree/back-button.tsx
index b5d9a8f16b..b5f314dd67 100644
--- a/packages/admin/src/components/spree/back-button.tsx
+++ b/packages/admin/src/components/spree/back-button.tsx
@@ -36,7 +36,7 @@ export function BackButton({ fallback, className }: BackButtonProps) {
onClick={handleClick}
className={
className ??
- 'inline-flex items-center justify-center rounded-lg p-1.5 text-muted-foreground hover:bg-gray-200/50 hover:text-foreground transition-colors'
+ 'inline-flex items-center justify-center rounded-lg p-1.5 text-muted-foreground hover:bg-accent hover:text-foreground transition-colors'
}
aria-label="Back"
>
diff --git a/packages/admin/src/components/spree/json-preview-drawer.tsx b/packages/admin/src/components/spree/json-preview-drawer.tsx
index 5e9debd0ee..60bf76fb8b 100644
--- a/packages/admin/src/components/spree/json-preview-drawer.tsx
+++ b/packages/admin/src/components/spree/json-preview-drawer.tsx
@@ -164,7 +164,7 @@ export function JsonPreviewDrawer({
</span>
</div>
- <div className="flex-1 overflow-auto p-4 font-mono text-sm">
+ <div className="themed-scrollbar flex-1 overflow-auto p-4 font-mono text-sm">
{isLoading ? (
<p className="text-zinc-500">Loading…</p>
) : error ? (
@@ -174,7 +174,9 @@ export function JsonPreviewDrawer({
) : data ? (
<JsonView
value={data as object}
- style={vscodeTheme}
+ style={
+ { ...vscodeTheme, '--w-rjv-background-color': 'transparent' } as React.CSSProperties
+ }
collapsed={collapsed}
displayDataTypes={false}
displayObjectSize
diff --git a/packages/admin/src/components/spree/nav-main.tsx b/packages/admin/src/components/spree/nav-main.tsx
index d50035f3cf..c7934104f3 100644
--- a/packages/admin/src/components/spree/nav-main.tsx
+++ b/packages/admin/src/components/spree/nav-main.tsx
@@ -33,7 +33,7 @@ function NavIcon({ icon: Icon, isActive }: { icon: NavItem['icon']; isActive?: b
<span
className={
'inline-flex shrink-0 items-center justify-center rounded-lg p-[0.2rem] transition-colors duration-100 ' +
- (isActive ? 'bg-zinc-950 text-white' : 'group-hover/menu-button:text-zinc-950')
+ (isActive ? 'text-foreground' : 'group-hover/menu-button:text-foreground')
}
>
<Icon size={16} strokeWidth={2} />
diff --git a/packages/admin/src/components/spree/sticky-form-footer.tsx b/packages/admin/src/components/spree/sticky-form-footer.tsx
index a48ab222b7..0a9fde7349 100644
--- a/packages/admin/src/components/spree/sticky-form-footer.tsx
+++ b/packages/admin/src/components/spree/sticky-form-footer.tsx
@@ -40,7 +40,7 @@ export function StickyFormFooter<TFieldValues extends FieldValues>({
return (
<div
className={cn(
- 'sticky bottom-0 -mx-4 mt-4 flex items-center justify-end gap-2 border-t border-border bg-white/90 px-4 py-3 backdrop-blur supports-[backdrop-filter]:bg-white/75',
+ 'sticky bottom-0 -mx-4 mt-4 flex items-center justify-end gap-2 border-t border-border bg-background/90 px-4 py-3 backdrop-blur supports-[backdrop-filter]:bg-background/75',
className,
)}
>
diff --git a/packages/admin/src/components/spree/store-switcher.tsx b/packages/admin/src/components/spree/store-switcher.tsx
index 470d9b2d42..1fd08e442c 100644
--- a/packages/admin/src/components/spree/store-switcher.tsx
+++ b/packages/admin/src/components/spree/store-switcher.tsx
@@ -30,7 +30,7 @@ export function StoreSwitcher() {
<DropdownMenuTrigger asChild className="flex w-full items-center">
<button
type="button"
- className="rounded-xl outline-hidden transition-colors duration-100 hover:bg-gray-200/50 data-[state=open]:bg-gray-200/50 gap-2 p-1.5"
+ className="rounded-xl outline-hidden transition-colors duration-100 hover:bg-sidebar-accent data-[state=open]:bg-sidebar-accent gap-2 p-1.5"
>
<Avatar>
{store?.logo_url && <AvatarImage src={store.logo_url} />}
@@ -39,9 +39,9 @@ export function StoreSwitcher() {
{!isCollapsed && (
<>
<div className="grid flex-1 text-left text-sm leading-tight">
- <span className="truncate font-medium text-zinc-950">{store?.name}</span>
+ <span className="truncate font-medium text-foreground">{store?.name}</span>
</div>
- <ChevronsUpDownIcon className="ml-auto size-4 text-gray-400" />
+ <ChevronsUpDownIcon className="ml-auto size-4 text-muted-foreground" />
</>
)}
</button>
diff --git a/packages/admin/src/components/spree/table-toolbar.tsx b/packages/admin/src/components/spree/table-toolbar.tsx
index ee72352446..a5a918bbf4 100644
--- a/packages/admin/src/components/spree/table-toolbar.tsx
+++ b/packages/admin/src/components/spree/table-toolbar.tsx
@@ -124,12 +124,12 @@ export function TableToolbar({
return (
<>
- <div className="flex flex-col lg:flex-row gap-3 items-start lg:items-center justify-between p-3 border-b border-gray-200">
+ <div className="flex flex-col lg:flex-row gap-3 items-start lg:items-center justify-between p-3 border-b border-border">
{title && <CardTitle>{title}</CardTitle>}
<div className="flex gap-2 items-center flex-wrap ml-auto">
{/* Search */}
- <div className="flex items-center gap-2 border border-gray-200 bg-white rounded-lg shadow-xs px-2.5 h-[2.125rem] lg:w-[300px] focus-within:border-blue-500 focus-within:shadow-[0_0_0_3px_rgba(59,130,246,0.15)] transition-all duration-100 ease-in-out">
- <SearchIcon className="size-4 text-gray-600 shrink-0" />
+ <div className="flex items-center gap-2 border border-border bg-card rounded-lg shadow-xs px-2.5 h-[2.125rem] lg:w-[300px] focus-within:border-blue-500 focus-within:shadow-[0_0_0_3px_rgba(59,130,246,0.15)] transition-all duration-100 ease-in-out">
+ <SearchIcon className="size-4 text-muted-foreground shrink-0" />
<input
ref={searchRef}
placeholder={searchPlaceholder}
@@ -140,7 +140,7 @@ export function TableToolbar({
{search && (
<button
type="button"
- className="p-0.5 text-gray-400 hover:text-gray-600 shrink-0"
+ className="p-0.5 text-muted-foreground hover:text-foreground shrink-0"
onClick={() => {
onSearchChange('')
searchRef.current?.focus()
@@ -201,7 +201,7 @@ export function TableToolbar({
{/* Active filter badges */}
{filters.length > 0 && (
- <div className="flex gap-2 flex-wrap px-3 py-2 border-b border-gray-200">
+ <div className="flex gap-2 flex-wrap px-3 py-2 border-b border-border">
{filters.map((filter) => {
const col = allCols.find((c) => c.key === filter.field)
const ops = getOperators(col?.filterType ?? 'string')
@@ -215,7 +215,7 @@ export function TableToolbar({
)}
<button
type="button"
- className="ml-0.5 p-0.5 rounded-sm hover:bg-gray-200"
+ className="ml-0.5 p-0.5 rounded-sm hover:bg-accent"
onClick={() => onFiltersChange(filters.filter((f) => f.id !== filter.id))}
>
<XIcon className="size-3" />
@@ -509,7 +509,7 @@ function FilterPanel({
<button
type="button"
- className="p-1 rounded text-muted-foreground hover:text-red-600 hover:bg-red-50 shrink-0"
+ className="p-1 rounded text-muted-foreground hover:text-destructive hover:bg-destructive/10 shrink-0"
onClick={() => removeFilter(filter.id)}
>
<Trash2Icon className="size-3.5" />
diff --git a/packages/admin/src/components/spree/theme-toggle.tsx b/packages/admin/src/components/spree/theme-toggle.tsx
new file mode 100644
index 0000000000..b1bfd96bd4
--- /dev/null
+++ b/packages/admin/src/components/spree/theme-toggle.tsx
@@ -0,0 +1,35 @@
+import { CheckIcon, MonitorIcon, MoonIcon, SunIcon } from 'lucide-react'
+import {
+ DropdownMenuItem,
+ DropdownMenuLabel,
+ DropdownMenuSeparator,
+} from '@/components/ui/dropdown-menu'
+import { useTheme } from '@/providers/theme-provider'
+
+/**
+ * Theme picker rendered inside the user dropdown menu. Three-way (Light / Dark
+ * / System) — System follows `prefers-color-scheme`.
+ */
+export function ThemeMenuItems() {
+ const { mode, setMode } = useTheme()
+
+ const items = [
+ { value: 'light', label: 'Light', icon: SunIcon },
+ { value: 'dark', label: 'Dark', icon: MoonIcon },
+ { value: 'system', label: 'System', icon: MonitorIcon },
+ ] as const
+
+ return (
+ <>
+ <DropdownMenuLabel className="text-xs">Theme</DropdownMenuLabel>
+ {items.map(({ value, label, icon: Icon }) => (
+ <DropdownMenuItem key={value} closeOnClick={false} onClick={() => setMode(value)}>
+ <Icon className="size-4" />
+ {label}
+ {mode === value && <CheckIcon className="ml-auto size-3.5" />}
+ </DropdownMenuItem>
+ ))}
+ <DropdownMenuSeparator />
+ </>
+ )
+}
diff --git a/packages/admin/src/components/spree/top-bar.tsx b/packages/admin/src/components/spree/top-bar.tsx
index 2e829eecb4..890b2c1ff6 100644
--- a/packages/admin/src/components/spree/top-bar.tsx
+++ b/packages/admin/src/components/spree/top-bar.tsx
@@ -7,6 +7,7 @@ import {
SearchIcon,
UserIcon,
} from 'lucide-react'
+import { ThemeMenuItems } from '@/components/spree/theme-toggle'
import { Avatar, AvatarFallback } from '@/components/ui/avatar'
import { Button } from '@/components/ui/button'
import {
@@ -33,7 +34,7 @@ const IS_MAC = typeof navigator !== 'undefined' && /Mac|iPhone|iPad/.test(naviga
*/
export function TopBar() {
return (
- <header className="sticky top-0 z-40 flex h-header-height shrink-0 items-center gap-3 bg-white/90 px-4 shadow-[inset_0_-1px_0_var(--color-border)] backdrop-blur supports-[backdrop-filter]:bg-white/75">
+ <header className="sticky top-0 z-40 flex h-header-height shrink-0 items-center gap-3 bg-background/90 px-4 shadow-[inset_0_-1px_0_var(--color-border)] backdrop-blur supports-[backdrop-filter]:bg-background/75">
<SidebarTrigger className="-ml-1 h-8 w-8" />
<div className="flex flex-1 justify-center">
@@ -63,7 +64,7 @@ function SearchTrigger() {
>
<SearchIcon className="size-4" />
<span className="flex-1 text-left">Search products, orders, customers…</span>
- <kbd className="hidden rounded border bg-white px-1.5 py-0.5 font-mono text-xs sm:inline-flex">
+ <kbd className="hidden rounded border bg-background px-1.5 py-0.5 font-mono text-xs sm:inline-flex">
{IS_MAC ? '⌘K' : 'Ctrl+K'}
</kbd>
</button>
@@ -113,24 +114,29 @@ function TopBarUser() {
<DropdownMenuTrigger asChild>
<button
type="button"
- className="flex items-center gap-2 rounded-lg p-1 transition-colors hover:bg-gray-200/50"
+ className="flex items-center gap-2 rounded-lg p-1 transition-colors hover:bg-accent"
>
<Avatar className="size-7">
- <AvatarFallback className="bg-zinc-950 text-xs text-white">{initials}</AvatarFallback>
+ <AvatarFallback className="bg-primary text-xs text-primary-foreground dark:bg-accent dark:text-foreground">
+ {initials}
+ </AvatarFallback>
</Avatar>
</button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end" className="w-56" sideOffset={8}>
<div className="flex items-center gap-2 p-1.5">
<Avatar className="size-8">
- <AvatarFallback className="bg-zinc-950 text-xs text-white">{initials}</AvatarFallback>
+ <AvatarFallback className="bg-primary text-xs text-primary-foreground dark:bg-accent dark:text-foreground">
+ {initials}
+ </AvatarFallback>
</Avatar>
<div className="grid min-w-0 flex-1 text-sm leading-tight">
- <span className="truncate font-medium text-zinc-950">{displayName}</span>
+ <span className="truncate font-medium text-foreground">{displayName}</span>
<span className="truncate text-xs text-muted-foreground">{user.email}</span>
</div>
</div>
<DropdownMenuSeparator />
+ <ThemeMenuItems />
<DropdownMenuItem>
<UserIcon className="size-4" />
Edit Profile
diff --git a/packages/admin/src/components/ui/badge.tsx b/packages/admin/src/components/ui/badge.tsx
index 5621f234df..6fb6ed0c56 100644
--- a/packages/admin/src/components/ui/badge.tsx
+++ b/packages/admin/src/components/ui/badge.tsx
@@ -7,7 +7,7 @@ const badgeVariants = cva(
{
variants: {
variant: {
- default: 'bg-white text-gray-600 border border-gray-200',
+ default: 'bg-card text-muted-foreground border border-border',
active: 'bg-green-200 text-green-900 border border-transparent',
warning: 'bg-yellow-200 text-yellow-900 border border-transparent',
danger: 'bg-red-100 text-red-900 border border-transparent',
diff --git a/packages/admin/src/components/ui/button.tsx b/packages/admin/src/components/ui/button.tsx
index 3b5e6f736d..ac40192b33 100644
--- a/packages/admin/src/components/ui/button.tsx
+++ b/packages/admin/src/components/ui/button.tsx
@@ -9,11 +9,12 @@ const buttonVariants = cva(
{
variants: {
variant: {
- default: 'bg-primary text-primary-foreground shadow-xs hover:bg-zinc-800',
+ default:
+ 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/85 dark:bg-blue-600 dark:text-white dark:hover:bg-blue-500',
outline:
- 'border-border bg-muted text-foreground shadow-xs hover:bg-gray-100 hover:text-foreground aria-expanded:bg-gray-100',
+ 'border-border bg-muted text-foreground shadow-xs hover:bg-accent hover:text-foreground aria-expanded:bg-accent',
ghost: 'hover:bg-accent hover:text-accent-foreground aria-expanded:bg-accent',
- destructive: 'text-destructive bg-muted border-border shadow-xs hover:bg-red-100',
+ destructive: 'text-destructive bg-muted border-border shadow-xs hover:bg-destructive/10',
link: 'text-primary underline-offset-4 hover:underline',
},
size: {
diff --git a/packages/admin/src/components/ui/calendar.tsx b/packages/admin/src/components/ui/calendar.tsx
index 9e314c53e7..3b6e842a3c 100644
--- a/packages/admin/src/components/ui/calendar.tsx
+++ b/packages/admin/src/components/ui/calendar.tsx
@@ -20,9 +20,9 @@ function Calendar({
caption_label: 'text-sm font-medium',
nav: 'absolute top-1 inset-x-0 flex items-center justify-between px-1 z-10',
button_previous:
- 'inline-flex size-7 items-center justify-center rounded-md border border-gray-200 bg-transparent p-0 text-gray-600 transition-colors hover:bg-gray-100 hover:text-gray-950',
+ 'inline-flex size-7 items-center justify-center rounded-md border border-border bg-transparent p-0 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground',
button_next:
- 'inline-flex size-7 items-center justify-center rounded-md border border-gray-200 bg-transparent p-0 text-gray-600 transition-colors hover:bg-gray-100 hover:text-gray-950',
+ 'inline-flex size-7 items-center justify-center rounded-md border border-border bg-transparent p-0 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground',
month_grid: 'w-full border-collapse',
weekdays: 'flex',
weekday: 'text-muted-foreground rounded-md w-8 font-normal text-xs',
@@ -30,18 +30,18 @@ function Calendar({
day: 'relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-blue-50 [&:has([aria-selected].day-outside)]:bg-blue-50/50 [&:has([aria-selected].day-range-end)]:rounded-r-md',
day_button: cn(
'inline-flex size-8 items-center justify-center rounded-md p-0 font-normal transition-colors',
- 'hover:bg-gray-100 hover:text-gray-950',
+ 'hover:bg-accent hover:text-foreground',
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500',
'aria-selected:bg-blue-600 aria-selected:text-white aria-selected:hover:bg-blue-700 aria-selected:focus:bg-blue-700',
),
range_start: 'day-range-start rounded-l-md',
range_end: 'day-range-end rounded-r-md',
selected: 'bg-blue-600 text-white hover:bg-blue-700 focus:bg-blue-700',
- today: 'bg-gray-100 text-gray-950',
+ today: 'bg-accent text-foreground',
outside:
- 'day-outside text-muted-foreground opacity-50 aria-selected:bg-blue-50 aria-selected:text-muted-foreground aria-selected:opacity-30',
+ 'day-outside text-muted-foreground opacity-50 aria-selected:bg-blue-500/15 aria-selected:text-muted-foreground aria-selected:opacity-60',
disabled: 'text-muted-foreground opacity-50',
- range_middle: 'aria-selected:bg-blue-50 aria-selected:text-gray-950',
+ range_middle: 'aria-selected:bg-blue-500/15 aria-selected:text-foreground',
hidden: 'invisible',
...classNames,
}}
diff --git a/packages/admin/src/components/ui/card.tsx b/packages/admin/src/components/ui/card.tsx
index 03dcd6570e..b9772de163 100644
--- a/packages/admin/src/components/ui/card.tsx
+++ b/packages/admin/src/components/ui/card.tsx
@@ -7,7 +7,7 @@ function Card({ className, ...props }: React.ComponentProps<'div'>) {
<div
data-slot="card"
className={cn(
- 'group/card flex flex-col min-w-0 break-words bg-white border border-border rounded-xl',
+ 'group/card flex flex-col min-w-0 break-words bg-card text-card-foreground border border-border rounded-xl',
className,
)}
{...props}
@@ -20,7 +20,7 @@ function CardHeader({ className, ...props }: React.ComponentProps<'div'>) {
<div
data-slot="card-header"
className={cn(
- 'group/card-header @container/card-header grid auto-rows-min items-start gap-1 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] px-3 py-2.5 border-b border-gray-100 rounded-t-[calc(var(--radius-2xl)-1px)]',
+ 'group/card-header @container/card-header grid auto-rows-min items-start gap-1 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] px-3 py-2.5 border-b border-border rounded-t-[calc(var(--radius-2xl)-1px)]',
className,
)}
{...props}
@@ -61,7 +61,7 @@ function CardFooter({ className, ...props }: React.ComponentProps<'div'>) {
<div
data-slot="card-footer"
className={cn(
- 'flex items-center p-3 bg-transparent border-t border-gray-100 rounded-b-[calc(var(--radius-xl)-1px)]',
+ 'flex items-center p-3 bg-transparent border-t border-border rounded-b-[calc(var(--radius-xl)-1px)]',
className,
)}
{...props}
diff --git a/packages/admin/src/components/ui/combobox.tsx b/packages/admin/src/components/ui/combobox.tsx
index f86834083a..5ebd3b953d 100644
--- a/packages/admin/src/components/ui/combobox.tsx
+++ b/packages/admin/src/components/ui/combobox.tsx
@@ -199,7 +199,7 @@ function ComboboxChips({
<ComboboxPrimitive.Chips
data-slot="combobox-chips"
className={cn(
- 'flex flex-wrap items-center gap-1 rounded-lg border border-gray-200 bg-white shadow-xs px-2.5 py-1.5 text-base transition-all duration-100 ease-in-out focus-within:border-blue-500 focus-within:shadow-[0_0_0_3px_rgba(59,130,246,0.15)] has-aria-invalid:border-destructive has-data-[slot=combobox-chip]:px-1',
+ 'flex flex-wrap items-center gap-1 rounded-lg border border-border bg-card text-foreground shadow-xs px-2.5 py-1.5 text-base transition-all duration-100 ease-in-out focus-within:border-blue-500 focus-within:shadow-[0_0_0_3px_rgba(59,130,246,0.15)] has-aria-invalid:border-destructive has-data-[slot=combobox-chip]:px-1',
className,
)}
{...props}
diff --git a/packages/admin/src/components/ui/data-table.tsx b/packages/admin/src/components/ui/data-table.tsx
index 704e9720df..144dd5bc92 100644
--- a/packages/admin/src/components/ui/data-table.tsx
+++ b/packages/admin/src/components/ui/data-table.tsx
@@ -19,7 +19,7 @@ function TableBody({ className, ...props }: React.ComponentProps<'tbody'>) {
function TableRow({ className, ...props }: React.ComponentProps<'tr'>) {
return (
- <tr className={cn('group/row hover:bg-gray-50/75 last:*:border-b-0', className)} {...props} />
+ <tr className={cn('group/row hover:bg-muted/60 last:*:border-b-0', className)} {...props} />
)
}
@@ -27,7 +27,7 @@ function TableHead({ className, ...props }: React.ComponentProps<'th'>) {
return (
<th
className={cn(
- 'text-left text-sm font-medium text-gray-600 bg-muted py-2 px-3 border-b border-gray-200 whitespace-nowrap first:pl-4 last:pr-4 first:rounded-tl-2xl last:rounded-tr-2xl',
+ 'text-left text-sm font-medium text-muted-foreground bg-muted py-2 px-3 border-b border-border whitespace-nowrap first:pl-4 last:pr-4 first:rounded-tl-2xl last:rounded-tr-2xl',
className,
)}
{...props}
@@ -39,7 +39,7 @@ function TableCell({ className, ...props }: React.ComponentProps<'td'>) {
return (
<td
className={cn(
- 'py-4 px-3 border-b border-gray-200 align-middle first:pl-4 last:pr-4 group-last/row:first:rounded-bl-xl group-last/row:last:rounded-br-xl',
+ 'py-4 px-3 border-b border-border align-middle first:pl-4 last:pr-4 group-last/row:first:rounded-bl-xl group-last/row:last:rounded-br-xl',
className,
)}
{...props}
diff --git a/packages/admin/src/components/ui/date-picker.tsx b/packages/admin/src/components/ui/date-picker.tsx
index 9ad45620b0..8cdfc8d5ab 100644
--- a/packages/admin/src/components/ui/date-picker.tsx
+++ b/packages/admin/src/components/ui/date-picker.tsx
@@ -63,7 +63,7 @@ function DatePicker({
<Popover open={open} onOpenChange={setOpen}>
<PopoverTrigger asChild disabled={disabled}>
<Button type="button" variant="outline" data-empty={!isValidDate}>
- <CalendarIcon className="size-4 shrink-0 text-gray-400" />
+ <CalendarIcon className="size-4 shrink-0 text-muted-foreground" />
<span className="flex-1 truncate">
{isValidDate ? format(date, includeTime ? 'PPP p' : 'PPP') : placeholder}
</span>
@@ -71,7 +71,7 @@ function DatePicker({
<span
role="button"
tabIndex={-1}
- className="inline-flex size-4 items-center justify-center rounded-sm text-gray-400 hover:text-gray-600 transition-colors cursor-pointer"
+ className="inline-flex size-4 items-center justify-center rounded-sm text-muted-foreground hover:text-foreground transition-colors cursor-pointer"
onPointerDown={handleClear}
>
<XIcon className="size-3.5" />
@@ -87,7 +87,7 @@ function DatePicker({
defaultMonth={isValidDate ? date : undefined}
/>
{includeTime && (
- <div className="border-t border-gray-200 px-3 py-2">
+ <div className="border-t border-border px-3 py-2">
<Input type="time" value={timeValue} onChange={handleTimeChange} />
</div>
)}
diff --git a/packages/admin/src/components/ui/dialog.tsx b/packages/admin/src/components/ui/dialog.tsx
index 9e33f3e063..09ba772318 100644
--- a/packages/admin/src/components/ui/dialog.tsx
+++ b/packages/admin/src/components/ui/dialog.tsx
@@ -82,7 +82,7 @@ function DialogOverlay({
<DialogPrimitive.Backdrop
data-slot="dialog-overlay"
className={cn(
- 'fixed inset-0 isolate z-50 bg-black/50 duration-100 data-[starting-style]:opacity-0 data-[ending-style]:opacity-0 transition-opacity',
+ 'fixed inset-0 isolate z-50 bg-gray-100/75 dark:bg-black/60 duration-100 data-[starting-style]:opacity-0 data-[ending-style]:opacity-0 transition-opacity',
className,
)}
{...props}
@@ -104,14 +104,10 @@ function DialogContent({
<DialogPrimitive.Popup
data-slot="dialog-content"
className={cn(
- 'fixed top-1/2 left-1/2 z-50 flex w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-2xl bg-background text-sm duration-100 outline-none sm:max-w-[500px] data-[starting-style]:opacity-0 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:scale-95 transition-[opacity,transform]',
+ 'fixed top-1/2 left-1/2 z-50 flex w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-border bg-background text-foreground text-sm shadow-sm duration-100 outline-none sm:max-w-[500px] data-[starting-style]:opacity-0 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:scale-95 transition-[opacity,transform]',
className,
)}
- style={{
- maxHeight: '90vh',
- boxShadow:
- '0px 0px 0px 1px rgba(179, 179, 179, 0.5), 0px 6px 12px -3px rgba(179, 179, 179, 0.35), 0px 6px 18px 0px rgba(179, 179, 179, 0.35)',
- }}
+ style={{ maxHeight: '90vh' }}
{...props}
>
{children}
diff --git a/packages/admin/src/components/ui/dropdown-menu.tsx b/packages/admin/src/components/ui/dropdown-menu.tsx
index 2e22e6a296..9b196ddb68 100644
--- a/packages/admin/src/components/ui/dropdown-menu.tsx
+++ b/packages/admin/src/components/ui/dropdown-menu.tsx
@@ -81,7 +81,7 @@ function DropdownMenuContent({
<MenuPrimitive.Popup
data-slot="dropdown-menu-content"
className={cn(
- 'z-50 max-h-[var(--available-height)] min-w-40 max-w-80 overflow-x-hidden overflow-y-auto rounded-2xl bg-white p-1 text-foreground shadow-[0px_0px_0px_1px_rgba(179,179,179,0.5),0px_6px_12px_-3px_rgba(179,179,179,0.35),0px_6px_18px_0px_rgba(179,179,179,0.35)] duration-100 data-[starting-style]:opacity-0 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:scale-95 transition-[opacity,transform]',
+ 'z-50 max-h-[var(--available-height)] min-w-40 max-w-80 overflow-x-hidden overflow-y-auto rounded-2xl border border-border bg-popover p-1 text-popover-foreground shadow-lg duration-100 data-[starting-style]:opacity-0 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:scale-95 transition-[opacity,transform]',
className,
)}
{...props}
@@ -244,7 +244,7 @@ function DropdownMenuSeparator({
return (
<MenuPrimitive.Separator
data-slot="dropdown-menu-separator"
- className={cn('-mx-1 my-1 h-px bg-gray-100', className)}
+ className={cn('-mx-1 my-1 h-px bg-border', className)}
{...props}
/>
)
@@ -314,7 +314,7 @@ function DropdownMenuSubContent({
<MenuPrimitive.Popup
data-slot="dropdown-menu-sub-content"
className={cn(
- 'z-50 min-w-[96px] overflow-hidden rounded-2xl bg-white p-1 text-foreground shadow-[0px_0px_0px_1px_rgba(179,179,179,0.5),0px_6px_12px_-3px_rgba(179,179,179,0.35),0px_6px_18px_0px_rgba(179,179,179,0.35)] duration-100 data-[starting-style]:opacity-0 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:scale-95 transition-[opacity,transform]',
+ 'z-50 min-w-[96px] overflow-hidden rounded-2xl border border-border bg-popover p-1 text-popover-foreground shadow-lg duration-100 data-[starting-style]:opacity-0 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:scale-95 transition-[opacity,transform]',
className,
)}
{...props}
diff --git a/packages/admin/src/components/ui/input-group.tsx b/packages/admin/src/components/ui/input-group.tsx
index 1efbfdb5ab..87aabf8e69 100644
--- a/packages/admin/src/components/ui/input-group.tsx
+++ b/packages/admin/src/components/ui/input-group.tsx
@@ -11,7 +11,7 @@ function InputGroup({ className, ...props }: React.ComponentProps<'div'>) {
data-slot="input-group"
role="group"
className={cn(
- 'group/input-group relative flex w-full min-w-0 items-center rounded-lg border border-gray-200 bg-white shadow-xs transition-all duration-100 ease-in-out outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:shadow-none has-disabled:bg-gray-50 has-disabled:border-gray-100 has-disabled:opacity-50 has-disabled:shadow-none has-[[data-slot=input-group-control]:focus-visible]:border-blue-500 has-[[data-slot=input-group-control]:focus-visible]:shadow-[0_0_0_3px_rgba(59,130,246,0.15)] has-[[data-slot][aria-invalid=true]]:border-destructive has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5',
+ 'group/input-group relative flex w-full min-w-0 items-center rounded-lg border border-border bg-card text-foreground shadow-xs transition-all duration-100 ease-in-out outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:shadow-none has-disabled:bg-muted has-disabled:border-border has-disabled:opacity-50 has-disabled:shadow-none has-[[data-slot=input-group-control]:focus-visible]:border-blue-500 has-[[data-slot=input-group-control]:focus-visible]:shadow-[0_0_0_3px_rgba(59,130,246,0.15)] has-[[data-slot][aria-invalid=true]]:border-destructive has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5',
className,
)}
{...props}
diff --git a/packages/admin/src/components/ui/input.tsx b/packages/admin/src/components/ui/input.tsx
index 7bc5dc6eee..ef09aed116 100644
--- a/packages/admin/src/components/ui/input.tsx
+++ b/packages/admin/src/components/ui/input.tsx
@@ -8,7 +8,7 @@ function Input({ className, type, ...props }: React.ComponentProps<'input'>) {
type={type}
data-slot="input"
className={cn(
- 'block w-full min-w-0 rounded-lg border border-gray-200 bg-white py-1.5 px-2.5 text-base font-normal leading-normal text-gray-950 shadow-xs transition-all duration-100 ease-in-out outline-none placeholder:text-gray-500 focus:border-blue-500 focus:shadow-[0_0_0_3px_rgba(59,130,246,0.15)] disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-gray-50 disabled:border-gray-100 disabled:text-gray-600 disabled:shadow-none aria-invalid:border-destructive file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground',
+ 'block w-full min-w-0 rounded-lg border border-border bg-card py-1.5 px-2.5 text-base font-normal leading-normal text-foreground shadow-xs transition-all duration-100 ease-in-out outline-none placeholder:text-muted-foreground focus:border-blue-500 focus:shadow-[0_0_0_3px_rgba(59,130,246,0.15)] disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-muted disabled:border-border disabled:text-muted-foreground disabled:shadow-none aria-invalid:border-destructive file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground',
className,
)}
{...props}
diff --git a/packages/admin/src/components/ui/pagination.tsx b/packages/admin/src/components/ui/pagination.tsx
index e60b5bfb86..dc1705c631 100644
--- a/packages/admin/src/components/ui/pagination.tsx
+++ b/packages/admin/src/components/ui/pagination.tsx
@@ -40,7 +40,7 @@ export function Pagination({
if (meta.pages <= 1 && !onPageSizeChange) return null
return (
- <div className="flex items-center justify-between border-t border-gray-200 px-4 py-3">
+ <div className="flex items-center justify-between border-t border-border px-4 py-3">
<div className="text-sm text-muted-foreground">
{meta.from}&ndash;{meta.to} of {meta.count}
</div>
diff --git a/packages/admin/src/components/ui/popover.tsx b/packages/admin/src/components/ui/popover.tsx
index 49ab2fb3af..48256928fe 100644
--- a/packages/admin/src/components/ui/popover.tsx
+++ b/packages/admin/src/components/ui/popover.tsx
@@ -56,7 +56,7 @@ function PopoverContent({
<PopoverPrimitive.Popup
data-slot="popover-content"
className={cn(
- 'z-50 w-auto rounded-lg bg-white p-3 text-foreground shadow-[0px_0px_0px_1px_rgba(179,179,179,0.5),0px_6px_12px_-3px_rgba(179,179,179,0.35),0px_6px_18px_0px_rgba(179,179,179,0.35)]',
+ 'z-50 w-auto rounded-lg border border-border bg-popover p-3 text-popover-foreground shadow-md',
'duration-100 data-[starting-style]:opacity-0 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:scale-95 transition-[opacity,transform]',
className,
)}
diff --git a/packages/admin/src/components/ui/rich-text-editor.tsx b/packages/admin/src/components/ui/rich-text-editor.tsx
index e893b715a1..c892300e15 100644
--- a/packages/admin/src/components/ui/rich-text-editor.tsx
+++ b/packages/admin/src/components/ui/rich-text-editor.tsx
@@ -73,13 +73,13 @@ export function RichTextEditor({
return (
<div
className={cn(
- 'rounded-lg border border-gray-200 bg-white shadow-xs transition-all duration-100 ease-in-out focus-within:border-blue-500 focus-within:shadow-[0_0_0_3px_rgba(59,130,246,0.15)]',
- disabled && 'pointer-events-none bg-gray-50 border-gray-100',
+ 'rounded-lg border border-border bg-card text-foreground shadow-xs transition-all duration-100 ease-in-out focus-within:border-blue-500 focus-within:shadow-[0_0_0_3px_rgba(59,130,246,0.15)]',
+ disabled && 'pointer-events-none bg-muted border-border',
className,
)}
>
{/* Toolbar */}
- <div className="flex items-center gap-0.5 border-b border-gray-200 px-2 py-1.5">
+ <div className="flex items-center gap-0.5 border-b border-border px-2 py-1.5">
<ToolbarButton
active={editor.isActive('bold')}
onClick={() => editor.chain().focus().toggleBold().run()}
@@ -153,7 +153,7 @@ export function RichTextEditor({
{/* Editor */}
<EditorContent
editor={editor}
- className="prose prose-sm max-w-none px-3 py-2 [&_.tiptap]:min-h-32 [&_.tiptap]:outline-none [&_.tiptap.is-editor-empty:first-child::before]:text-gray-500 [&_.tiptap.is-editor-empty:first-child::before]:content-[attr(data-placeholder)] [&_.tiptap.is-editor-empty:first-child::before]:float-left [&_.tiptap.is-editor-empty:first-child::before]:h-0 [&_.tiptap.is-editor-empty:first-child::before]:pointer-events-none"
+ className="prose prose-sm max-w-none px-3 py-2 dark:prose-invert [&_.tiptap]:min-h-32 [&_.tiptap]:outline-none [&_.tiptap.is-editor-empty:first-child::before]:text-muted-foreground [&_.tiptap.is-editor-empty:first-child::before]:content-[attr(data-placeholder)] [&_.tiptap.is-editor-empty:first-child::before]:float-left [&_.tiptap.is-editor-empty:first-child::before]:h-0 [&_.tiptap.is-editor-empty:first-child::before]:pointer-events-none"
/>
</div>
)
@@ -179,8 +179,8 @@ function ToolbarButton({
disabled={disabled}
title={title}
className={cn(
- 'inline-flex items-center justify-center rounded-md p-1.5 text-gray-600 hover:bg-gray-100 hover:text-gray-950 transition-colors disabled:opacity-40 disabled:pointer-events-none',
- active && 'bg-gray-100 text-gray-950',
+ 'inline-flex items-center justify-center rounded-md p-1.5 text-muted-foreground hover:bg-accent hover:text-foreground transition-colors disabled:opacity-40 disabled:pointer-events-none',
+ active && 'bg-accent text-foreground',
)}
>
{children}
@@ -189,5 +189,5 @@ function ToolbarButton({
}
function ToolbarSeparator() {
- return <div className="mx-1 h-5 w-px bg-gray-200" />
+ return <div className="mx-1 h-5 w-px bg-border" />
}
diff --git a/packages/admin/src/components/ui/select.tsx b/packages/admin/src/components/ui/select.tsx
index 4236c754c4..46e888cce5 100644
--- a/packages/admin/src/components/ui/select.tsx
+++ b/packages/admin/src/components/ui/select.tsx
@@ -54,7 +54,7 @@ function SelectTrigger({
data-slot="select-trigger"
data-size={size}
className={cn(
- "flex w-full items-center justify-between gap-1.5 rounded-lg border border-gray-200 bg-white py-1.5 pr-2 pl-2.5 text-base font-normal leading-normal text-gray-950 shadow-xs transition-all duration-100 ease-in-out outline-none select-none focus:border-blue-500 focus:shadow-[0_0_0_3px_rgba(59,130,246,0.15)] disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-gray-50 disabled:border-gray-100 disabled:text-gray-600 disabled:shadow-none aria-invalid:border-destructive data-[placeholder]:text-gray-500 data-[size=sm]:py-1 data-[size=sm]:px-2 data-[size=sm]:text-sm *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
+ "flex w-full items-center justify-between gap-1.5 rounded-lg border border-border bg-card py-1.5 pr-2 pl-2.5 text-base font-normal leading-normal text-foreground shadow-xs transition-all duration-100 ease-in-out outline-none select-none focus:border-blue-500 focus:shadow-[0_0_0_3px_rgba(59,130,246,0.15)] disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-muted disabled:border-border disabled:text-muted-foreground disabled:shadow-none aria-invalid:border-destructive data-[placeholder]:text-muted-foreground data-[size=sm]:py-1 data-[size=sm]:px-2 data-[size=sm]:text-sm *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
className,
)}
{...props}
diff --git a/packages/admin/src/components/ui/sheet.tsx b/packages/admin/src/components/ui/sheet.tsx
index e6b45fa517..aff1189ca3 100644
--- a/packages/admin/src/components/ui/sheet.tsx
+++ b/packages/admin/src/components/ui/sheet.tsx
@@ -93,7 +93,7 @@ function SheetOverlay({
<SheetPrimitive.Backdrop
data-slot="sheet-overlay"
className={cn(
- 'fixed inset-0 z-50 bg-black/50 duration-200 data-[starting-style]:opacity-0 data-[ending-style]:opacity-0 transition-opacity',
+ 'fixed inset-0 z-50 bg-gray-100/75 dark:bg-black/60 duration-200 data-[starting-style]:opacity-0 data-[ending-style]:opacity-0 transition-opacity',
className,
)}
{...props}
@@ -121,7 +121,7 @@ function SheetContent({
data-side={side}
dir={dir}
className={cn(
- 'fixed z-50 flex flex-col bg-white text-sm shadow-[0px_0px_0px_1px_rgba(179,179,179,0.5),0px_6px_12px_-3px_rgba(179,179,179,0.35),0px_6px_18px_0px_rgba(179,179,179,0.35)] transition duration-250 ease-out',
+ 'fixed z-50 flex flex-col border border-border bg-background text-foreground text-sm shadow-sm transition duration-250 ease-out',
'data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-[calc(100dvh-1rem)] data-[side=right]:max-h-[calc(100dvh-1rem)] data-[side=right]:w-[calc(100vw-1rem)] data-[side=right]:max-w-[600px] data-[side=right]:min-w-[320px] data-[side=right]:m-2 data-[side=right]:rounded-xl',
'data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:sm:max-w-sm',
'data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t',
diff --git a/packages/admin/src/components/ui/sidebar.tsx b/packages/admin/src/components/ui/sidebar.tsx
index e4a15449fd..2d5569184d 100644
--- a/packages/admin/src/components/ui/sidebar.tsx
+++ b/packages/admin/src/components/ui/sidebar.tsx
@@ -459,7 +459,7 @@ function SidebarMenuItem({ className, ...props }: React.ComponentProps<'li'>) {
}
const sidebarMenuButtonVariants = cva(
- 'peer/menu-button group/menu-button flex gap-2 w-full items-center overflow-hidden rounded-xl p-1 text-left text-base text-gray-800 ring-sidebar-ring outline-hidden transition-colors duration-100 ease-in-out group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-10! group-data-[collapsible=icon]:items-center group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:overflow-visible group-data-[collapsible=icon]:p-0! group-data-[collapsible=icon]:gap-0 group-data-[collapsible=icon]:[&>span:last-child]:hidden group-data-[collapsible=icon]:data-active:bg-transparent group-data-[collapsible=icon]:data-active:shadow-none hover:bg-gray-200/50 hover:text-zinc-950 focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-gray-200/50 data-open:hover:text-zinc-950 data-active:bg-white data-active:text-zinc-950 data-active:font-semibold data-active:shadow-nav [&>span:last-child]:truncate',
+ 'peer/menu-button group/menu-button flex gap-2 w-full items-center overflow-hidden rounded-xl p-1 text-left text-base text-sidebar-foreground/80 ring-sidebar-ring outline-hidden transition-colors duration-100 ease-in-out group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-10! group-data-[collapsible=icon]:items-center group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:overflow-visible group-data-[collapsible=icon]:p-0! group-data-[collapsible=icon]:gap-0 group-data-[collapsible=icon]:[&>span:last-child]:hidden hover:bg-sidebar-accent hover:text-sidebar-foreground focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-foreground data-active:bg-sidebar-accent data-active:text-foreground data-active:font-semibold [&>span:last-child]:truncate',
{
variants: {
variant: {
@@ -609,7 +609,7 @@ function SidebarMenuSub({ className, ...props }: React.ComponentProps<'ul'>) {
data-slot="sidebar-menu-sub"
data-sidebar="menu-sub"
className={cn(
- 'relative ml-4 flex min-w-0 flex-col pt-1 pl-4 group-data-[collapsible=icon]:hidden before:absolute before:left-0 before:top-0 before:bottom-1 before:w-px before:bg-gray-200',
+ 'relative ml-4 flex min-w-0 flex-col pt-1 pl-4 group-data-[collapsible=icon]:hidden before:absolute before:left-0 before:top-0 before:bottom-1 before:w-px before:bg-sidebar-border',
className,
)}
{...props}
@@ -648,7 +648,7 @@ function SidebarMenuSubButton({
data-size={size}
data-active={isActive}
className={cn(
- 'relative flex h-7 min-w-0 items-center gap-2 overflow-hidden rounded-xl p-1 text-gray-800 ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-gray-50 hover:text-zinc-950 focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-base data-[size=sm]:text-xs data-active:font-semibold data-active:text-zinc-950 data-active:bg-transparent data-active:shadow-none data-active:before:absolute data-active:before:-left-4 data-active:before:top-[10%] data-active:before:h-[80%] data-active:before:w-[3px] data-active:before:rounded-sm data-active:before:bg-zinc-950 data-active:hover:bg-white [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0',
+ 'relative flex h-7 min-w-0 items-center gap-2 overflow-hidden rounded-xl p-1 text-sidebar-foreground/80 ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-foreground focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-base data-[size=sm]:text-xs data-active:font-semibold data-active:text-foreground data-active:bg-transparent data-active:shadow-none data-active:before:absolute data-active:before:-left-4 data-active:before:top-[10%] data-active:before:h-[80%] data-active:before:w-[3px] data-active:before:rounded-sm data-active:before:bg-foreground data-active:hover:bg-background [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0',
className,
)}
{...props}
diff --git a/packages/admin/src/components/ui/switch.tsx b/packages/admin/src/components/ui/switch.tsx
index 88a672ffeb..65d74f42f8 100644
--- a/packages/admin/src/components/ui/switch.tsx
+++ b/packages/admin/src/components/ui/switch.tsx
@@ -22,7 +22,7 @@ function Switch({
disabled={disabled}
name={name}
className={cn(
- 'peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-xs transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[checked]:bg-blue-600 data-[unchecked]:bg-gray-200',
+ 'peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-xs transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[checked]:bg-blue-600 data-[unchecked]:bg-input',
className,
)}
{...props}
diff --git a/packages/admin/src/components/ui/textarea.tsx b/packages/admin/src/components/ui/textarea.tsx
index 997b5f93a2..03427b01f0 100644
--- a/packages/admin/src/components/ui/textarea.tsx
+++ b/packages/admin/src/components/ui/textarea.tsx
@@ -7,7 +7,7 @@ function Textarea({ className, ...props }: React.ComponentProps<'textarea'>) {
<textarea
data-slot="textarea"
className={cn(
- 'flex field-sizing-content min-h-16 w-full rounded-lg border border-gray-200 bg-white px-2.5 py-1.5 text-base font-normal leading-normal text-gray-950 shadow-xs transition-all duration-100 ease-in-out outline-none placeholder:text-gray-500 focus:border-blue-500 focus:shadow-[0_0_0_3px_rgba(59,130,246,0.15)] disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-gray-50 disabled:border-gray-100 disabled:text-gray-600 disabled:shadow-none aria-invalid:border-destructive',
+ 'flex field-sizing-content min-h-16 w-full rounded-lg border border-border bg-card px-2.5 py-1.5 text-base font-normal leading-normal text-foreground shadow-xs transition-all duration-100 ease-in-out outline-none placeholder:text-muted-foreground focus:border-blue-500 focus:shadow-[0_0_0_3px_rgba(59,130,246,0.15)] disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-muted disabled:border-border disabled:text-muted-foreground disabled:shadow-none aria-invalid:border-destructive',
className,
)}
{...props}
diff --git a/packages/admin/src/components/ui/tooltip.tsx b/packages/admin/src/components/ui/tooltip.tsx
index f46d414302..5a0a6dd163 100644
--- a/packages/admin/src/components/ui/tooltip.tsx
+++ b/packages/admin/src/components/ui/tooltip.tsx
@@ -85,7 +85,7 @@ function TooltipContent({
<TooltipPrimitive.Popup
data-slot="tooltip-content"
className={cn(
- 'z-50 inline-flex w-fit max-w-[200px] items-center gap-1.5 rounded-lg bg-white px-2 py-1 text-sm font-normal text-foreground shadow-[0px_0px_0px_1px_var(--color-gray-200),0px_3px_6px_-1px_rgba(209,213,219,0.35),0px_3px_6px_0px_rgba(209,213,219,0.35)] data-[starting-style]:opacity-0 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:scale-95 transition-[opacity,transform] duration-100',
+ 'z-50 inline-flex w-fit max-w-[200px] items-center gap-1.5 rounded-lg border border-border bg-popover px-2 py-1 text-sm font-normal text-popover-foreground shadow-md data-[starting-style]:opacity-0 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:scale-95 transition-[opacity,transform] duration-100',
className,
)}
{...props}
diff --git a/packages/admin/src/index.css b/packages/admin/src/index.css
index b5ae2a276d..0c3592aac9 100644
--- a/packages/admin/src/index.css
+++ b/packages/admin/src/index.css
@@ -12,75 +12,76 @@
============================================================================ */
:root {
- /* Colors — neutral/zinc palette matching Rails admin */
- --background: oklch(1 0 0); /* white */
- --foreground: oklch(0.145 0 0); /* zinc-950 */
+ /* Vercel/Geist-style neutral palette — pure greyscale. */
+ --background: oklch(1 0 0); /* #ffffff */
+ --foreground: oklch(0.145 0 0); /* near-black */
--card: oklch(1 0 0);
--card-foreground: oklch(0.145 0 0);
--popover: oklch(1 0 0);
--popover-foreground: oklch(0.145 0 0);
- --primary: oklch(0.205 0 0); /* zinc-950 — black primary like Rails admin */
- --primary-foreground: oklch(0.985 0 0);
- --secondary: oklch(0.97 0 0); /* gray-25 equivalent */
+ --primary: oklch(0 0 0); /* pure black for primary CTAs */
+ --primary-foreground: oklch(1 0 0);
+ --secondary: oklch(0.97 0 0); /* #f5f5f5 — gray-100 */
--secondary-foreground: oklch(0.205 0 0);
- --muted: oklch(0.985 0 0); /* FAFAFA — gray-25 */
- --muted-foreground: oklch(0.44 0 0);
- --accent: oklch(0.97 0 0);
+ --muted: oklch(0.985 0 0); /* #fafafa — gray-50 */
+ --muted-foreground: oklch(0.4685 0 0); /* #737373 — Vercel #666 */
+ --accent: oklch(0.97 0 0); /* #f5f5f5 */
--accent-foreground: oklch(0.205 0 0);
--destructive: oklch(0.58 0.22 27); /* red-600 */
- --border: oklch(0.902 0 0); /* gray-200 */
- --input: oklch(0.902 0 0);
- --ring: oklch(0.552 0.016 285); /* blue-500 focus ring */
+ --border: oklch(0.928 0 0); /* #eaeaea — Vercel border */
+ --input: oklch(0.928 0 0);
+ --ring: oklch(0.552 0.016 285); /* blue-500 focus ring (UNCHANGED) */
--chart-1: oklch(0.809 0.105 251.813);
--chart-2: oklch(0.623 0.214 259.815);
--chart-3: oklch(0.546 0.245 262.881);
--chart-4: oklch(0.488 0.243 264.376);
--chart-5: oklch(0.424 0.199 265.638);
- --radius: 0.75rem; /* rounded-xl base */
+ --radius: 0.75rem;
- /* Sidebar — light gray bg like Rails admin #FAFAFA */
- --sidebar: oklch(0.985 0 0);
+ /* Sidebar — slightly muted off-white surface. */
+ --sidebar: oklch(0.985 0 0); /* #fafafa */
--sidebar-foreground: oklch(0.145 0 0);
- --sidebar-primary: oklch(0.205 0 0);
- --sidebar-primary-foreground: oklch(0.985 0 0);
- --sidebar-accent: oklch(0.97 0 0);
- --sidebar-accent-foreground: oklch(0.205 0 0);
- --sidebar-border: oklch(0.902 0 0);
+ --sidebar-primary: oklch(0 0 0);
+ --sidebar-primary-foreground: oklch(1 0 0);
+ --sidebar-accent: oklch(0.945 0 0); /* slightly darker than sidebar bg for hover */
+ --sidebar-accent-foreground: oklch(0.145 0 0);
+ --sidebar-border: oklch(0.928 0 0);
--sidebar-ring: oklch(0.708 0 0);
}
.dark {
- --background: oklch(0.145 0 0);
- --foreground: oklch(0.985 0 0);
- --card: oklch(0.205 0 0);
- --card-foreground: oklch(0.985 0 0);
- --popover: oklch(0.205 0 0);
- --popover-foreground: oklch(0.985 0 0);
- --primary: oklch(0.87 0 0);
- --primary-foreground: oklch(0.205 0 0);
- --secondary: oklch(0.269 0 0);
- --secondary-foreground: oklch(0.985 0 0);
- --muted: oklch(0.269 0 0);
- --muted-foreground: oklch(0.708 0 0);
- --accent: oklch(0.371 0 0);
- --accent-foreground: oklch(0.985 0 0);
+ /* Vercel-style "true black" base, with surfaces stepping up in lightness. */
+ --background: oklch(0 0 0); /* #000000 */
+ --foreground: oklch(0.95 0 0); /* #ededed */
+ --card: oklch(0.145 0 0); /* #0a0a0a — surface */
+ --card-foreground: oklch(0.95 0 0);
+ --popover: oklch(0.145 0 0);
+ --popover-foreground: oklch(0.95 0 0);
+ --primary: oklch(0.95 0 0); /* light-on-dark primary */
+ --primary-foreground: oklch(0 0 0);
+ --secondary: oklch(0.205 0 0); /* #1a1a1a */
+ --secondary-foreground: oklch(0.95 0 0);
+ --muted: oklch(0.18 0 0); /* #161616 */
+ --muted-foreground: oklch(0.62 0 0); /* #888 */
+ --accent: oklch(0.27 0 0); /* hover surface */
+ --accent-foreground: oklch(0.95 0 0);
--destructive: oklch(0.704 0.191 22.216);
- --border: oklch(1 0 0 / 10%);
+ --border: oklch(1 0 0 / 12%);
--input: oklch(1 0 0 / 15%);
- --ring: oklch(0.556 0 0);
+ --ring: oklch(0.552 0.016 285); /* same blue ring as light, for focus parity */
--chart-1: oklch(0.809 0.105 251.813);
--chart-2: oklch(0.623 0.214 259.815);
--chart-3: oklch(0.546 0.245 262.881);
--chart-4: oklch(0.488 0.243 264.376);
--chart-5: oklch(0.424 0.199 265.638);
- --sidebar: oklch(0.205 0 0);
- --sidebar-foreground: oklch(0.985 0 0);
- --sidebar-primary: oklch(0.488 0.243 264.376);
- --sidebar-primary-foreground: oklch(0.985 0 0);
- --sidebar-accent: oklch(0.269 0 0);
- --sidebar-accent-foreground: oklch(0.985 0 0);
+ --sidebar: oklch(0.145 0 0); /* #0a0a0a — slightly elevated from background */
+ --sidebar-foreground: oklch(0.95 0 0);
+ --sidebar-primary: oklch(0.95 0 0);
+ --sidebar-primary-foreground: oklch(0 0 0);
+ --sidebar-accent: oklch(0.27 0 0);
+ --sidebar-accent-foreground: oklch(0.95 0 0);
--sidebar-border: oklch(1 0 0 / 10%);
- --sidebar-ring: oklch(0.556 0 0);
+ --sidebar-ring: oklch(0.708 0 0);
}
@theme inline {
@@ -146,7 +147,81 @@
--color-danger: var(--color-red-600);
}
+@utility themed-scrollbar {
+ /* Theme-aware thin scrollbar utility. Track is transparent, thumb uses
+ CSS vars defined in :root and .dark, so it adapts to the active theme.
+ Apply explicitly to any element you want styled (e.g. the JSON preview
+ drawer); floating surfaces like Sheet/Dialog/Dropdown pick it up via
+ the [data-slot=...] selectors below. */
+ scrollbar-color: var(--scrollbar-thumb) transparent;
+ scrollbar-width: thin;
+
+ &::-webkit-scrollbar {
+ width: 10px;
+ height: 10px;
+ }
+ &::-webkit-scrollbar-track {
+ background: transparent;
+ }
+ &::-webkit-scrollbar-thumb {
+ background-color: var(--scrollbar-thumb);
+ border: 2px solid transparent;
+ border-radius: 9999px;
+ background-clip: padding-box;
+ }
+ &::-webkit-scrollbar-thumb:hover {
+ background-color: var(--scrollbar-thumb-hover);
+ }
+ &::-webkit-scrollbar-corner {
+ background: transparent;
+ }
+}
+
@layer base {
+ :root {
+ --scrollbar-thumb: oklch(0.7 0 0); /* gray-400-ish */
+ --scrollbar-thumb-hover: oklch(0.55 0 0);
+ }
+ .dark {
+ --scrollbar-thumb: oklch(0.35 0 0); /* zinc-700-ish */
+ --scrollbar-thumb-hover: oklch(0.45 0 0);
+ }
+
+ /* Themed scrollbar inside floating surfaces only — page scrollbar stays
+ browser default. Add the .themed-scrollbar utility class to opt other
+ elements in. */
+ [data-slot='dialog-content'],
+ [data-slot='sheet-content'],
+ [data-slot='dropdown-menu-content'],
+ [data-slot='dropdown-menu-sub-content'],
+ [data-slot='popover-content'] {
+ & *,
+ & *::before,
+ & *::after {
+ scrollbar-color: var(--scrollbar-thumb) transparent;
+ scrollbar-width: thin;
+ }
+ & *::-webkit-scrollbar {
+ width: 10px;
+ height: 10px;
+ }
+ & *::-webkit-scrollbar-track {
+ background: transparent;
+ }
+ & *::-webkit-scrollbar-thumb {
+ background-color: var(--scrollbar-thumb);
+ border: 2px solid transparent;
+ border-radius: 9999px;
+ background-clip: padding-box;
+ }
+ & *::-webkit-scrollbar-thumb:hover {
+ background-color: var(--scrollbar-thumb-hover);
+ }
+ & *::-webkit-scrollbar-corner {
+ background: transparent;
+ }
+ }
+
* {
@apply border-border outline-ring/50;
}
@@ -154,6 +229,7 @@
html {
@apply font-sans antialiased;
text-rendering: optimizeLegibility;
+ overflow-y: scroll;
}
body {
diff --git a/packages/admin/src/main.tsx b/packages/admin/src/main.tsx
index 638ce3a91d..07b1599ba1 100644
--- a/packages/admin/src/main.tsx
+++ b/packages/admin/src/main.tsx
@@ -8,6 +8,7 @@ import { useAuth } from '@/hooks/use-auth'
import { queryClient } from '@/lib/query-client'
import { AuthProvider } from '@/providers/auth-provider'
import { PermissionProvider, usePermissions } from '@/providers/permission-provider'
+import { ThemeProvider } from '@/providers/theme-provider'
import { router } from '@/router'
import './index.css'
@@ -20,15 +21,17 @@ function InnerApp() {
createRoot(document.getElementById('root')!).render(
<StrictMode>
<QueryClientProvider client={queryClient}>
- <AuthProvider>
- <PermissionProvider>
- <TooltipProvider>
- <ConfirmProvider>
- <InnerApp />
- </ConfirmProvider>
- </TooltipProvider>
- </PermissionProvider>
- </AuthProvider>
+ <ThemeProvider>
+ <AuthProvider>
+ <PermissionProvider>
+ <TooltipProvider>
+ <ConfirmProvider>
+ <InnerApp />
+ </ConfirmProvider>
+ </TooltipProvider>
+ </PermissionProvider>
+ </AuthProvider>
+ </ThemeProvider>
</QueryClientProvider>
</StrictMode>,
)
diff --git a/packages/admin/src/providers/theme-provider.tsx b/packages/admin/src/providers/theme-provider.tsx
new file mode 100644
index 0000000000..f9c56ece42
--- /dev/null
+++ b/packages/admin/src/providers/theme-provider.tsx
@@ -0,0 +1,83 @@
+import {
+ createContext,
+ type ReactNode,
+ useCallback,
+ useContext,
+ useEffect,
+ useMemo,
+ useState,
+} from 'react'
+
+type ThemeMode = 'light' | 'dark' | 'system'
+type ResolvedTheme = 'light' | 'dark'
+
+interface ThemeContextValue {
+ mode: ThemeMode
+ resolved: ResolvedTheme
+ setMode: (mode: ThemeMode) => void
+}
+
+const STORAGE_KEY = 'spree-admin-theme'
+const ThemeContext = createContext<ThemeContextValue | null>(null)
+
+function readStoredMode(): ThemeMode {
+ if (typeof localStorage === 'undefined') return 'system'
+ const value = localStorage.getItem(STORAGE_KEY)
+ return value === 'light' || value === 'dark' || value === 'system' ? value : 'system'
+}
+
+function systemPrefersDark(): boolean {
+ return typeof window !== 'undefined' && window.matchMedia('(prefers-color-scheme: dark)').matches
+}
+
+function resolveTheme(mode: ThemeMode): ResolvedTheme {
+ if (mode === 'system') return systemPrefersDark() ? 'dark' : 'light'
+ return mode
+}
+
+function applyTheme(theme: ResolvedTheme) {
+ const root = document.documentElement
+ if (theme === 'dark') root.classList.add('dark')
+ else root.classList.remove('dark')
+ root.style.colorScheme = theme
+}
+
+export function ThemeProvider({ children }: { children: ReactNode }) {
+ const [mode, setModeState] = useState<ThemeMode>(() => readStoredMode())
+ const [resolved, setResolved] = useState<ResolvedTheme>(() => resolveTheme(readStoredMode()))
+
+ useEffect(() => {
+ const next = resolveTheme(mode)
+ setResolved(next)
+ applyTheme(next)
+ }, [mode])
+
+ useEffect(() => {
+ if (mode !== 'system') return
+ const mql = window.matchMedia('(prefers-color-scheme: dark)')
+ const onChange = () => {
+ const next: ResolvedTheme = mql.matches ? 'dark' : 'light'
+ setResolved(next)
+ applyTheme(next)
+ }
+ mql.addEventListener('change', onChange)
+ return () => mql.removeEventListener('change', onChange)
+ }, [mode])
+
+ const setMode = useCallback((next: ThemeMode) => {
+ if (typeof localStorage !== 'undefined') localStorage.setItem(STORAGE_KEY, next)
+ setModeState(next)
+ }, [])
+
+ const value = useMemo<ThemeContextValue>(
+ () => ({ mode, resolved, setMode }),
+ [mode, resolved, setMode],
+ )
+ return <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>
+}
+
+export function useTheme(): ThemeContextValue {
+ const ctx = useContext(ThemeContext)
+ if (!ctx) throw new Error('useTheme must be used within <ThemeProvider>')
+ return ctx
+}
diff --git a/packages/admin/src/routes/_authenticated/$storeId/customers/$customerId.tsx b/packages/admin/src/routes/_authenticated/$storeId/customers/$customerId.tsx
index e636800667..bfefb53187 100644
--- a/packages/admin/src/routes/_authenticated/$storeId/customers/$customerId.tsx
+++ b/packages/admin/src/routes/_authenticated/$storeId/customers/$customerId.tsx
@@ -355,7 +355,7 @@ function LastOrderCard({ order }: { order: Order }) {
<Link
to={'/$storeId/orders/$orderId' as string}
params={{ orderId: order.id }}
- className="font-medium text-zinc-950 no-underline"
+ className="font-medium text-foreground no-underline"
>
#{order.number}
</Link>
@@ -462,7 +462,7 @@ function OrdersCard({
<Link
to={'/$storeId/orders/$orderId' as string}
params={{ orderId: order.id }}
- className="font-medium text-zinc-950 no-underline"
+ className="font-medium text-foreground no-underline"
>
#{order.number}
</Link>
diff --git a/packages/admin/src/routes/_authenticated/$storeId/orders/$orderId.tsx b/packages/admin/src/routes/_authenticated/$storeId/orders/$orderId.tsx
index 9fea89c19f..97df47a164 100644
--- a/packages/admin/src/routes/_authenticated/$storeId/orders/$orderId.tsx
+++ b/packages/admin/src/routes/_authenticated/$storeId/orders/$orderId.tsx
@@ -366,7 +366,7 @@ function AddLineItemDialog({
autoFocus
/>
{search.length >= 3 && variants.length > 0 && !selectedVariant && (
- <div className="mt-1 rounded-lg border border-gray-200 bg-white shadow-xs max-h-[280px] overflow-y-auto">
+ <div className="mt-1 rounded-lg border border-border bg-popover text-popover-foreground shadow-xs max-h-[280px] overflow-y-auto">
{variants.map((v) => (
<button
key={v.id}
@@ -1541,7 +1541,7 @@ function CustomerCard({ order }: { order: Order }) {
{/* Contact info */}
{user ? (
<div className="flex items-center gap-3 rounded-xl bg-muted p-3">
- <div className="flex size-9 items-center justify-center rounded-lg bg-zinc-950 text-white text-xs font-medium">
+ <div className="flex size-9 items-center justify-center rounded-lg bg-primary text-primary-foreground text-xs font-medium dark:bg-accent dark:text-foreground">
{[user.first_name, user.last_name]
.filter(Boolean)
.map((n) => n![0])
diff --git a/packages/admin/src/routes/_authenticated/$storeId/orders/new.tsx b/packages/admin/src/routes/_authenticated/$storeId/orders/new.tsx
index 4192dc7331..6f52daba2a 100644
--- a/packages/admin/src/routes/_authenticated/$storeId/orders/new.tsx
+++ b/packages/admin/src/routes/_authenticated/$storeId/orders/new.tsx
@@ -148,7 +148,7 @@ function NewOrderPage() {
onChange={(e) => setCustomerSearch(e.target.value)}
/>
{customerSearch.length >= 2 && customerResults.length > 0 && (
- <div className="mt-1 rounded-lg border bg-white shadow-xs max-h-[280px] overflow-y-auto">
+ <div className="mt-1 rounded-lg border border-border bg-popover text-popover-foreground shadow-xs max-h-[280px] overflow-y-auto">
{customerResults.map((c) => (
<button
key={c.id}
@@ -207,7 +207,7 @@ function NewOrderPage() {
onChange={(e) => setVariantSearch(e.target.value)}
/>
{variantSearch.length >= 3 && variantResults.length > 0 && (
- <div className="mt-1 rounded-lg border bg-white shadow-xs max-h-[280px] overflow-y-auto">
+ <div className="mt-1 rounded-lg border border-border bg-popover text-popover-foreground shadow-xs max-h-[280px] overflow-y-auto">
{variantResults.map((v) => (
<button
key={v.id}
diff --git a/packages/admin/src/routes/_authenticated/$storeId/products/$productId.tsx b/packages/admin/src/routes/_authenticated/$storeId/products/$productId.tsx
index 6a7624cfde..e45377ad45 100644
--- a/packages/admin/src/routes/_authenticated/$storeId/products/$productId.tsx
+++ b/packages/admin/src/routes/_authenticated/$storeId/products/$productId.tsx
@@ -400,14 +400,14 @@ function MediaCard({ productId }: { productId: string }) {
{pending.map((upload) => (
<div
key={upload.id}
- className="relative aspect-square overflow-hidden rounded-lg border border-gray-200 bg-gray-50"
+ className="relative aspect-square overflow-hidden rounded-lg border border-border bg-muted"
>
<img src={upload.preview} alt="" className="size-full object-cover opacity-60" />
<div className="absolute inset-0 flex items-center justify-center">
{upload.progress === 'error' ? (
<span className="text-xs text-destructive font-medium">Failed</span>
) : (
- <Loader2Icon className="size-5 animate-spin text-gray-500" />
+ <Loader2Icon className="size-5 animate-spin text-muted-foreground" />
)}
</div>
</div>
@@ -420,12 +420,14 @@ function MediaCard({ productId }: { productId: string }) {
type="button"
onDrop={handleDrop}
onDragOver={handleDragOver}
- className="flex w-full flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed border-gray-200 p-6 text-center transition-colors hover:border-gray-300 cursor-pointer"
+ className="flex w-full flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed border-border p-6 text-center transition-colors hover:border-foreground/30 cursor-pointer"
onClick={() => fileInputRef.current?.click()}
>
- <ImagePlusIcon className="size-8 text-gray-400" />
- <p className="text-sm text-gray-600">Drag & drop images here, or click to browse</p>
- <p className="text-xs text-gray-400">PNG, JPG, WebP up to 10MB</p>
+ <ImagePlusIcon className="size-8 text-muted-foreground" />
+ <p className="text-sm text-muted-foreground">
+ Drag & drop images here, or click to browse
+ </p>
+ <p className="text-xs text-muted-foreground">PNG, JPG, WebP up to 10MB</p>
</button>
<input
ref={fileInputRef}
@@ -444,18 +446,18 @@ function MediaThumbnail({ mediaItem, onDelete }: { mediaItem: Media; onDelete: (
const imageUrl = mediaItem.small_url || mediaItem.mini_url || mediaItem.original_url
return (
- <div className="group relative aspect-square overflow-hidden rounded-lg border border-gray-200 bg-gray-50">
+ <div className="group relative aspect-square overflow-hidden rounded-lg border border-border bg-muted">
{imageUrl ? (
<img src={imageUrl} alt={mediaItem.alt ?? ''} className="size-full object-cover" />
) : (
- <div className="flex size-full items-center justify-center text-gray-400">
+ <div className="flex size-full items-center justify-center text-muted-foreground">
<ImagePlusIcon className="size-6" />
</div>
)}
<button
type="button"
onClick={onDelete}
- className="absolute top-1.5 right-1.5 hidden group-hover:inline-flex items-center justify-center rounded-md size-6 bg-white/90 text-gray-600 hover:text-destructive hover:bg-white shadow-sm transition-colors"
+ className="absolute top-1.5 right-1.5 hidden group-hover:inline-flex items-center justify-center rounded-md size-6 bg-background/90 text-muted-foreground hover:text-destructive hover:bg-background shadow-sm transition-colors"
>
<XIcon className="size-3.5" />
</button>
@@ -595,7 +597,7 @@ function SEOCard({ form, product }: FormCardProps & { product: Product }) {
</CardHeader>
<CardContent className="flex flex-col gap-4">
{/* Preview */}
- <div className="rounded-lg border border-gray-200 p-4 space-y-1">
+ <div className="rounded-lg border border-border p-4 space-y-1">
<p className="text-sm font-medium text-blue-700 truncate">{metaTitle || product.name}</p>
<p className="text-xs text-green-700 truncate">
example.com/products/{slug || product.slug}
diff --git a/packages/admin/src/tables/customers.tsx b/packages/admin/src/tables/customers.tsx
index 0271bda406..4f12c4dc20 100644
--- a/packages/admin/src/tables/customers.tsx
+++ b/packages/admin/src/tables/customers.tsx
@@ -21,7 +21,7 @@ defineTable('customers', {
<Link
to={'/$storeId/customers/$customerId' as string}
params={{ customerId: c.id }}
- className="font-medium text-zinc-950 no-underline"
+ className="font-medium text-foreground no-underline"
>
{c.email}
</Link>
diff --git a/packages/admin/src/tables/orders.tsx b/packages/admin/src/tables/orders.tsx
index 719b5f9ca2..858986adb3 100644
--- a/packages/admin/src/tables/orders.tsx
+++ b/packages/admin/src/tables/orders.tsx
@@ -22,7 +22,7 @@ defineTable('orders', {
<Link
to={'/$storeId/orders/$orderId' as string}
params={{ orderId: order.id }}
- className="font-medium text-zinc-950 no-underline"
+ className="font-medium text-foreground no-underline"
>
#{order.number}
</Link>
diff --git a/packages/admin/src/tables/products.tsx b/packages/admin/src/tables/products.tsx
index e7d2b4dfc9..ab9caa183d 100644
--- a/packages/admin/src/tables/products.tsx
+++ b/packages/admin/src/tables/products.tsx
@@ -24,7 +24,7 @@ defineTable('products', {
params={{ productId: product.id }}
className="flex items-center gap-3 no-underline"
>
- <div className="flex size-10 shrink-0 items-center justify-center rounded-lg border border-gray-200 bg-gray-50 overflow-hidden">
+ <div className="flex size-10 shrink-0 items-center justify-center rounded-lg border border-border bg-muted overflow-hidden">
{product.thumbnail_url ? (
<img
src={product.thumbnail_url}
@@ -32,11 +32,11 @@ defineTable('products', {
className="size-full object-cover"
/>
) : (
- <PackageIcon className="size-4 text-gray-400" />
+ <PackageIcon className="size-4 text-muted-foreground" />
)}
</div>
<div className="min-w-0">
- <div className="truncate font-medium text-zinc-950">{product.name}</div>
+ <div className="truncate font-medium text-foreground">{product.name}</div>
</div>
</Link>
),