The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix(studio): color regressions after theme update (#47794)
Danny White805aee289e29
diff --git a/apps/design-system/__registry__/index.tsx b/apps/design-system/__registry__/index.tsxindex 1ea214369aa..12c8f4c965b 100644--- a/apps/design-system/__registry__/index.tsx+++ b/apps/design-system/__registry__/index.tsx@@ -1677,6 +1677,39 @@ export const Index: Record<string, any> = {subcategory: "undefined",chunks: []},+ "success-check-demo": {+ name: "success-check-demo",+ type: "components:example",+ registryDependencies: undefined,+ component: React.lazy(() => import("@/registry/default/example/success-check-demo")),+ source: "",+ files: ["registry/default/example/success-check-demo.tsx"],+ category: "undefined",+ subcategory: "undefined",+ chunks: []+ },+ "success-check-selected": {+ name: "success-check-selected",+ type: "components:example",+ registryDependencies: undefined,+ component: React.lazy(() => import("@/registry/default/example/success-check-selected")),+ source: "",+ files: ["registry/default/example/success-check-selected.tsx"],+ category: "undefined",+ subcategory: "undefined",+ chunks: []+ },+ "success-check-progress": {+ name: "success-check-progress",+ type: "components:example",+ registryDependencies: undefined,+ component: React.lazy(() => import("@/registry/default/example/success-check-progress")),+ source: "",+ files: ["registry/default/example/success-check-progress.tsx"],+ category: "undefined",+ subcategory: "undefined",+ chunks: []+ },"switch-demo": {name: "switch-demo",type: "components:example",diff --git a/apps/design-system/config/docs.ts b/apps/design-system/config/docs.tsindex bfb6de81579..6e72373cf39 100644--- a/apps/design-system/config/docs.ts+++ b/apps/design-system/config/docs.ts@@ -487,6 +487,11 @@ export const docsConfig: DocsConfig = {href: '/docs/components/sonner',items: [],},+ {+ title: 'Success Check',+ href: '/docs/components/success-check',+ items: [],+ },{title: 'Switch',href: '/docs/components/switch',diff --git a/apps/design-system/content/docs/components/success-check.mdx b/apps/design-system/content/docs/components/success-check.mdxnew file mode 100644index 00000000000..42987ea74f9--- /dev/null+++ b/apps/design-system/content/docs/components/success-check.mdx@@ -0,0 +1,33 @@+---+title: Success Check+description: A brand-coloured success indicator with a check mark.+component: true+---++Use `SuccessCheck` when you need a compact, consistent mark for:++- **Selected state:** e.g. the chosen organisation in a list of cards+- **Completion progress:** e.g. finished steps in an upgrade or setup flow++<ComponentPreview name="success-check-demo" peekCode />++## Usage++```tsx+import { SuccessCheck } from 'ui'+;<SuccessCheck />+```++## Examples++### Selected state++Show which option is currently selected. Position the check absolutely in the trailing corner of the selectable item.++<ComponentPreview name="success-check-selected" peekCode />++### Completion progress++Mark finished steps in a linear progress list. Incomplete steps use a plain circle instead.++<ComponentPreview name="success-check-progress" peekCode />diff --git a/apps/design-system/registry/default/example/success-check-demo.tsx b/apps/design-system/registry/default/example/success-check-demo.tsxnew file mode 100644index 00000000000..d778a8ea268--- /dev/null+++ b/apps/design-system/registry/default/example/success-check-demo.tsx@@ -0,0 +1,5 @@+import { SuccessCheck } from 'ui'++export default function SuccessCheckDemo() {+ return <SuccessCheck />+}diff --git a/apps/design-system/registry/default/example/success-check-progress.tsx b/apps/design-system/registry/default/example/success-check-progress.tsxnew file mode 100644index 00000000000..09552bccd5c--- /dev/null+++ b/apps/design-system/registry/default/example/success-check-progress.tsx@@ -0,0 +1,41 @@+import { SuccessCheck } from 'ui'++const STEPS = ['Preparing', 'Upgrading', 'Finalising']++export default function SuccessCheckProgress() {+ const completedThrough = 1++ return (+ <div className="flex flex-col gap-3">+ {STEPS.map((step, index) => {+ const isCompleted = index < completedThrough+ const isCurrent = index === completedThrough++ return (+ <div key={step} className="flex items-center gap-3">+ {isCompleted ? (+ <SuccessCheck />+ ) : (+ <span+ className={`flex size-5 shrink-0 items-center justify-center rounded-full border ${+ isCurrent ? 'border-foreground' : 'border-muted bg-overlay-hover'+ }`}+ />+ )}+ <span+ className={`text-sm ${+ isCurrent+ ? 'text-foreground'+ : isCompleted+ ? 'text-foreground-light'+ : 'text-foreground-lighter'+ }`}+ >+ {isCurrent ? `${step}…` : isCompleted ? `${step} complete` : step}+ </span>+ </div>+ )+ })}+ </div>+ )+}diff --git a/apps/design-system/registry/default/example/success-check-selected.tsx b/apps/design-system/registry/default/example/success-check-selected.tsxnew file mode 100644index 00000000000..a6ecd541264--- /dev/null+++ b/apps/design-system/registry/default/example/success-check-selected.tsx@@ -0,0 +1,38 @@+'use client'++import { useState } from 'react'+import { cn, SuccessCheck } from 'ui'++const OPTIONS = ['Production', 'Staging', 'Development']++export default function SuccessCheckSelected() {+ const [selected, setSelected] = useState(OPTIONS[0])++ return (+ <div className="flex w-full max-w-sm flex-col gap-2">+ {OPTIONS.map((option) => {+ const isSelected = selected === option++ return (+ <button+ key={option}+ type="button"+ aria-pressed={isSelected}+ onClick={() => setSelected(option)}+ className={cn(+ 'relative flex w-full items-center rounded-md border px-4 py-3 text-left text-sm transition-colors',+ isSelected+ ? 'border-brand bg-brand-200/20 pr-10 dark:bg-brand-300'+ : 'hover:border-default hover:bg-surface-200'+ )}+ >+ {option}+ {isSelected && (+ <SuccessCheck className="pointer-events-none absolute right-3 top-1/2 -translate-y-1/2" />+ )}+ </button>+ )+ })}+ </div>+ )+}diff --git a/apps/design-system/registry/examples.ts b/apps/design-system/registry/examples.tsindex 7e05ca4755f..064555d0c17 100644--- a/apps/design-system/registry/examples.ts+++ b/apps/design-system/registry/examples.ts@@ -910,6 +910,21 @@ export const examples: Registry = [registryDependencies: ['sonner'],files: ['example/sonner-upload.tsx'],},+ {+ name: 'success-check-demo',+ type: 'components:example',+ files: ['example/success-check-demo.tsx'],+ },+ {+ name: 'success-check-selected',+ type: 'components:example',+ files: ['example/success-check-selected.tsx'],+ },+ {+ name: 'success-check-progress',+ type: 'components:example',+ files: ['example/success-check-progress.tsx'],+ },{name: 'switch-demo',type: 'components:example',diff --git a/apps/studio/components/interfaces/Connect/OrganizationSelector.tsx b/apps/studio/components/interfaces/Connect/OrganizationSelector.tsxindex feac48d13a2..42fd4aad6b4 100644--- a/apps/studio/components/interfaces/Connect/OrganizationSelector.tsx+++ b/apps/studio/components/interfaces/Connect/OrganizationSelector.tsx@@ -1,6 +1,6 @@-import { Check, ChevronDown } from 'lucide-react'+import { ChevronDown } from 'lucide-react'import { useMemo, useState, type ReactNode } from 'react'-import { cn, Collapsible, CollapsibleContent, CollapsibleTrigger } from 'ui'+import { cn, Collapsible, CollapsibleContent, CollapsibleTrigger, SuccessCheck } from 'ui'import {CreateOrganizationCard,@@ -213,9 +213,7 @@ const ConnectOrganizationButton = ({)}/>{selected && (- <span className="pointer-events-none absolute right-3 top-1/2 flex size-5 -translate-y-1/2 items-center justify-center rounded-full bg-brand-500 dark:bg-brand-200 text-white dark:text-brand">- <Check className="size-3.5" strokeWidth={2} />- </span>+ <SuccessCheck className="pointer-events-none absolute right-3 top-1/2 -translate-y-1/2" />)}</button>)diff --git a/apps/studio/components/layouts/ProjectLayout/UpgradingState/index.tsx b/apps/studio/components/layouts/ProjectLayout/UpgradingState/index.tsxindex d77b9dda74a..a909b77457f 100644--- a/apps/studio/components/layouts/ProjectLayout/UpgradingState/index.tsx+++ b/apps/studio/components/layouts/ProjectLayout/UpgradingState/index.tsx@@ -4,7 +4,6 @@ import { useParams } from 'common'import dayjs from 'dayjs'import {AlertCircle,- Check,CheckCircle,Circle,Loader,@@ -14,7 +13,7 @@ import {} from 'lucide-react'import { useSearchParams } from 'next/navigation'import { useState } from 'react'-import { Button, Tooltip, TooltipContent, TooltipTrigger } from 'ui'+import { Button, SuccessCheck, Tooltip, TooltipContent, TooltipTrigger } from 'ui'import { DATABASE_UPGRADE_MESSAGES } from './UpgradingState.constants'import { SupportLink } from '@/components/interfaces/Support/SupportLink'@@ -202,9 +201,7 @@ export const UpgradingState = () => {/></div>) : isCompleted ? (- <div className="flex items-center justify-center w-5 h-5 border rounded-full bg-brand border-brand">- <Check size={12} className="text-white" strokeWidth={3} />- </div>+ <SuccessCheck />) : (<div className="flex items-center justify-center w-5 h-5 border rounded-full bg-overlay-hover" />)}diff --git a/apps/studio/components/ui/ProjectSettings/DisplayApiSettings.tsx b/apps/studio/components/ui/ProjectSettings/DisplayApiSettings.tsxindex 21ebe784368..785e344ec19 100644--- a/apps/studio/components/ui/ProjectSettings/DisplayApiSettings.tsx+++ b/apps/studio/components/ui/ProjectSettings/DisplayApiSettings.tsx@@ -152,7 +152,7 @@ export const DisplayApiSettings = ({))}{x.tags === 'service_role' && (<>- <code className="text-code-inline bg-destructive! text-white! border-destructive!">+ <code className="text-code-inline bg-destructive! text-destructive-foreground! border-destructive!">secret</code></>diff --git a/apps/www/components/Error404.tsx b/apps/www/components/Error404.tsxindex 474a6a9aff1..f2e6e5c3a41 100644--- a/apps/www/components/Error404.tsx+++ b/apps/www/components/Error404.tsx@@ -51,7 +51,7 @@ const Error404 = () => {</p></div><div className="flex items-center space-x-4">- <Button asChild size="small" className="text-white">+ <Button asChild size="small"><Link href="/">Head back</Link></Button></div>diff --git a/apps/www/components/Sections/ProductHeaderCentered.tsx b/apps/www/components/Sections/ProductHeaderCentered.tsxindex d8a39132f39..60dfe711ec9 100644--- a/apps/www/components/Sections/ProductHeaderCentered.tsx+++ b/apps/www/components/Sections/ProductHeaderCentered.tsx@@ -81,7 +81,7 @@ const ProductHeaderCentered = (props: Types) => (</div><div className="w-full sm:w-auto flex flex-col items-stretch sm:flex-row pt-2 sm:items-center gap-2">{props.cta && (- <Button size="medium" className="text-white" iconRight={props.cta.icon} asChild>+ <Button size="medium" iconRight={props.cta.icon} asChild><Link href={props.cta.link} as={props.cta.link}>{props.cta.label ?? 'Start for free'}</Link>diff --git a/apps/www/components/Sections/ProductModulesHeader.tsx b/apps/www/components/Sections/ProductModulesHeader.tsxindex c36e4d3a536..882e5fe62a2 100644--- a/apps/www/components/Sections/ProductModulesHeader.tsx+++ b/apps/www/components/Sections/ProductModulesHeader.tsx@@ -102,7 +102,7 @@ const ProductModulesHeader = (props: Types) => (</div><div className="w-full sm:w-auto flex flex-col items-stretch sm:flex-row pt-2 sm:items-center gap-2">{props.cta && (- <Button size="small" className="text-white" asChild>+ <Button size="small" asChild><Link href={props.cta.link} as={props.cta.link}>{props.cta.label ?? 'Start for free'}</Link>diff --git a/apps/www/pages/company.tsx b/apps/www/pages/company.tsxindex f73c19d9aa9..ef209842ff3 100644--- a/apps/www/pages/company.tsx+++ b/apps/www/pages/company.tsx@@ -91,9 +91,7 @@ const Team = () => {</div><div className=" col-span-4 pt-8 md:mt-0 md:text-right"><a href="https://supabase.com/careers">- <Button size="medium" className="text-white">- Join the team- </Button>+ <Button size="medium">Join the team</Button></a></div></div>diff --git a/packages/ui/index.tsx b/packages/ui/index.tsxindex 941829f92c7..ebbc9499e84 100644--- a/packages/ui/index.tsx+++ b/packages/ui/index.tsx@@ -131,6 +131,7 @@ export * from './src/components/shadcn/ui/sidebar'// ICONSexport * from './src/components/StatusIcon'+export * from './src/components/SuccessCheck'// export iconsexport * from './src/components/Icon/icons/IconBriefcase2'diff --git a/packages/ui/src/components/StatusIcon.tsx b/packages/ui/src/components/StatusIcon.tsxindex eaea49f1ccc..40c773ee348 100644--- a/packages/ui/src/components/StatusIcon.tsx+++ b/packages/ui/src/components/StatusIcon.tsx@@ -38,7 +38,7 @@ const InfoIcon: React.FC<SVGProps<SVGSVGElement> & StatusIconProps> = ({{...props}className={cn(!hideBackground- ? 'w-4 h-4 p-0.5 bg-foreground-lighter text-background-200 rounded-sm'+ ? 'w-4 h-4 p-0.5 bg-foreground-lighter text-background rounded-sm': 'w-3 h-3 text-foreground-lighter',props.className)}diff --git a/packages/ui/src/components/SuccessCheck.tsx b/packages/ui/src/components/SuccessCheck.tsxnew file mode 100644index 00000000000..0658836f6a7--- /dev/null+++ b/packages/ui/src/components/SuccessCheck.tsx@@ -0,0 +1,14 @@+import { Check } from 'lucide-react'++import { cn } from '../lib/utils'++export const SuccessCheck = ({ className }: { className?: string }) => (+ <span+ className={cn(+ 'inline-flex size-5 shrink-0 items-center justify-center rounded-full border border-brand bg-brand text-white dark:text-black',+ className+ )}+ >+ <Check size={12} strokeWidth={3} />+ </span>+)