Skip to content

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

chore(studio): marketplace styling (#46574)

Francesco Sansalvadore6470ac918646
diff --git a/apps/design-system/content/docs/ui-patterns/markdown.mdx b/apps/design-system/content/docs/ui-patterns/markdown.mdx
index 0b6e4a0d8b0..ac69e60d506 100644
--- a/apps/design-system/content/docs/ui-patterns/markdown.mdx
+++ b/apps/design-system/content/docs/ui-patterns/markdown.mdx
@@ -37,17 +37,8 @@ import {
Code,
CodeBlockPre,
DefaultPre,
- H1,
- H2,
- H3,
- H4,
- H5,
- H6,
Hr,
Img,
- InlineCode,
- ListItem,
- OrderedList,
Paragraph,
Quote,
SimplePre,
diff --git a/apps/studio/components/interfaces/Integrations/Integration/IntegrationOverviewTabV2/FilesViewer.tsx b/apps/studio/components/interfaces/Integrations/Integration/IntegrationOverviewTabV2/FilesViewer.tsx
index 7ed57d47876..7db7659ef27 100644
--- a/apps/studio/components/interfaces/Integrations/Integration/IntegrationOverviewTabV2/FilesViewer.tsx
+++ b/apps/studio/components/interfaces/Integrations/Integration/IntegrationOverviewTabV2/FilesViewer.tsx
@@ -1,43 +1,35 @@
-import { useState } from 'react'
-import { cn, Dialog, DialogContent } from 'ui'
+'use client'
-export const FilesViewer = ({ files }: { files: string[] }) => {
- const [selected, setSelected] = useState(files[0])
- const [showDialog, setShowDialog] = useState(false)
+import 'swiper/css'
+import { Swiper, SwiperSlide } from 'swiper/react'
+import { Image } from 'ui-patterns/Image'
+
+export const FilesViewer = ({ files }: { files: { src: string; alt: string }[] }) => {
return (
- <>
- <div className="flex flex-col gap-y-4">
- <button onClick={() => setShowDialog(true)}>
- <img
- alt={selected}
- src={selected}
- className="rounded-md border object-cover aspect-video"
+ <Swiper
+ className="w-full"
+ spaceBetween={12}
+ slidesPerView={1.4}
+ threshold={2}
+ watchOverflow
+ breakpoints={{
+ 640: { slidesPerView: 1.4 },
+ 1024: { slidesPerView: 3.2 },
+ }}
+ >
+ {files.map((file, i) => (
+ <SwiperSlide key={`${file.src}-${i}`}>
+ <Image
+ src={file.src}
+ alt={file.alt}
+ zoomable
+ width={400}
+ height={225}
+ className="rounded-md border object-cover w-full"
/>
- </button>
-
- {files.length > 1 && (
- <div className="grid grid-cols-10 gap-x-2">
- {files.map((x) => (
- <button key={x} onClick={() => setSelected(x)}>
- <img
- alt={x}
- src={x}
- className={cn(
- 'col-span-1 bg-surface-100 rounded-md object-cover aspect-square border transition',
- selected === x ? 'border-button-hover' : 'border-secondary'
- )}
- />
- </button>
- ))}
- </div>
- )}
- </div>
- <Dialog open={showDialog} onOpenChange={setShowDialog}>
- <DialogContent size="xxlarge">
- <img alt={selected} src={selected} className="rounded-md border" />
- </DialogContent>
- </Dialog>
- </>
+ </SwiperSlide>
+ ))}
+ </Swiper>
)
}
diff --git a/apps/studio/components/interfaces/Integrations/Integration/IntegrationOverviewTabV2/MarkdownContent.tsx b/apps/studio/components/interfaces/Integrations/Integration/IntegrationOverviewTabV2/MarkdownContent.tsx
index a4d46551f1a..e5fcb83e8e5 100644
--- a/apps/studio/components/interfaces/Integrations/Integration/IntegrationOverviewTabV2/MarkdownContent.tsx
+++ b/apps/studio/components/interfaces/Integrations/Integration/IntegrationOverviewTabV2/MarkdownContent.tsx
@@ -33,5 +33,5 @@ export const MarkdownContent = ({
const content = remoteContent || localContent
- return <Markdown>{content}</Markdown>
+ return <Markdown className="text-sm">{content}</Markdown>
}
diff --git a/apps/studio/components/interfaces/Integrations/Landing/Integrations.constants.tsx b/apps/studio/components/interfaces/Integrations/Landing/Integrations.constants.tsx
index 617ba40e1e7..c650c29d021 100644
--- a/apps/studio/components/interfaces/Integrations/Landing/Integrations.constants.tsx
+++ b/apps/studio/components/interfaces/Integrations/Landing/Integrations.constants.tsx
@@ -69,7 +69,7 @@ export type IntegrationDefinition = {
icon: (props?: { className?: string; style?: Record<string, string | number> }) => ReactNode
description: string | null
content?: string | null
- files?: string[]
+ files?: { src: string; alt: string }[]
docsUrl: string | null
siteUrl?: string | null
author: {
diff --git a/apps/studio/components/interfaces/Integrations/Landing/useAvailableIntegrations.tsx b/apps/studio/components/interfaces/Integrations/Landing/useAvailableIntegrations.tsx
index 581c4cf3e15..a65e1167846 100644
--- a/apps/studio/components/interfaces/Integrations/Landing/useAvailableIntegrations.tsx
+++ b/apps/studio/components/interfaces/Integrations/Landing/useAvailableIntegrations.tsx
@@ -97,7 +97,10 @@ export const useAvailableIntegrations = () => {
source: 'Partner' as const,
categories: categories.map((x) => x.slug),
content,
- files: images?.map((image) => fullImageUrl(image)),
+ files: images?.map((image, i) => ({
+ src: fullImageUrl(image),
+ alt: `${title} image ${i + 1}`,
+ })),
description,
docsUrl,
siteUrl,
@@ -186,7 +189,10 @@ export const useAvailableIntegrations = () => {
docsUrl,
siteUrl,
author: authorName ? { name: authorName, websiteUrl: '' } : undefined,
- files: images?.map((image) => fullImageUrl(image)),
+ files: images?.map((image, i) => ({
+ src: fullImageUrl(image),
+ alt: `${title} screenshot ${i + 1}`,
+ })),
icon: listingLogo ? renderMarketplaceLogo(listingLogo) : undefined,
}
diff --git a/apps/studio/components/interfaces/Integrations/Marketplace/Marketplace.constants.tsx b/apps/studio/components/interfaces/Integrations/Marketplace/Marketplace.constants.tsx
index 28421079dc9..f0ab5d79339 100644
--- a/apps/studio/components/interfaces/Integrations/Marketplace/Marketplace.constants.tsx
+++ b/apps/studio/components/interfaces/Integrations/Marketplace/Marketplace.constants.tsx
@@ -33,8 +33,8 @@ export type { MarketplaceSource } from '@/components/interfaces/Integrations/Lan
// Defines featured integrations and their order in the featured hero
export const FEATURED_INTEGRATION_IDS = [
- 'grafana',
'stripe_sync_engine',
+ 'grafana',
'aikido',
'aikido-security',
'doppler',
diff --git a/apps/studio/components/interfaces/Integrations/Marketplace/MarketplaceDetail.tsx b/apps/studio/components/interfaces/Integrations/Marketplace/MarketplaceDetail.tsx
index 1297da27598..0562b10799e 100644
--- a/apps/studio/components/interfaces/Integrations/Marketplace/MarketplaceDetail.tsx
+++ b/apps/studio/components/interfaces/Integrations/Marketplace/MarketplaceDetail.tsx
@@ -3,8 +3,8 @@ import { Button, cn } from 'ui'
import { GenericSkeletonLoader, ShimmeringLoader } from 'ui-patterns'
import { Admonition } from 'ui-patterns/admonition'
+import { MarketplaceDetailBreadrumbs } from './MarketplaceDetailBreadcrumbs'
import { MarketplaceDetailHero } from './MarketplaceDetailHero'
-import { MarketplaceDetailTopBar } from './MarketplaceDetailTopBar'
import { OverviewTab } from './OverviewTab'
import { IntegrationDetailTabShortcuts } from '@/components/interfaces/Integrations/Integration/IntegrationDetailTabShortcuts'
import { InstallIntegrationSheet } from '@/components/interfaces/Integrations/Integration/IntegrationOverviewTabV2/InstallIntegrationSheet/InstallIntegrationSheet'
@@ -38,9 +38,9 @@ export const MarketplaceDetail = () => {
if (isAvailableLoading || isInstalledLoading) {
return (
<>
- <MarketplaceDetailTopBar title="" />
- <div className={cn(centeredContentClass, 'border-b bg-surface-75 pt-10')}>
- <div className="mx-auto flex w-full max-w-6xl flex-col gap-3 pb-6">
+ <MarketplaceDetailBreadrumbs isLoading />
+ <div className={cn(centeredContentClass, 'max-w-none border-b bg-surface-75 pt-10')}>
+ <div className="mx-auto flex w-full flex-col gap-3 pb-6">
<ShimmeringLoader className="h-9 w-64" />
<ShimmeringLoader className="h-4 w-96" />
</div>
@@ -55,7 +55,7 @@ export const MarketplaceDetail = () => {
if (!integration) {
return (
<>
- <MarketplaceDetailTopBar title="Integration not found" />
+ <MarketplaceDetailBreadrumbs title="Integration not found" />
<div className={cn(centeredContentClass, 'py-8')}>
<Admonition type="warning" title="This integration is not currently available">
Please try again later or contact support if the problem persists.
@@ -86,7 +86,7 @@ export const MarketplaceDetail = () => {
return (
<>
<IntegrationDetailTabShortcuts tabs={tabs} />
- <MarketplaceDetailTopBar
+ <MarketplaceDetailBreadrumbs
title={integration.name}
isInstalled={isInstalled}
actions={
diff --git a/apps/studio/components/interfaces/Integrations/Marketplace/MarketplaceDetailBreadcrumbs.tsx b/apps/studio/components/interfaces/Integrations/Marketplace/MarketplaceDetailBreadcrumbs.tsx
new file mode 100644
index 00000000000..b836ac80db5
--- /dev/null
+++ b/apps/studio/components/interfaces/Integrations/Marketplace/MarketplaceDetailBreadcrumbs.tsx
@@ -0,0 +1,56 @@
+import { useParams } from 'common'
+import Link from 'next/link'
+import type { ReactNode } from 'react'
+import {
+ Badge,
+ BreadcrumbItem,
+ BreadcrumbLink,
+ BreadcrumbList,
+ BreadcrumbPage,
+ BreadcrumbSeparator,
+} from 'ui'
+import { ShimmeringLoader } from 'ui-patterns'
+import { PageBreadcrumbs, PageBreadcrumbsActions } from 'ui-patterns/PageBreadcrumbs'
+
+interface MarketplaceDetailBreadrumbsProps {
+ isLoading?: boolean
+ title?: string
+ actions?: ReactNode
+ isInstalled?: boolean
+}
+
+export const MarketplaceDetailBreadrumbs = ({
+ isLoading,
+ title,
+ isInstalled,
+ actions,
+}: MarketplaceDetailBreadrumbsProps) => {
+ const { ref } = useParams()
+
+ return (
+ <PageBreadcrumbs
+ slotClassName="sticky top-0 z-20 bg-dash-sidebar"
+ className="max-h-(--header-height)! flex justify-between items-center w-full md:px-2 xl:px-6"
+ actions={
+ <PageBreadcrumbsActions>
+ {isLoading ? <ShimmeringLoader className="w-24" /> : actions}
+ </PageBreadcrumbsActions>
+ }
+ >
+ <BreadcrumbList className="flex-1 min-w-0 flex-nowrap [&_li]:text-xs">
+ <BreadcrumbItem>
+ <BreadcrumbLink asChild>
+ <Link href={`/project/${ref}/integrations`}>Integrations</Link>
+ </BreadcrumbLink>
+ </BreadcrumbItem>
+ <BreadcrumbSeparator />
+ <BreadcrumbItem className="min-w-0">
+ <BreadcrumbPage className="block min-w-0 truncate">
+ {isLoading ? <ShimmeringLoader className="w-24" /> : title}
+ </BreadcrumbPage>
+ {isInstalled && <Badge variant="success">Installed</Badge>}
+ </BreadcrumbItem>
+ </BreadcrumbList>
+ </PageBreadcrumbs>
+ )
+}
diff --git a/apps/studio/components/interfaces/Integrations/Marketplace/MarketplaceDetailRail.tsx b/apps/studio/components/interfaces/Integrations/Marketplace/MarketplaceDetailRail.tsx
index 101c76773b9..88e04e8a517 100644
--- a/apps/studio/components/interfaces/Integrations/Marketplace/MarketplaceDetailRail.tsx
+++ b/apps/studio/components/interfaces/Integrations/Marketplace/MarketplaceDetailRail.tsx
@@ -43,13 +43,13 @@ const RailRow = ({ label, value, href, mono, icon }: RailRowProps) => {
}
interface RailGroupProps {
- title: string
+ title?: string
children: ReactNode
}
const RailGroup = ({ title, children }: RailGroupProps) => (
<div className="flex flex-col gap-3 border-b pb-4 last:border-b-0">
- <div className="font-mono text-xs uppercase text-foreground">{title}</div>
+ {title && <div className="font-mono text-xs uppercase text-foreground">{title}</div>}
<div className="flex flex-col gap-3">{children}</div>
</div>
)
@@ -75,8 +75,8 @@ export const MarketplaceDetailRail = ({ integration, isInstalled }: MarketplaceD
const siteHost = tryHostname(siteUrl)
return (
- <aside className="sticky top-6 flex flex-col gap-4 self-start text-sm">
- <RailGroup title="About">
+ <aside className="sticky top-16 flex flex-col gap-4 self-start text-sm">
+ <RailGroup>
<RailRow label="Type" value={typeLabel} />
<RailRow label="Built by" value={integration.author?.name || 'Supabase'} />
{isInstalled && <RailRow label="Status" value="Installed" />}
diff --git a/apps/studio/components/interfaces/Integrations/Marketplace/MarketplaceDetailTopBar.tsx b/apps/studio/components/interfaces/Integrations/Marketplace/MarketplaceDetailTopBar.tsx
deleted file mode 100644
index 9c81a495d72..00000000000
--- a/apps/studio/components/interfaces/Integrations/Marketplace/MarketplaceDetailTopBar.tsx
+++ /dev/null
@@ -1,46 +0,0 @@
-import { useParams } from 'common'
-import Link from 'next/link'
-import type { ReactNode } from 'react'
-import {
- Badge,
- BreadcrumbItem,
- BreadcrumbLink,
- BreadcrumbList,
- BreadcrumbPage,
- BreadcrumbSeparator,
-} from 'ui'
-
-interface MarketplaceDetailTopBarProps {
- title: string
- actions?: ReactNode
- isInstalled?: boolean
-}
-
-export const MarketplaceDetailTopBar = ({
- title,
- isInstalled,
- actions,
-}: MarketplaceDetailTopBarProps) => {
- const { ref } = useParams()
-
- return (
- <div className="sticky min-h-(--header-height) top-0 z-20 flex justify-between items-center border-b bg-dash-sidebar px-6 py-2.5 xl:px-10">
- <div className="flex min-w-0 flex-1 items-center gap-4 [&_li]:text-xs">
- <BreadcrumbList className="min-w-0 flex-nowrap">
- <BreadcrumbItem>
- <BreadcrumbLink asChild>
- <Link href={`/project/${ref}/integrations`}>Integrations</Link>
- </BreadcrumbLink>
- </BreadcrumbItem>
- <BreadcrumbSeparator />
- <BreadcrumbItem className="min-w-0">
- <BreadcrumbPage className="block min-w-0 truncate">{title}</BreadcrumbPage>
- {isInstalled && <Badge variant="success">Installed</Badge>}
- </BreadcrumbItem>
- </BreadcrumbList>
- </div>
-
- <div className="flex shrink-0 items-center gap-2">{actions}</div>
- </div>
- )
-}
diff --git a/apps/studio/components/interfaces/Integrations/Marketplace/MarketplaceFilterBar.tsx b/apps/studio/components/interfaces/Integrations/Marketplace/MarketplaceFilterBar.tsx
index 28742635421..23bf98fc4a8 100644
--- a/apps/studio/components/interfaces/Integrations/Marketplace/MarketplaceFilterBar.tsx
+++ b/apps/studio/components/interfaces/Integrations/Marketplace/MarketplaceFilterBar.tsx
@@ -79,7 +79,7 @@ export const MarketplaceFilterBar = ({
return (
<div
className={cn(
- 'sticky top-0 z-5 -mx-6 flex flex-wrap items-center gap-2 px-6 py-3 xl:-mx-10 xl:px-10',
+ 'sticky top-0 z-20 -mx-6 flex flex-wrap items-center gap-2 px-6 py-3 xl:-mx-10 xl:px-10',
'bg-dash-sidebar/95 backdrop-blur',
showClear ? 'border-b border-muted' : 'border-b border-transparent'
)}
diff --git a/apps/studio/components/interfaces/Integrations/Marketplace/OverviewTab.tsx b/apps/studio/components/interfaces/Integrations/Marketplace/OverviewTab.tsx
index ccd26681f7d..1a7f72c2c89 100644
--- a/apps/studio/components/interfaces/Integrations/Marketplace/OverviewTab.tsx
+++ b/apps/studio/components/interfaces/Integrations/Marketplace/OverviewTab.tsx
@@ -1,11 +1,17 @@
+import dynamic from 'next/dynamic'
import type { PropsWithChildren } from 'react'
import { MarketplaceDetailRail } from './MarketplaceDetailRail'
import { ConstrainedIntegrationTabScaffold } from '@/components/interfaces/Integrations/ConstrainedIntegrationTabScaffold'
-import { FilesViewer } from '@/components/interfaces/Integrations/Integration/IntegrationOverviewTabV2/FilesViewer'
import { MarkdownContent } from '@/components/interfaces/Integrations/Integration/IntegrationOverviewTabV2/MarkdownContent'
import type { IntegrationDefinition } from '@/components/interfaces/Integrations/Landing/Integrations.constants'
+const FilesViewer = dynamic(() =>
+ import('@/components/interfaces/Integrations/Integration/IntegrationOverviewTabV2/FilesViewer').then(
+ (mod) => mod.FilesViewer
+ )
+)
+
interface OverviewTabProps extends PropsWithChildren {
integration: IntegrationDefinition
isInstalled: boolean
diff --git a/apps/studio/package.json b/apps/studio/package.json
index 080a7853ba1..a9632ed86f0 100644
--- a/apps/studio/package.json
+++ b/apps/studio/package.json
@@ -135,6 +135,7 @@
"sqlstring": "^2.3.2",
"streamdown": "^1.3.0",
"stripe-experiment-sync": "1.0.31",
+ "swiper": "^12.1.2",
"tus-js-client": "^4.1.0",
"ui": "workspace:*",
"ui-patterns": "workspace:*",
diff --git a/apps/studio/pages/project/[ref]/integrations/index.tsx b/apps/studio/pages/project/[ref]/integrations/index.tsx
index 61ad4429f69..970de70a53d 100644
--- a/apps/studio/pages/project/[ref]/integrations/index.tsx
+++ b/apps/studio/pages/project/[ref]/integrations/index.tsx
@@ -54,7 +54,7 @@ function getIntegrationImage(integration: IntegrationDefinition) {
if (integration.files?.length) {
const heroImage = integration?.files?.[0]
- return heroImage
+ return heroImage?.src ?? undefined
}
}
diff --git a/apps/studio/styles/globals.css b/apps/studio/styles/globals.css
index 0e44329ecd6..f312b19cfa8 100644
--- a/apps/studio/styles/globals.css
+++ b/apps/studio/styles/globals.css
@@ -412,3 +412,32 @@ div[data-radix-portal]:not(.portal--toast) {
border-color: transparent;
}
}
+
+/* Zoomable image (react-medium-image-zoom) */
+
+[data-rmiz-modal]:focus,
+[data-rmiz-modal-overlay]:focus {
+ outline: none !important;
+}
+
+[data-rmiz-modal-overlay],
+[data-rmiz-modal-img] {
+ transition-timing-function: cubic-bezier(0.24, 0.25, 0.05, 1) !important;
+}
+
+[data-rmiz-modal-overlay='visible'] {
+ @apply bg-background!;
+ opacity: 0.8;
+}
+
+[data-rmiz-modal-img] {
+ image-rendering: high-quality;
+}
+
+.prose.text-sm ol > li::before {
+ top: 0.05rem;
+}
+
+.prose.text-sm ul > li::before {
+ top: 0.65rem;
+}
diff --git a/apps/studio/types/config.d.ts b/apps/studio/types/config.d.ts
index c8ce1d21d56..ac2b7e9d549 100644
--- a/apps/studio/types/config.d.ts
+++ b/apps/studio/types/config.d.ts
@@ -1,3 +1,5 @@
+declare module 'swiper/css'
+
declare module 'config/tailwind.config' {
import type { Config } from 'tailwindcss'
const wrapper: (tailwindConfig: Partial<Config>) => Config
diff --git a/apps/www/components/BuiltWithSupabase/ExamplesMobile.tsx b/apps/www/components/BuiltWithSupabase/ExamplesMobile.tsx
index 39219d6dd1c..2e327f1129c 100644
--- a/apps/www/components/BuiltWithSupabase/ExamplesMobile.tsx
+++ b/apps/www/components/BuiltWithSupabase/ExamplesMobile.tsx
@@ -1,12 +1,12 @@
import 'swiper/css'
-import React, { FC } from 'react'
+import content from '~/data/home/content'
+import type { Example } from 'data/Examples'
import { useRouter } from 'next/router'
+import React, { FC } from 'react'
import { Swiper, SwiperSlide } from 'swiper/react'
-import ExampleCard from '../ExampleCard'
-import content from '~/data/home/content'
-import type { Example } from 'data/Examples'
+import ExampleCard from '../ExampleCard'
interface Props {
examples: Example[]
diff --git a/apps/www/public/.well-known/agent-skills/index.json b/apps/www/public/.well-known/agent-skills/index.json
new file mode 100644
index 00000000000..718d9e4d63c
--- /dev/null
+++ b/apps/www/public/.well-known/agent-skills/index.json
@@ -0,0 +1,19 @@
+{
+ "$schema": "https://schemas.agentskills.io/discovery/0.2.0/schema.json",
+ "skills": [
+ {
+ "name": "supabase",
+ "type": "archive",
+ "description": "Use when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); client libraries and SSR integrations (supabase-js, @supabase/ssr) in Next.js, React, SvelteKit, Astro, Remix; auth issues (login, logout, sessions, JWT, cookies, getSession, getUser, getClaims, RLS); Supabase CLI or MCP server; schema changes, migrations, security audits, Postgres extensions (pg_graphql, pg_cron, pg_vector).",
+ "url": "https://github.com/supabase/agent-skills/releases/download/v0.1.5/supabase.tar.gz",
+ "digest": "sha256:5acb0974e54db43ac66fcb55170dee2059b423d5253a9c1f14a51df44358f07a"
+ },
+ {
+ "name": "supabase-postgres-best-practices",
+ "type": "archive",
+ "description": "Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.",
+ "url": "https://github.com/supabase/agent-skills/releases/download/v0.1.5/supabase-postgres-best-practices.tar.gz",
+ "digest": "sha256:2db40cf84865e73c908ff080d101ab1ca60829cd379f4e6c15d7287d33ce61e5"
+ }
+ ]
+}
diff --git a/packages/ui-patterns/src/Markdown/components.tsx b/packages/ui-patterns/src/Markdown/components.tsx
index 659ee6d61cf..1a778969489 100644
--- a/packages/ui-patterns/src/Markdown/components.tsx
+++ b/packages/ui-patterns/src/Markdown/components.tsx
@@ -9,83 +9,10 @@ const DynamicCodeBlock = dynamic(() =>
import('../CodeBlock').then((m) => ({ default: m.CodeBlock }))
)
-export const H1 = ({ className, ...props }: HTMLAttributes<HTMLHeadingElement>) => (
- <h1 className={cn('font-heading mt-2 scroll-m-20 text-4xl font-bold', className)} {...props} />
-)
-
-export const H2 = ({ className, ...props }: HTMLAttributes<HTMLHeadingElement>) => (
- <h2
- className={cn(
- 'font-heading mt-12 scroll-m-20 border-b pb-2 text-2xl font-semibold tracking-tight first:mt-0',
- className
- )}
- {...props}
- />
-)
-
-export const H3 = ({ className, ...props }: HTMLAttributes<HTMLHeadingElement>) => (
- <h3
- className={cn('font-heading mt-8 scroll-m-20 text-xl font-semibold tracking-tight', className)}
- {...props}
- />
-)
-
-export const H4 = ({ className, ...props }: HTMLAttributes<HTMLHeadingElement>) => (
- <h4
- className={cn('font-heading mt-8 scroll-m-20 text-lg font-semibold tracking-tight', className)}
- {...props}
- />
-)
-
-export const H5 = ({ className, ...props }: HTMLAttributes<HTMLHeadingElement>) => (
- <h5
- className={cn('mt-8 scroll-m-20 text-lg font-semibold tracking-tight', className)}
- {...props}
- />
-)
-
-export const H6 = ({ className, ...props }: HTMLAttributes<HTMLHeadingElement>) => (
- <h6
- className={cn('mt-8 scroll-m-20 text-base font-semibold tracking-tight', className)}
- {...props}
- />
-)
-
-export const Paragraph = ({ className, ...props }: HTMLAttributes<HTMLParagraphElement>) => (
- <p className={cn('leading-7 [&:not(:first-child)]:mt-6 text-foreground', className)} {...props} />
-)
-
export const InlineCode = ({ className, ...props }: HTMLAttributes<HTMLElement>) => (
<code className={cn('text-code-inline', className)} {...props} />
)
-export const Anchor = ({
- href,
- className,
- ...props
-}: HTMLAttributes<HTMLAnchorElement> & { href?: string }) => (
- <a
- href={href ?? '#'}
- className={cn(
- 'underline decoration-1 decoration-foreground-muted underline-offset-4 transition-colors hover:decoration-foreground hover:decoration-2',
- className
- )}
- {...props}
- />
-)
-
-export const UnorderedList = ({ className, ...props }: HTMLAttributes<HTMLUListElement>) => (
- <ul className={cn('my-6 ml-6 list-disc text-foreground', className)} {...props} />
-)
-
-export const OrderedList = ({ className, ...props }: HTMLAttributes<HTMLOListElement>) => (
- <ol className={cn('my-6 ml-6 list-decimal text-foreground', className)} {...props} />
-)
-
-export const ListItem = ({ className, ...props }: HTMLAttributes<HTMLLIElement>) => (
- <li className={cn('mt-2', className)} {...props} />
-)
-
export const Blockquote = ({ className, ...props }: HTMLAttributes<HTMLElement>) => (
<blockquote
className={cn('mt-4 border-l-2 pl-6 italic text-foreground-light', className)}
@@ -93,10 +20,6 @@ export const Blockquote = ({ className, ...props }: HTMLAttributes<HTMLElement>)
/>
)
-export const Hr = ({ ...props }: HTMLAttributes<HTMLHRElement>) => (
- <hr className="my-4 md:my-8" {...props} />
-)
-
export const Img = ({
className,
alt = '',
@@ -106,36 +29,6 @@ export const Img = ({
<img className={cn('rounded-md border', className)} alt={alt} {...props} />
)
-export const Table = ({ className, ...props }: HTMLAttributes<HTMLTableElement>) => (
- <div className="my-6 w-full overflow-y-auto">
- <table className={cn('w-full', className)} {...props} />
- </div>
-)
-
-export const Tr = ({ className, ...props }: HTMLAttributes<HTMLTableRowElement>) => (
- <tr className={cn('m-0 border-t p-0 even:bg-surface-75/75', className)} {...props} />
-)
-
-export const Th = ({ className, ...props }: HTMLAttributes<HTMLTableCellElement>) => (
- <th
- className={cn(
- 'border px-4 py-2 text-left font-normal [[align=center]]:text-center [[align=right]]:text-right',
- className
- )}
- {...props}
- />
-)
-
-export const Td = ({ className, ...props }: HTMLAttributes<HTMLTableCellElement>) => (
- <td
- className={cn(
- 'border text-foreground-light px-4 py-2 text-left [[align=center]]:text-center [[align=right]]:text-right',
- className
- )}
- {...props}
- />
-)
-
export const SimplePre = ({ className, ...props }: HTMLAttributes<HTMLPreElement>) => (
<pre
className={cn(
diff --git a/packages/ui-patterns/src/Markdown/index.tsx b/packages/ui-patterns/src/Markdown/index.tsx
index eb527583ffa..7074a36646f 100644
--- a/packages/ui-patterns/src/Markdown/index.tsx
+++ b/packages/ui-patterns/src/Markdown/index.tsx
@@ -7,31 +7,15 @@ import { cn } from 'ui'
import { Heading } from 'ui/src/components/CustomHTMLElements'
import {
- Anchor,
Avatar,
Blockquote,
Code,
CodeBlockPre,
DefaultPre,
- H1,
- H2,
- H3,
- H4,
- H5,
- H6,
- Hr,
Img,
InlineCode,
- ListItem,
- OrderedList,
- Paragraph,
Quote,
SimplePre,
- Table,
- Td,
- Th,
- Tr,
- UnorderedList,
} from './components'
const defaultComponents: Components = {
@@ -41,20 +25,10 @@ const defaultComponents: Components = {
h4: (props) => <Heading tag="h4" {...props} />,
h5: (props) => <Heading tag="h5" {...props} />,
h6: (props) => <Heading tag="h6" {...props} />,
- p: Paragraph,
- a: Anchor,
code: Code,
img: Img,
- ul: UnorderedList,
- ol: OrderedList,
- li: ListItem,
blockquote: Blockquote,
- hr: Hr,
pre: DefaultPre,
- table: Table,
- tr: Tr,
- th: Th,
- td: Td,
}
interface MarkdownProps extends Omit<Options, 'children' | 'node' | 'components'> {
@@ -83,7 +57,7 @@ export function Markdown({
}
return (
- <div className={cn('text-sm', className)}>
+ <div className={cn('prose max-w-none', className)}>
<ReactMarkdown
remarkPlugins={[remarkGfm, ...(remarkPlugins ?? [])]}
components={mergedComponents}
@@ -101,30 +75,4 @@ export const markdownComponents = {
img: Img,
}
-export {
- Anchor,
- Avatar,
- Blockquote,
- Code,
- CodeBlockPre,
- DefaultPre,
- H1,
- H2,
- H3,
- H4,
- H5,
- H6,
- Hr,
- Img,
- InlineCode,
- ListItem,
- OrderedList,
- Paragraph,
- Quote,
- SimplePre,
- Table,
- Td,
- Th,
- Tr,
- UnorderedList,
-}
+export { Avatar, Blockquote, Code, CodeBlockPre, DefaultPre, Img, InlineCode, Quote, SimplePre }
diff --git a/packages/ui-patterns/src/PageBreadcrumbs/index.tsx b/packages/ui-patterns/src/PageBreadcrumbs/index.tsx
index 66e79291658..9c2637e57a2 100644
--- a/packages/ui-patterns/src/PageBreadcrumbs/index.tsx
+++ b/packages/ui-patterns/src/PageBreadcrumbs/index.tsx
@@ -36,6 +36,7 @@ PageBreadcrumbsActions.displayName = 'PageBreadcrumbsActions'
export type PageBreadcrumbsProps = React.ComponentProps<typeof Breadcrumb> & {
actions?: React.ReactNode
containerClassName?: string
+ slotClassName?: string
}
/**
@@ -47,10 +48,11 @@ const PageBreadcrumbs = ({
className,
children,
containerClassName,
+ slotClassName,
...props
}: PageBreadcrumbsProps) => {
return (
- <div data-slot="page-breadcrumbs">
+ <div data-slot="page-breadcrumbs" className={cn(slotClassName)}>
<PageContainer
size="full"
className={cn(
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 3205b004f75..70cd6bae73a 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -1163,6 +1163,9 @@ importers:
stripe-experiment-sync:
specifier: 1.0.31
version: 1.0.31(@types/[email protected])([email protected])
+ swiper:
+ specifier: ^12.1.2
+ version: 12.1.2
tus-js-client:
specifier: ^4.1.0
version: 4.1.0
@@ -1325,7 +1328,7 @@ importers:
version: 2.11.3(@types/[email protected])([email protected])
next-router-mock:
specifier: ^0.9.13
node-mocks-http:
specifier: ^1.17.2
version: 1.17.2(@types/[email protected])
@@ -2206,7 +2209,7 @@ importers:
version: link:../config
next-router-mock:
specifier: ^0.9.13
tailwindcss:
specifier: 'catalog:'
version: 4.2.4
@@ -2694,7 +2697,7 @@ importers:
version: link:../config
next-router-mock:
specifier: ^0.9.13
tailwindcss:
specifier: ^4.2.4
version: 4.2.4
@@ -13075,6 +13078,7 @@ packages:
resolution: {integrity: sha512-LN0BLGKMFulv0lnfK29r14DcngRUhIqdcaL0zXTt2o0oS9odlrjCGaU3/X9hIihOjjN8l8e+Y9G/famcNYaI7Q==}
+ deprecated: Package deprecated. Please use @lucide/vue instead.
peerDependencies:
vue: '>=3.0.1'
@@ -31417,7 +31421,7 @@ snapshots:
dependencies:
js-yaml-loader: 1.2.2
dependencies:
react: 19.2.6