The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Vector announcement badge (#18029)
Francesco Sansalvadore44b30fe671f7
diff --git a/apps/www/components/Announcement/Badge.tsx b/apps/www/components/Announcement/Badge.tsxindex e2a379c8747..92a2db9289b 100644--- a/apps/www/components/Announcement/Badge.tsx+++ b/apps/www/components/Announcement/Badge.tsx@@ -1,21 +1,28 @@import React from 'react'import Link from 'next/link'-import { Badge } from 'ui'+import { Badge, cn } from 'ui'import { ArrowNarrowRightIcon } from '@heroicons/react/outline'interface Props {url: stringannouncement: stringbadge?: string- target?: '_self' | '_blank'+ target?: '_self' | '_blank' | string+ className?: string}-const AnnouncementBadge = ({ url, announcement, badge, target = '_self' }: Props) => (- <div className="w-full max-w-xl flex justify-center opacity-0 !animate-[fadeIn_0.5s_cubic-bezier(0.25,0.25,0,1)_0.5s_both]">++const AnnouncementBadge = ({ url, announcement, badge, target = '_self', className }: Props) => (+ <div+ className={cn(+ 'relative w-full max-w-xl flex justify-center opacity-0 !animate-[fadeIn_0.5s_cubic-bezier(0.25,0.25,0,1)_0.5s_both]',+ className+ )}+ ><Link href={url}><atarget={target}className="- group+ group/announcementrelativeflex flex-rowitems-center@@ -27,22 +34,26 @@ const AnnouncementBadge = ({ url, announcement, badge, target = '_self' }: Propsrounded-fullbg-opacity-20border- border-background-surface-100- hover:border-background-surface-300+ border-background-surface-300+ hover:border-foreground-muted+ hover:border-opacity-30+ shadow-mdoverflow-hidden- focus:outline-none focus:ring-brand-600 focus:ring-2 focus:rounded-full+ focus-visible:outline-none focus-visible:ring-brand-600 focus-visible:ring-2 focus-visible:rounded-full">{badge && (- <Badge color="brand" size="large" className="py-1">+ <Badge color="brandAlt" size="large" className="py-1">{badge}</Badge>)}<span className="text-foreground">{announcement}</span>- <ArrowNarrowRightIcon className="h-4 ml-2 -translate-x-1 transition-transform group-hover:translate-x-0" />+ <ArrowNarrowRightIcon className="h-4 ml-2 -translate-x-1 transition-transform group-hover/announcement:translate-x-0" /><divclassName="absolute inset-0 -z-10 bg-gradient-to-bropacity-70+ group-hover/announcement:opacity-100+ transition-opacityoverflow-hidden rounded-fullfrom-background-surface-100to-background-surface-300diff --git a/apps/www/components/Sections/ProductHeaderCentered.tsx b/apps/www/components/Sections/ProductHeaderCentered.tsxindex b3976d3b9a8..d90cc5a0795 100644--- a/apps/www/components/Sections/ProductHeaderCentered.tsx+++ b/apps/www/components/Sections/ProductHeaderCentered.tsx@@ -3,6 +3,7 @@ import Link from 'next/link'import ProductIcon from '../ProductIcon'import Image from 'next/image'import styles from '~/styles/animations.module.css'+import AnnouncementBadge from '../Announcement/Badge'interface Types {h1: string | React.ReactNode@@ -12,6 +13,12 @@ interface Types {title?: stringimage?: string | React.ReactNodefooter?: React.ReactNode+ announcement?: {+ url: string+ announcement: string+ badge?: string+ target?: '_self' | '_blank' | string+ }cta?: {label?: stringlink: string@@ -47,6 +54,7 @@ const ProductHeaderCentered = (props: Types) => (</div>)}<div className="relative overflow-hidden w-full z-10 flex flex-col items-center space-y-2 mx-auto max-w-2xl">+ {props.announcement && <AnnouncementBadge {...props.announcement} className="mb-4 z-10" />}<div>{props.icon || props.title ? (<div className="mb-4 flex justify-center items-center gap-3">diff --git a/apps/www/data/products/vector/pageData.tsx b/apps/www/data/products/vector/pageData.tsxindex a0f7a6045cc..93938b32948 100644--- a/apps/www/data/products/vector/pageData.tsx+++ b/apps/www/data/products/vector/pageData.tsx@@ -9,6 +9,12 @@ export default {metaTitle: '',metaDescription: '',heroSection: {+ announcement: {+ url: 'https://www.ai.engineer/summit/schedule/supabase-vector',+ badge: 'AI Engineer Summit',+ announcement: 'Join us in San Francisco, Oct 8–10',+ target: '_blank',+ },title: 'Supabase Vector',h1: (<span key={'vector-h1'} className="heading-gradient">diff --git a/packages/ui/src/lib/constants.ts b/packages/ui/src/lib/constants.tsindex 594293ae9d6..024516efe04 100644--- a/packages/ui/src/lib/constants.ts+++ b/packages/ui/src/lib/constants.ts@@ -22,6 +22,7 @@ export const COLORS = []export type AvailableColors =| 'brand'+ | 'brandAlt'| 'scale'| 'tomato'| 'red'diff --git a/packages/ui/src/lib/theme/defaultTheme.ts b/packages/ui/src/lib/theme/defaultTheme.tsindex 84ab1ad6c49..5a9a1373f5b 100644--- a/packages/ui/src/lib/theme/defaultTheme.ts+++ b/packages/ui/src/lib/theme/defaultTheme.ts@@ -217,6 +217,7 @@ export default {dot: '-ml-0.5 mr-1.5 h-2 w-2 rounded-full',color: {brand: 'bg-brand-500 text-brand-600 border border-brand-400',+ brandAlt: 'bg-brand bg-opacity-100 text-background border border-brand',scale: 'bg-scale-200 text-scale-1100 border border-scale-700',tomato: `bg-tomato-200 text-tomato-1100 border border-tomato-700`,red: `bg-red-200 text-red-1100 border border-red-700`,