Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix(design-system): small chart and metric card fixes (#48439)

kemal.earth67c983caefb7
diff --git a/apps/design-system/registry/default/block/chart-composed-actions.tsx b/apps/design-system/registry/default/block/chart-composed-actions.tsx
index ee4212e416e..6e4fbea17bc 100644
--- a/apps/design-system/registry/default/block/chart-composed-actions.tsx
+++ b/apps/design-system/registry/default/block/chart-composed-actions.tsx
@@ -80,7 +80,7 @@ export default function ChartComposedActions() {
showYAxis={true}
YAxisProps={{
tickFormatter: (value) => `${value}k`,
- width: 80,
+ width: 36,
}}
isFullHeight={true}
/>
@@ -92,7 +92,7 @@ export default function ChartComposedActions() {
showYAxis={true}
YAxisProps={{
tickFormatter: (value) => `${value}k`,
- width: 80,
+ width: 36,
}}
isFullHeight={true}
/>
diff --git a/apps/design-system/registry/default/block/chart-composed-basic.tsx b/apps/design-system/registry/default/block/chart-composed-basic.tsx
index 607363710eb..99be1076b08 100644
--- a/apps/design-system/registry/default/block/chart-composed-basic.tsx
+++ b/apps/design-system/registry/default/block/chart-composed-basic.tsx
@@ -93,7 +93,7 @@ export default function ComposedChartBasic() {
showYAxis={true}
YAxisProps={{
tickFormatter: (value) => `${value}k`,
- width: 80,
+ width: 36,
}}
isFullHeight={true}
/>
@@ -129,7 +129,7 @@ export default function ComposedChartBasic() {
showYAxis={true}
YAxisProps={{
tickFormatter: (value) => `${value}k`,
- width: 80,
+ width: 36,
}}
isFullHeight={true}
/>
diff --git a/apps/design-system/registry/default/block/chart-composed-table.tsx b/apps/design-system/registry/default/block/chart-composed-table.tsx
index a8089ed1f57..10ad3b02ed0 100644
--- a/apps/design-system/registry/default/block/chart-composed-table.tsx
+++ b/apps/design-system/registry/default/block/chart-composed-table.tsx
@@ -73,7 +73,7 @@ export default function ChartComposedTable() {
showYAxis={true}
YAxisProps={{
tickFormatter: (value) => `${value}k`,
- width: 80,
+ width: 36,
}}
isFullHeight={true}
/>
diff --git a/apps/studio/styles/globals.css b/apps/studio/styles/globals.css
index b2640fe0075..32d0dd3e282 100644
--- a/apps/studio/styles/globals.css
+++ b/apps/studio/styles/globals.css
@@ -208,13 +208,24 @@ body,
box-sizing: border-box;
}
+@layer base {
+ h1,
+ h2,
+ h3,
+ h4,
+ h5,
+ h6 {
+ @apply font-heading;
+ }
+}
+
h1,
h2,
h3,
h4,
h5,
h6 {
- @apply font-heading font-semibold;
+ @apply font-semibold;
}
.form-group .form-text,
diff --git a/packages/ui-patterns/src/LogsBarChart/index.tsx b/packages/ui-patterns/src/LogsBarChart/index.tsx
index e8c2e005a6d..c22c003eda2 100644
--- a/packages/ui-patterns/src/LogsBarChart/index.tsx
+++ b/packages/ui-patterns/src/LogsBarChart/index.tsx
@@ -13,8 +13,8 @@ const CHART_COLORS = {
GREEN_2: 'hsl(var(--brand-500))',
RED_1: 'hsl(var(--destructive-default))',
RED_2: 'hsl(var(--destructive-500))',
- YELLOW_1: 'var(--chart-warning)',
- YELLOW_2: 'var(--chart-warning-muted)',
+ YELLOW_1: 'var(--chart-warning, hsl(var(--warning-default)))',
+ YELLOW_2: 'var(--chart-warning-muted, hsl(var(--warning-500)))',
}
type LogsBarChartDatum = {
diff --git a/packages/ui/src/lib/utils/cn.ts b/packages/ui/src/lib/utils/cn.ts
index 5589c557500..a2a546b06c5 100644
--- a/packages/ui/src/lib/utils/cn.ts
+++ b/packages/ui/src/lib/utils/cn.ts
@@ -1,5 +1,13 @@
import { ClassValue, clsx } from 'clsx'
-import { twMerge } from 'tailwind-merge'
+import { extendTailwindMerge } from 'tailwind-merge'
+
+const twMerge = extendTailwindMerge({
+ extend: {
+ theme: {
+ spacing: ['card', 'content'],
+ },
+ },
+})
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))