The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore(studio + design-system): more flexible Admonition (#45302)
Danny White5bfbae22a96b
diff --git a/apps/design-system/__registry__/index.tsx b/apps/design-system/__registry__/index.tsxindex 5b69704eecc..b442e4c0ecc 100644--- a/apps/design-system/__registry__/index.tsx+++ b/apps/design-system/__registry__/index.tsx@@ -126,6 +126,17 @@ export const Index: Record<string, any> = {subcategory: "undefined",chunks: []},+ "admonition-description-only": {+ name: "admonition-description-only",+ type: "components:example",+ registryDependencies: ["admonition"],+ component: React.lazy(() => import("@/registry/default/example/admonition-description-only")),+ source: "",+ files: ["registry/default/example/admonition-description-only.tsx"],+ category: "undefined",+ subcategory: "undefined",+ chunks: []+ },"admonition-warning": {name: "admonition-warning",type: "components:example",@@ -137,6 +148,17 @@ export const Index: Record<string, any> = {subcategory: "undefined",chunks: []},+ "admonition-success": {+ name: "admonition-success",+ type: "components:example",+ registryDependencies: ["admonition"],+ component: React.lazy(() => import("@/registry/default/example/admonition-success")),+ source: "",+ files: ["registry/default/example/admonition-success.tsx"],+ category: "undefined",+ subcategory: "undefined",+ chunks: []+ },"admonition-destructive": {name: "admonition-destructive",type: "components:example",diff --git a/apps/design-system/content/docs/fragments/admonition.mdx b/apps/design-system/content/docs/fragments/admonition.mdxindex d9c0e89a4a9..95994fc87ba 100644--- a/apps/design-system/content/docs/fragments/admonition.mdx+++ b/apps/design-system/content/docs/fragments/admonition.mdx@@ -15,6 +15,12 @@ Admonition provides focus for situations that require a callout.Use Admonition instead of [Alert](../components/alert) unless you specifically need the primitives. If in doubt, stick with Admonition.+Use `title` for the heading slot and `description` for short body copy. The `description` should always end in a period.++Use `children` instead of `description` when the body needs rich React or MDX content such as links, lists, or multiple paragraphs, and this cannot be achieved via a React Fragment as a `description` value.++Avoid `label` in new code. It is a legacy alias for `title` that still exists for older docs content.+## Usage```tsx@@ -47,7 +53,7 @@ Only ever use the `primary` (green) button `type` on a `default` Admonition. EveclassName="[&_.preview>[data-orientation=vertical]]:sm:max-w-[70%]"/>-## Responsive+### ResponsiveResize your browser to see the button(s) change `layout` based on the Admonition’s width.@@ -79,6 +85,24 @@ AlertError for example rolls up consistent error handling and support contact meclassName="[&_.preview>[data-orientation=vertical]]:sm:max-w-[70%]"/>+### Description only++You may omit the title when the Admonition is short and sits near a heading that already provides enough context. Do not do the inverse: a title-only Admonition usually reads like an incomplete sentence and should include supporting description copy.++<ComponentPreview+ name="admonition-description-only"+ className="[&_.preview>[data-orientation=vertical]]:sm:max-w-[70%]"+/>++### Success++Use `success` strictly for positive, completed states where the user does not need to take corrective action.++<ComponentPreview+ name="admonition-success"+ className="[&_.preview>[data-orientation=vertical]]:sm:max-w-[70%]"+/>+### SandwichedSome [Card](../components/card) or [Dialog](../components/dialog) instances may need to include callout information in-between core content. Admonition can be used ‘full-bleed’ in these cases by removing borders and radii.diff --git a/apps/design-system/registry/default/example/admonition-description-only.tsx b/apps/design-system/registry/default/example/admonition-description-only.tsxnew file mode 100644index 00000000000..319432ad8f9--- /dev/null+++ b/apps/design-system/registry/default/example/admonition-description-only.tsx@@ -0,0 +1,10 @@+import { Admonition } from 'ui-patterns/admonition'++export default function AdmonitionDescriptionOnly() {+ return (+ <Admonition+ type="default"+ description="Changes to these settings can take a few minutes to appear across all projects."+ />+ )+}diff --git a/apps/design-system/registry/default/example/admonition-success.tsx b/apps/design-system/registry/default/example/admonition-success.tsxnew file mode 100644index 00000000000..7196bf474c8--- /dev/null+++ b/apps/design-system/registry/default/example/admonition-success.tsx@@ -0,0 +1,11 @@+import { Admonition } from 'ui-patterns/admonition'++export default function AdmonitionSuccess() {+ return (+ <Admonition+ type="success"+ title="Success"+ description="Your connection has been confirmed. You can now close this tab."+ />+ )+}diff --git a/apps/design-system/registry/examples.ts b/apps/design-system/registry/examples.tsindex 9f04225b28b..d5f9a19ae22 100644--- a/apps/design-system/registry/examples.ts+++ b/apps/design-system/registry/examples.ts@@ -25,12 +25,24 @@ export const examples: Registry = [registryDependencies: ['admonition'],files: ['example/admonition-button.tsx'],},+ {+ name: 'admonition-description-only',+ type: 'components:example',+ registryDependencies: ['admonition'],+ files: ['example/admonition-description-only.tsx'],+ },{name: 'admonition-warning',type: 'components:example',registryDependencies: ['admonition'],files: ['example/admonition-warning.tsx'],},+ {+ name: 'admonition-success',+ type: 'components:example',+ registryDependencies: ['admonition'],+ files: ['example/admonition-success.tsx'],+ },{name: 'admonition-destructive',type: 'components:example',diff --git a/apps/design-system/styles/globals.css b/apps/design-system/styles/globals.cssindex 0160d13280c..bea8d6b3338 100644--- a/apps/design-system/styles/globals.css+++ b/apps/design-system/styles/globals.css@@ -5,7 +5,7 @@@import './../../../packages/ui/build/css/themes/classic-dark.css';@import './../../../packages/ui/build/css/themes/light.css';-@config '../tailwind.config.js';+@config '../tailwind.config.cjs';@import 'config/typography.css';diff --git a/apps/design-system/tailwind.config.js b/apps/design-system/tailwind.config.cjssimilarity index 100%rename from apps/design-system/tailwind.config.jsrename to apps/design-system/tailwind.config.cjsdiff --git a/apps/studio/components/interfaces/Auth/Users/UserOverview.tsx b/apps/studio/components/interfaces/Auth/Users/UserOverview.tsxindex 1e847c0e004..06811897b55 100644--- a/apps/studio/components/interfaces/Auth/Users/UserOverview.tsx+++ b/apps/studio/components/interfaces/Auth/Users/UserOverview.tsx@@ -181,7 +181,7 @@ export const UserOverview = ({ user, onDeleteSuccess }: UserOverviewProps) => {{isBanned ? (<Admonitiontype="warning"- label={`User banned until ${dayjs(user.banned_until).format(DATE_FORMAT)}`}+ description={`User banned until ${dayjs(user.banned_until).format(DATE_FORMAT)}`}className="border-r-0 border-l-0 rounded-none -mt-px [&_svg]:ml-0.5"/>) : (diff --git a/apps/studio/components/interfaces/Database/Publications/PublicationsTables.tsx b/apps/studio/components/interfaces/Database/Publications/PublicationsTables.tsxindex 8c55200cdc6..127770b9032 100644--- a/apps/studio/components/interfaces/Database/Publications/PublicationsTables.tsx+++ b/apps/studio/components/interfaces/Database/Publications/PublicationsTables.tsx@@ -74,16 +74,17 @@ export const PublicationsTables = () => {/></div></div>- {!isLoadingPermissions && !canUpdatePublications && (- <Admonition- type="note"- className="w-[500px]"- title="You need additional permissions to update database replications"- />- )}</div></div>+ {!isLoadingPermissions && !canUpdatePublications && (+ <Admonition+ type="warning"+ className="mb-4 w-full"+ description="You need additional permissions to update database replications."+ />+ )}+{(isLoading || isLoadingPermissions) && (<div className="mt-8"><LogoLoader />diff --git a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationPanelFields.tsx b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationPanelFields.tsxindex a08a6c472c8..67f0f80e6c3 100644--- a/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationPanelFields.tsx+++ b/apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DestinationPanelFields.tsx@@ -653,21 +653,26 @@ export const AnalyticsBucketFields = ({</p>{isSuccessKeys && keyNoLongerExists && (- <Admonition type="warning" title="Unable to find access key ID in project">- <p className="leading-normal!">- Please select another key or create a new set, as this destination will not- work otherwise. S3 access keys can be managed in your{' '}- <InlineLink href={`/project/${projectRef}/storage/files/settings`}>- storage settings- </InlineLink>- </p>- </Admonition>+ <Admonition+ type="warning"+ title="Unable to find access key ID in project"+ description={+ <>+ Please select another key or create a new set, as this destination will+ not work otherwise. S3 access keys can be managed in your{' '}+ <InlineLink href={`/project/${projectRef}/storage/files/settings`}>+ storage settings+ </InlineLink>+ .+ </>+ }+ />)}{s3AccessKeyId === CREATE_NEW_KEY && (<Admonitiontype="default"- title="A new set of S3 access keys will be created"+ description="A new set of S3 access keys will be created."/>)}</div>@@ -733,7 +738,7 @@ export const AnalyticsBucketFields = ({layout="horizontal"label="S3 Secret Access Key"className="relative"- description="The secret key corresponding to your selected access key ID"+ description="The secret key corresponding to your selected access key ID."><FormControl><Input_Shadcn_diff --git a/apps/studio/components/interfaces/Database/RestoreToNewProject/RestoreToNewProject.tsx b/apps/studio/components/interfaces/Database/RestoreToNewProject/RestoreToNewProject.tsxindex edd84436fc6..9df2ee284e2 100644--- a/apps/studio/components/interfaces/Database/RestoreToNewProject/RestoreToNewProject.tsx+++ b/apps/studio/components/interfaces/Database/RestoreToNewProject/RestoreToNewProject.tsx@@ -136,7 +136,7 @@ export const RestoreToNewProject = () => {return (<Admonitiontype="default"- title="Restoring to new projects is temporarily not available for AWS (Revamped) projects"+ description="Restoring to new projects is temporarily not available for AWS (Revamped) projects."/>)}diff --git a/apps/studio/components/interfaces/Integrations/Queues/SingleQueue/QueueSettings.tsx b/apps/studio/components/interfaces/Integrations/Queues/SingleQueue/QueueSettings.tsxindex af634743e83..e945f6b3e5e 100644--- a/apps/studio/components/interfaces/Integrations/Queues/SingleQueue/QueueSettings.tsx+++ b/apps/studio/components/interfaces/Integrations/Queues/SingleQueue/QueueSettings.tsx@@ -278,7 +278,7 @@ export const QueueSettings = ({}: QueueSettingsProps) => {<Admonitiontype="default"className="rounded-none border-x-0 border-t-0"- title="Only relevant roles for managing queues via client libraries or PostgREST are shown here"+ description="Only relevant roles for managing queues via client libraries or PostgREST are shown here."/>)}<Table>diff --git a/apps/studio/components/interfaces/Integrations/templates/StripeSyncEngine/StripeSyncSettingsPage.tsx b/apps/studio/components/interfaces/Integrations/templates/StripeSyncEngine/StripeSyncSettingsPage.tsxindex af152e75464..f21fc6f5201 100644--- a/apps/studio/components/interfaces/Integrations/templates/StripeSyncEngine/StripeSyncSettingsPage.tsx+++ b/apps/studio/components/interfaces/Integrations/templates/StripeSyncEngine/StripeSyncSettingsPage.tsx@@ -32,7 +32,7 @@ export const StripeSyncSettingsPage = () => {return (<PageContainer className="mx-0"><PageSection>- <Admonition type="default" title="Stripe Sync Engine is not installed" />+ <Admonition type="default" description="Stripe Sync Engine is not installed." /></PageSection></PageContainer>)diff --git a/apps/studio/components/interfaces/OrganizationInvite/OrganizationInvite.tsx b/apps/studio/components/interfaces/OrganizationInvite/OrganizationInvite.tsxindex dd4101c5e45..1f0d55f0ac3 100644--- a/apps/studio/components/interfaces/OrganizationInvite/OrganizationInvite.tsx+++ b/apps/studio/components/interfaces/OrganizationInvite/OrganizationInvite.tsx@@ -73,7 +73,7 @@ export const OrganizationInvite = () => {<AdmonitionshowIcon={false}type="default"- title={`Sign in${isSignUpEnabled ? ' or create an account' : ''} first to view this invitation`}+ description={`Sign in${isSignUpEnabled ? ' or create an account' : ''} first to view this invitation.`}className="border-0 rounded-none text-left"/><div className="p-4 border-muted border-t flex gap-x-3 justify-center">diff --git a/apps/studio/components/interfaces/Settings/API/PostgrestConfig.tsx b/apps/studio/components/interfaces/Settings/API/PostgrestConfig.tsxindex 9042d860f12..38828405e19 100644--- a/apps/studio/components/interfaces/Settings/API/PostgrestConfig.tsx+++ b/apps/studio/components/interfaces/Settings/API/PostgrestConfig.tsx@@ -272,7 +272,7 @@ export const PostgrestConfig = () => {</CardContent>) : isError ? (<CardContent>- <Admonition type="destructive" title="Failed to retrieve API settings" />+ <Admonition type="destructive" description="Failed to retrieve API settings." /></CardContent>) : (<>diff --git a/apps/studio/components/interfaces/Settings/Addons/IPv4SidePanel.tsx b/apps/studio/components/interfaces/Settings/Addons/IPv4SidePanel.tsxindex 47dcbecab1e..0bf56a72a55 100644--- a/apps/studio/components/interfaces/Settings/Addons/IPv4SidePanel.tsx+++ b/apps/studio/components/interfaces/Settings/Addons/IPv4SidePanel.tsx@@ -161,7 +161,7 @@ const IPv4SidePanel = () => {{!isAws && (<Admonitiontype="default"- title="Dedicated IPv4 address is only available for AWS projects"+ description="Dedicated IPv4 address is only available for AWS projects."/>)}diff --git a/apps/studio/components/interfaces/Settings/Database/JitDatabaseAccess/JitDbAccessRuleSheet.tsx b/apps/studio/components/interfaces/Settings/Database/JitDatabaseAccess/JitDbAccessRuleSheet.tsxindex 80b0dd8236f..a6703fbd200 100644--- a/apps/studio/components/interfaces/Settings/Database/JitDatabaseAccess/JitDbAccessRuleSheet.tsx+++ b/apps/studio/components/interfaces/Settings/Database/JitDatabaseAccess/JitDbAccessRuleSheet.tsx@@ -305,7 +305,7 @@ export function JitDbAccessRuleSheet({{grants.length === 0 ? (<Admonitiontype="note"- title="No assignable roles found"+ description="No assignable roles found."className="bg-background"/>) : (diff --git a/apps/studio/components/interfaces/Settings/General/DashboardPreferences.tsx b/apps/studio/components/interfaces/Settings/General/DashboardPreferences.tsxindex cce9e5b592e..7eb72fa9de3 100644--- a/apps/studio/components/interfaces/Settings/General/DashboardPreferences.tsx+++ b/apps/studio/components/interfaces/Settings/General/DashboardPreferences.tsx@@ -96,7 +96,7 @@ export const DashboardPreferences = () => {{/* [Joshen] Ideally we're able to persist this for all users in the project, but will need support in our middleware */}<Admonitiontype="note"- title="These preferences control only your experience in the dashboard. Other members of this project will not be affected"+ description="These preferences control only your experience in the dashboard. Other members of this project will not be affected."/>{isLoading ? (diff --git a/apps/studio/components/interfaces/Support/ProjectAndPlanInfo.tsx b/apps/studio/components/interfaces/Support/ProjectAndPlanInfo.tsxindex cd1799e1bd6..08453d0628d 100644--- a/apps/studio/components/interfaces/Support/ProjectAndPlanInfo.tsx+++ b/apps/studio/components/interfaces/Support/ProjectAndPlanInfo.tsx@@ -42,7 +42,9 @@ export function ProjectAndPlanInfo({<ProjectSelector form={form} orgSlug={orgSlug} projectRef={projectRef} /><ProjectRefHighlighted projectRef={projectRef} />- {!hasProjectSelected && <Admonition type="default" title="No project has been selected" />}+ {!hasProjectSelected && (+ <Admonition type="default" description="No project has been selected." />+ )}{showPlanExpectationInfo &&orgSlug &&diff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ApiAccessToggle.tsx b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ApiAccessToggle.tsxindex 12153250543..29fcb1824a1 100644--- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ApiAccessToggle.tsx+++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ApiAccessToggle.tsx@@ -403,7 +403,10 @@ const SchemaExposureOptions = ({return (<>{isError && (- <Admonition type="warning" title="An error occurred while fetching Data API settings." />+ <Admonition+ type="warning"+ description="An error occurred while fetching Data API settings."+ />)}{isSchemaExposed && apiUrl && (diff --git a/apps/studio/pages/cli/login.tsx b/apps/studio/pages/cli/login.tsxindex 912c1c5a941..d14daf924a8 100644--- a/apps/studio/pages/cli/login.tsx+++ b/apps/studio/pages/cli/login.tsx@@ -73,7 +73,7 @@ const CliLoginPage: NextPageWithLayout = () => {</p><Admonitiontype="tip"- title="Browser login flow requires Supabase CLI version 1.219.0 and above."+ description="Browser login flow requires Supabase CLI version 1.219.0 and above."className="mt-16"/></>diff --git a/packages/ui-patterns/src/admonition.tsx b/packages/ui-patterns/src/admonition.tsxindex 6700794f61b..9971f35d921 100644--- a/packages/ui-patterns/src/admonition.tsx+++ b/packages/ui-patterns/src/admonition.tsx@@ -2,19 +2,43 @@ import { cva } from 'class-variance-authority'import { ComponentProps, forwardRef, ReactNode } from 'react'import { Alert_Shadcn_, AlertDescription_Shadcn_, AlertTitle_Shadcn_, cn } from 'ui'-export interface AdmonitionProps {- type:- | 'note'- | 'tip'- | 'caution'- | 'danger'- | 'deprecation'- | 'default'- | 'destructive'- | 'warning'- label?: string- title?: string- description?: string | ReactNode+type AdmonitionType =+ | 'note'+ | 'tip'+ | 'caution'+ | 'danger'+ | 'deprecation'+ | 'default'+ | 'destructive'+ | 'success'+ | 'warning'++type AdmonitionBodyContent =+ | {+ description: string | ReactNode+ children?: ReactNode+ }+ | {+ description?: string | ReactNode+ children: ReactNode+ }++type AdmonitionContentProps =+ | ({+ title?: string+ /** @deprecated Use title instead. */+ label?: string+ } & AdmonitionBodyContent)+ | {+ title?: never+ /** @deprecated Use title instead. */+ label?: never+ description?: string | ReactNode+ children?: ReactNode+ }++interface AdmonitionBaseProps {+ type?: AdmonitionTypeshowIcon?: booleanchildProps?: {title?: ComponentProps<typeof AlertTitle_Shadcn_>@@ -26,10 +50,9 @@ export interface AdmonitionProps {className?: string}-const admonitionToAlertMapping: Record<- AdmonitionProps['type'],- 'default' | 'destructive' | 'warning'-> = {+export type AdmonitionProps = AdmonitionBaseProps & AdmonitionContentProps++const admonitionToAlertMapping: Record<AdmonitionType, 'default' | 'destructive' | 'warning'> = {note: 'default',tip: 'default',caution: 'warning',@@ -38,6 +61,7 @@ const admonitionToAlertMapping: Record<default: 'default',warning: 'warning',destructive: 'destructive',+ success: 'default',}const InfoIcon = () => (@@ -55,6 +79,21 @@ const InfoIcon = () => (</svg>)+const SuccessIcon = () => (+ <svg+ xmlns="http://www.w3.org/2000/svg"+ viewBox="0 0 21 20"+ className="w-6 h-6"+ fill="currentColor"+ >+ <path+ fillRule="evenodd"+ clipRule="evenodd"+ d="M10.5 19.5C5.25329 19.5 1 15.2467 1 10C1 4.75329 5.25329 0.5 10.5 0.5C15.7467 0.5 20 4.75329 20 10C20 15.2467 15.7467 19.5 10.5 19.5ZM14.7803 7.78033C15.0732 7.48744 15.0732 7.01256 14.7803 6.71967C14.4874 6.42678 14.0126 6.42678 13.7197 6.71967L9.25 11.1893L7.28033 9.21967C6.98744 8.92678 6.51256 8.92678 6.21967 9.21967C5.92678 9.51256 5.92678 9.98744 6.21967 10.2803L8.71967 12.7803C9.01256 13.0732 9.48744 13.0732 9.78033 12.7803L14.7803 7.78033Z"+ />+ </svg>+)+export const WarningIcon = ({ className }: { className?: string }) => (<svgxmlns="http://www.w3.org/2000/svg"@@ -74,15 +113,20 @@ const admonitionSVG = cva('', {variants: {type: {default: `[&>svg]:bg-foreground-muted`,+ success: `bg-brand-400 dark:bg-brand bg-opacity-15 dark:bg-opacity-10 border-brand-400 dark:border-brand-500 [&>svg]:text-white dark:[&>svg]:text-brand-link [&>svg]:bg-brand dark:[&>svg]:bg-brand-500/50`,warning: ``,destructive: ``,},},})+const admonitionBodyClassName =+ '[&_p]:!mt-0 [&_p]:!mb-1.5 [&_p:last-child]:!mb-0 [&_p:only-child]:!mb-0 [&_ul]:!my-1.5 [&_ol]:!my-1.5 [&_li]:!my-0.5'+export const Admonition = forwardRef<React.ElementRef<typeof Alert_Shadcn_>,- React.ComponentPropsWithoutRef<typeof Alert_Shadcn_> & AdmonitionProps+ Omit<React.ComponentPropsWithoutRef<typeof Alert_Shadcn_>, keyof AdmonitionProps | 'children'> &+ AdmonitionProps>(({@@ -102,6 +146,11 @@ export const Admonition = forwardRef<ref) => {const typeMapped = variant ? admonitionToAlertMapping[variant] : admonitionToAlertMapping[type]+ const typeStyle = type === 'success' ? 'success' : typeMapped++ if (process.env.NODE_ENV !== 'production' && (label || title) && !description && !children) {+ throw new Error('Admonition title-only usage is not supported. Add description or children.')+ }return (<Alert_Shadcn_@@ -114,12 +163,14 @@ export const Admonition = forwardRef<// Container query context for responsive layoutlayout === 'responsive' && '@container',// SVG icon- admonitionSVG({ type: typeMapped }),+ admonitionSVG({ type: typeStyle }),props.className)}>{!!icon ? (icon+ ) : showIcon && typeStyle === 'success' ? (+ <SuccessIcon />) : (showIcon && typeMapped === 'warning') || typeMapped === 'destructive' ? (<WarningIcon />) : showIcon ? (@@ -134,20 +185,29 @@ export const Admonition = forwardRef<'flex-col @md:flex-row @md:items-center @md:justify-between @md:gap-x-6 @lg:gap-x-8')}>- {label || title ? (+ {label || title || description ? (<div>- <AlertTitle_Shadcn_- {...childProps.title}- className={cn(- 'text mt-0.5 flex gap-3 text-sm',- !label && 'flex-col',- childProps.title?.className- )}- >- {label || title}- </AlertTitle_Shadcn_>+ {(label || title) && (+ <AlertTitle_Shadcn_+ {...childProps.title}+ className={cn(+ 'text mt-0.5 flex gap-3 text-sm !font-medium',+ !label && 'flex-col',+ childProps.title?.className+ )}+ >+ {label || title}+ </AlertTitle_Shadcn_>+ )}{description && (- <AlertDescription_Shadcn_ className={childProps.description?.className}>+ <AlertDescription_Shadcn_+ {...childProps.description}+ className={cn(+ admonitionBodyClassName,+ !label && !title && 'my-0.5',+ childProps.description?.className+ )}+ >{description}</AlertDescription_Shadcn_>)}@@ -155,16 +215,14 @@ export const Admonition = forwardRef<{children && (<AlertDescription_Shadcn_{...childProps.description}- className={cn('', childProps?.description?.className)}+ className={cn(admonitionBodyClassName, childProps?.description?.className)}>{children}</AlertDescription_Shadcn_>)}</div>) : (- <div className="text my-0.5 [&_p]:mt-0 [&_p]:mb-1.5 [&_p:last-child]:mb-0">- {children}- </div>+ <div className={cn('text my-0.5', admonitionBodyClassName)}>{children}</div>)}{actions && (<divdiff --git a/packages/ui/src/components/shadcn/ui/alert.tsx b/packages/ui/src/components/shadcn/ui/alert.tsxindex f91882a8752..56e00a1b8fc 100644--- a/packages/ui/src/components/shadcn/ui/alert.tsx+++ b/packages/ui/src/components/shadcn/ui/alert.tsx@@ -16,9 +16,9 @@ export const alertVariants = cva(default:'bg-surface-200/25 border-default text-foreground [&>svg]:text-background [&>svg]:bg-foreground',destructive:- 'bg-destructive-200 border-destructive-400 [&>svg]:text-destructive-200 [&>svg]:bg-destructive-600',+ 'bg-destructive-200 border-destructive-400 text-foreground [&>svg]:text-destructive-200 [&>svg]:bg-destructive-600',warning:- 'bg-warning-200 border-warning-400 [&>svg]:text-warning-200 [&>svg]:bg-warning-600',+ 'bg-warning-200 border-warning-400 text-foreground [&>svg]:text-warning-200 [&>svg]:bg-warning-600',},},defaultVariants: {