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.

Small dashboard UI improvements

Damian Legawiec2160abdade20
diff --git a/packages/dashboard-core/src/components/country-combobox.tsx b/packages/dashboard-core/src/components/country-combobox.tsx
index 8e557df800..b39d4f62e1 100644
--- a/packages/dashboard-core/src/components/country-combobox.tsx
+++ b/packages/dashboard-core/src/components/country-combobox.tsx
@@ -43,11 +43,11 @@ export function countryFilter(item: CountryOption, query: string): boolean {
*/
function CountryRow({ country }: { country: CountryOption }) {
return (
- <>
+ <span className="flex items-center gap-3">
<CountryFlag iso={country.iso} />
<span>{country.name}</span>
{country.iso && <span className="text-xs text-muted-foreground">({country.iso})</span>}
- </>
+ </span>
)
}
@@ -179,7 +179,7 @@ export function CountryMultiCombobox({
{(selectedCountries: CountryOption[]) =>
selectedCountries.map((c) => (
<ComboboxChip key={c.iso}>
- {c.iso && <CountryFlag iso={c.iso} />}
+ {c.iso && <CountryFlag iso={c.iso} className="mr-2" />}
{c.name}
</ComboboxChip>
))
diff --git a/packages/dashboard-ui/src/styles.css b/packages/dashboard-ui/src/styles.css
index 0414ddfab0..9c8f3fc921 100644
--- a/packages/dashboard-ui/src/styles.css
+++ b/packages/dashboard-ui/src/styles.css
@@ -31,7 +31,7 @@
:root {
/* Vercel/Geist-style neutral palette — pure greyscale. */
- --background: oklch(1 0 0); /* #ffffff */
+ --background: oklch(0.985 0 0); /* #fafafa — gray-50 */
--foreground: oklch(0.145 0 0); /* near-black */
--card: oklch(1 0 0);
--card-foreground: oklch(0.145 0 0);
@@ -49,7 +49,7 @@
--destructive-foreground: oklch(1 0 0); /* #ffffff */
--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) */
+ --ring: oklch(0.546 0.245 262.881); /* 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);
@@ -65,7 +65,7 @@
--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);
+ --sidebar-ring: oklch(0.546 0.245 262.881); /* blue-500 focus ring (UNCHANGED) */
}
.dark {
diff --git a/packages/dashboard-ui/src/ui/avatar.tsx b/packages/dashboard-ui/src/ui/avatar.tsx
index fe14a4a788..420debdd9b 100644
--- a/packages/dashboard-ui/src/ui/avatar.tsx
+++ b/packages/dashboard-ui/src/ui/avatar.tsx
@@ -15,7 +15,7 @@ function Avatar({
data-slot="avatar"
data-size={size}
className={cn(
- 'group/avatar relative flex size-8 shrink-0 rounded-lg select-none after:absolute after:inset-0 after:rounded-lg after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten',
+ 'group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten',
className,
)}
{...props}
@@ -27,7 +27,7 @@ function AvatarImage({ className, ...props }: React.ComponentProps<typeof Avatar
return (
<AvatarPrimitive.Image
data-slot="avatar-image"
- className={cn('aspect-square size-full rounded-lg object-cover', className)}
+ className={cn('aspect-square size-full rounded-full object-cover', className)}
{...props}
/>
)
@@ -41,7 +41,7 @@ function AvatarFallback({
<AvatarPrimitive.Fallback
data-slot="avatar-fallback"
className={cn(
- 'flex size-full items-center justify-center rounded-lg bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs uppercase',
+ 'flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs uppercase',
className,
)}
{...props}
diff --git a/packages/dashboard-ui/src/ui/card.tsx b/packages/dashboard-ui/src/ui/card.tsx
index ef99df9eed..f0e74a7df9 100644
--- a/packages/dashboard-ui/src/ui/card.tsx
+++ b/packages/dashboard-ui/src/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-card text-card-foreground 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 shadow-xs',
className,
)}
{...props}
diff --git a/packages/dashboard-ui/src/ui/combobox.tsx b/packages/dashboard-ui/src/ui/combobox.tsx
index 683b10f97e..d3c2512ed0 100644
--- a/packages/dashboard-ui/src/ui/combobox.tsx
+++ b/packages/dashboard-ui/src/ui/combobox.tsx
@@ -226,7 +226,7 @@ function ComboboxChip({
{showRemove && (
<ComboboxPrimitive.ChipRemove
render={<Button variant="ghost" size="icon-xs" />}
- className="-ml-1 opacity-50 hover:opacity-100"
+ className="opacity-50 hover:opacity-100"
data-slot="combobox-chip-remove"
>
<XIcon className="pointer-events-none" />
diff --git a/packages/dashboard/src/routes/login.tsx b/packages/dashboard/src/routes/login.tsx
index 0b7181ea61..404cecb898 100644
--- a/packages/dashboard/src/routes/login.tsx
+++ b/packages/dashboard/src/routes/login.tsx
@@ -88,6 +88,7 @@ function LoginFormCard({
type="email"
placeholder={t('admin.fields.login.email.placeholder')}
aria-invalid={!!errors.email || undefined}
+ autoFocus={true}
{...form.register('email')}
/>
{errors.email && (