Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

refactor(ui): clarify dialog header close button anatomy (#44283)

yyh126c84b8f9ef
diff --git a/oxlint-suppressions.json b/oxlint-suppressions.json
index c73b4e4ca08..5a1a7896ad2 100644
--- a/oxlint-suppressions.json
+++ b/oxlint-suppressions.json
@@ -1560,11 +1560,6 @@
"count": 8
}
},
- "web/app/components/plugins/update-plugin/from-market-place.tsx": {
- "shadcn/no-restyle": {
- "count": 1
- }
- },
"web/app/components/rag-pipeline/components/panel/input-field/editor/form/hidden-fields.tsx": {
"eslint-react/static-components": {
"count": 2
diff --git a/packages/dify-ui/docs/overlays.md b/packages/dify-ui/docs/overlays.md
index 0c2bb7a3d47..48032cb2342 100644
--- a/packages/dify-ui/docs/overlays.md
+++ b/packages/dify-ui/docs/overlays.md
@@ -66,6 +66,9 @@ clipped, `display: none` or unmounted, and the shared positioner class turns tha
`DialogBody` scrolls between the other two. A wrapper between the surface and its parts, such as
a form, keeps the flex chain with `contents`. `DialogPopup` is the bare dialog element for a
surface that places and dresses itself.
+ `DialogHeaderCloseButton` is the optional standard close icon inside `DialogHeader`; the header
+ reserves inline-end space when it contains the button. Without it, the header keeps its normal
+ gutters. Use the unstyled `DialogClose` with `render` for footer actions and custom close controls.
- Use `AlertDialog` only for a destructive or must-confirm decision requiring an explicit answer.
It blocks outside-press dismissal but still closes on Escape; cancel that close in
`onOpenChange` when the answer must be explicit. `AlertDialogHeader` holds the title and
diff --git a/packages/dify-ui/src/dialog/index.stories.tsx b/packages/dify-ui/src/dialog/index.stories.tsx
index f3956e0bbf3..d31cfd595eb 100644
--- a/packages/dify-ui/src/dialog/index.stories.tsx
+++ b/packages/dify-ui/src/dialog/index.stories.tsx
@@ -8,11 +8,11 @@ import {
DialogBackdrop,
DialogBody,
DialogClose,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogPopup,
DialogPortal,
DialogTitle,
@@ -45,7 +45,7 @@ const meta = {
component: [
'Compound modal dialog built on Base UI Dialog. Use it for focused flows that interrupt the user, such as editing settings, collecting short-form input, or inspecting a record. `DialogContent` is the centered modal surface: compose `DialogHeader`, `DialogBody` and `DialogFooter` in it and the parts own the spacing, so a call site only arranges its content. `DialogBody` scrolls between the header and footer when the surface reaches the viewport.',
'',
- 'Open state is uncontrolled by default; pass `open` and `onOpenChange` to close after an async action or to veto a close through `eventDetails.cancel()`. `DialogCloseButton` is the optional header close icon; `DialogClose` stays unstyled and composes a visible action such as Cancel. `DialogPopup` is the bare dialog element for a surface that places and dresses itself, composed with `DialogPortal`, `DialogBackdrop` and `DialogViewport`.',
+ 'Open state is uncontrolled by default; pass `open` and `onOpenChange` to close after an async action or to veto a close through `eventDetails.cancel()`. `DialogHeaderCloseButton` belongs inside `DialogHeader`, which reserves space for the optional close icon; `DialogClose` stays unstyled and composes a visible action such as Cancel. `DialogPopup` is the bare dialog element for a surface that places and dresses itself, composed with `DialogPortal`, `DialogBackdrop` and `DialogViewport`.',
].join('\n'),
},
},
@@ -91,7 +91,7 @@ export const Default: Story = {
<DialogDescription>
Setup takes about a minute and prepares your default models, datasets and API keys.
</DialogDescription>
- <DialogCloseButton aria-label="Close dialog" />
+ <DialogHeaderCloseButton aria-label="Close dialog" />
</DialogHeader>
<DialogBody>
<ol className="list-inside list-decimal space-y-1 system-sm-regular text-text-secondary">
@@ -143,7 +143,7 @@ function FormDialogDemo() {
<DialogDescription>
Save the endpoint this workspace calls for external data tools.
</DialogDescription>
- <DialogCloseButton aria-label="Close dialog" />
+ <DialogHeaderCloseButton aria-label="Close dialog" />
</DialogHeader>
<Form<ApiExtensionFormValues>
className="contents"
@@ -224,7 +224,7 @@ export const ScrollingBody: Story = {
<DialogHeader>
<DialogTitle>Release notes</DialogTitle>
<DialogDescription>Highlights from the latest workspace update.</DialogDescription>
- <DialogCloseButton aria-label="Close dialog" />
+ <DialogHeaderCloseButton aria-label="Close dialog" />
</DialogHeader>
<DialogBody role="region" aria-label="Release notes" tabIndex={0}>
<ReleaseNoteList />
@@ -273,7 +273,7 @@ export const ViewportScrolling: Story = {
<DialogDescription>
Every improvement shipped since the last release.
</DialogDescription>
- <DialogCloseButton aria-label="Close dialog" />
+ <DialogHeaderCloseButton aria-label="Close dialog" />
</DialogHeader>
<DialogBody>
<ReleaseNoteList />
@@ -333,7 +333,7 @@ export const SidePanel: Story = {
<DialogHeader>
<DialogTitle>Run detail</DialogTitle>
<DialogDescription>Node executions for the selected message.</DialogDescription>
- <DialogCloseButton aria-label="Close panel" />
+ <DialogHeaderCloseButton aria-label="Close panel" />
</DialogHeader>
<DialogBody>
<table className="w-full system-sm-regular text-text-secondary">
@@ -419,7 +419,7 @@ function DetachedTriggersDemo() {
<DialogHeader>
<DialogTitle>Edit {payload?.name} key</DialogTitle>
<DialogDescription>Last used {payload?.lastUsed}.</DialogDescription>
- <DialogCloseButton aria-label="Close dialog" />
+ <DialogHeaderCloseButton aria-label="Close dialog" />
</DialogHeader>
<DialogBody>
<Field name="name">
@@ -491,7 +491,7 @@ function UnsavedChangesDemo() {
<DialogHeader>
<DialogTitle>Edit description</DialogTitle>
<DialogDescription>Shown on the app card and in the explore page.</DialogDescription>
- <DialogCloseButton aria-label="Close dialog" />
+ <DialogHeaderCloseButton aria-label="Close dialog" />
</DialogHeader>
<DialogBody>
<Field name="description">
diff --git a/packages/dify-ui/src/dialog/index.tsx b/packages/dify-ui/src/dialog/index.tsx
index 85bc58b2235..9f86cd99f8c 100644
--- a/packages/dify-ui/src/dialog/index.tsx
+++ b/packages/dify-ui/src/dialog/index.tsx
@@ -131,7 +131,7 @@ function DialogHeader({ className, ...props }: DialogHeaderProps) {
return (
<div
className={cn(
- 'flex shrink-0 flex-col gap-1 px-6 pt-6 pb-3 has-data-dialog-close:pe-14',
+ 'flex shrink-0 flex-col gap-1 px-6 pt-6 pb-3 has-data-dify-dialog-header-close:pe-14',
className,
)}
{...props}
@@ -139,17 +139,20 @@ function DialogHeader({ className, ...props }: DialogHeaderProps) {
)
}
-type DialogCloseButtonProps = Omit<DialogCloseProps, 'render' | 'children' | 'className'> & {
+type DialogHeaderCloseButtonProps = Omit<DialogCloseProps, 'render' | 'children' | 'className'> & {
'aria-label': string
}
-function DialogCloseButton({ 'aria-label': ariaLabel, ...props }: DialogCloseButtonProps) {
+function DialogHeaderCloseButton({
+ 'aria-label': ariaLabel,
+ ...props
+}: DialogHeaderCloseButtonProps) {
return (
<BaseDialog.Close
{...props}
render={
<IconButton
- data-dialog-close=""
+ data-dify-dialog-header-close=""
aria-label={ariaLabel}
size="lg"
className="absolute inset-e-5 top-5"
@@ -192,11 +195,11 @@ export {
DialogBackdrop,
DialogBody,
DialogClose,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogPopup,
DialogPortal,
DialogTitle,
@@ -210,12 +213,12 @@ export type {
DialogBodyProps,
DialogChangeEventDetails,
DialogChangeEventReason,
- DialogCloseButtonProps,
DialogCloseProps,
DialogContentProps,
DialogDescriptionProps,
DialogFooterProps,
DialogHandle,
+ DialogHeaderCloseButtonProps,
DialogHeaderProps,
DialogPopupProps,
DialogPortalProps,
diff --git a/web/app/account/(commonLayout)/account-page/email-change-modal.tsx b/web/app/account/(commonLayout)/account-page/email-change-modal.tsx
index bd13727e736..35a425865fc 100644
--- a/web/app/account/(commonLayout)/account-page/email-change-modal.tsx
+++ b/web/app/account/(commonLayout)/account-page/email-change-modal.tsx
@@ -2,10 +2,10 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Field, FieldError, FieldLabel } from '@langgenius/dify-ui/field'
@@ -212,7 +212,9 @@ const EmailChangeModal = ({ onClose, email }: Props) => {
<DialogTitle>
{t(($) => $['account.changeEmail.title'], { ns: 'accountSettings' })}
</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton
+ aria-label={t(($) => $['operation.close'], { ns: 'common' })}
+ />
</DialogHeader>
<DialogBody>
<div className="space-y-0.5 pt-1 pb-2">
@@ -247,7 +249,9 @@ const EmailChangeModal = ({ onClose, email }: Props) => {
<DialogTitle>
{t(($) => $['account.changeEmail.verifyEmail'], { ns: 'accountSettings' })}
</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton
+ aria-label={t(($) => $['operation.close'], { ns: 'common' })}
+ />
</DialogHeader>
<DialogBody>
<div className="space-y-0.5 pt-1 pb-2">
@@ -316,7 +320,9 @@ const EmailChangeModal = ({ onClose, email }: Props) => {
<DialogTitle>
{t(($) => $['account.changeEmail.newEmail'], { ns: 'accountSettings' })}
</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton
+ aria-label={t(($) => $['operation.close'], { ns: 'common' })}
+ />
</DialogHeader>
<DialogBody>
<div className="space-y-0.5 pt-1 pb-2">
@@ -368,7 +374,9 @@ const EmailChangeModal = ({ onClose, email }: Props) => {
<DialogTitle>
{t(($) => $['account.changeEmail.verifyNew'], { ns: 'accountSettings' })}
</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton
+ aria-label={t(($) => $['operation.close'], { ns: 'common' })}
+ />
</DialogHeader>
<DialogBody>
<div className="space-y-0.5 pt-1 pb-2">
diff --git a/web/app/components/api-key/api-key-dialog-content.tsx b/web/app/components/api-key/api-key-dialog-content.tsx
index 90b9449ad24..715bf20b277 100644
--- a/web/app/components/api-key/api-key-dialog-content.tsx
+++ b/web/app/components/api-key/api-key-dialog-content.tsx
@@ -3,10 +3,10 @@ import type { ButtonProps } from '@langgenius/dify-ui/button'
import type { DialogContentProps } from '@langgenius/dify-ui/dialog'
import { Button } from '@langgenius/dify-ui/button'
import {
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { QueryErrorResetBoundary } from '@tanstack/react-query'
@@ -35,7 +35,7 @@ export function ApiKeyDialogContent({
{t(($) => $['apiKeyModal.apiSecretKeyTips'])}
{limitDescription && <span className="block">{limitDescription}</span>}
</DialogDescription>
- <DialogCloseButton
+ <DialogHeaderCloseButton
aria-label={t(($) => $['operation.close'], { ns: 'common' })}
disabled={closeDisabled}
/>
diff --git a/web/app/components/api-key/dataset-scope-dialog.tsx b/web/app/components/api-key/dataset-scope-dialog.tsx
index 55aa28e5321..9da280455a5 100644
--- a/web/app/components/api-key/dataset-scope-dialog.tsx
+++ b/web/app/components/api-key/dataset-scope-dialog.tsx
@@ -20,11 +20,11 @@ import {
Dialog,
DialogBody,
DialogClose,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { IconButton } from '@langgenius/dify-ui/icon-button'
@@ -125,7 +125,7 @@ function DatasetScopeContent({
<DialogDescription>
{t(($) => $['apiKeyModal.addSubtitle'], { ns: 'appApi' })}
</DialogDescription>
- <DialogCloseButton
+ <DialogHeaderCloseButton
aria-label={t(($) => $['operation.close'], { ns: 'common' })}
disabled={isCreating}
/>
diff --git a/web/app/components/app-sidebar/app-info/app-metadata-dialog.tsx b/web/app/components/app-sidebar/app-info/app-metadata-dialog.tsx
index 0130f63b198..1d938ec8137 100644
--- a/web/app/components/app-sidebar/app-info/app-metadata-dialog.tsx
+++ b/web/app/components/app-sidebar/app-info/app-metadata-dialog.tsx
@@ -9,10 +9,10 @@ import {
Dialog,
DialogBody,
DialogClose,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Field, FieldDescription, FieldError, FieldLabel } from '@langgenius/dify-ui/field'
@@ -211,7 +211,7 @@ function AppMetadataForm({
? t(($) => $.editAppTitle, { ns: 'app' })
: t(($) => $.duplicateTitle, { ns: 'app' })}
</DialogTitle>
- <DialogCloseButton
+ <DialogHeaderCloseButton
disabled={isPending}
aria-label={t(($) => $['operation.close'], { ns: 'common' })}
/>
diff --git a/web/app/components/app/annotation/batch-add-annotation-modal/index.tsx b/web/app/components/app/annotation/batch-add-annotation-modal/index.tsx
index 4f4b90c1483..3fd46886fb9 100644
--- a/web/app/components/app/annotation/batch-add-annotation-modal/index.tsx
+++ b/web/app/components/app/annotation/batch-add-annotation-modal/index.tsx
@@ -4,10 +4,10 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { useQuery } from '@tanstack/react-query'
@@ -116,7 +116,7 @@ const BatchModal: FC<IBatchModalProps> = ({ appId, isShow, onCancel, onAdded })
<DialogContent className="w-130">
<DialogHeader>
<DialogTitle>{t(($) => $['batchModal.title'], { ns: 'appAnnotation' })}</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody>
<CSVUploader file={currentCSV} updateFile={handleFile} />
diff --git a/web/app/components/app/app-publisher/version-info-modal.tsx b/web/app/components/app/app-publisher/version-info-modal.tsx
index e896c03e128..825effa1f78 100644
--- a/web/app/components/app/app-publisher/version-info-modal.tsx
+++ b/web/app/components/app/app-publisher/version-info-modal.tsx
@@ -4,10 +4,10 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Field, FieldLabel } from '@langgenius/dify-ui/field'
@@ -88,7 +88,7 @@ const VersionInfoModal: FC<VersionInfoModalProps> = ({
? t(($) => $['versionHistory.editVersionInfo'], { ns: 'workflowHistory' })
: t(($) => $['versionHistory.nameThisVersion'], { ns: 'workflowHistory' })}
</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody className="flex flex-col gap-y-4">
<Field name="title" invalid={titleError}>
diff --git a/web/app/components/app/configuration/dataset-config/select-dataset/index.tsx b/web/app/components/app/configuration/dataset-config/select-dataset/index.tsx
index 158ef24b31a..16ee9a21b3a 100644
--- a/web/app/components/app/configuration/dataset-config/select-dataset/index.tsx
+++ b/web/app/components/app/configuration/dataset-config/select-dataset/index.tsx
@@ -6,10 +6,10 @@ import { cn } from '@langgenius/dify-ui/cn'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { useInfiniteQuery } from '@tanstack/react-query'
@@ -122,7 +122,7 @@ const SelectDataSet: FC<ISelectDataSetProps> = ({
<DialogTitle>
{t(($) => $['feature.dataSet.selectTitle'], { ns: 'appDebug' })}
</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody>
{isLoading && datasets.length === 0 && (
diff --git a/web/app/components/app/create-from-dsl-modal/index.tsx b/web/app/components/app/create-from-dsl-modal/index.tsx
index 8874a0fc9b2..73b462b2763 100644
--- a/web/app/components/app/create-from-dsl-modal/index.tsx
+++ b/web/app/components/app/create-from-dsl-modal/index.tsx
@@ -6,10 +6,10 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Field, FieldError, FieldLabel } from '@langgenius/dify-ui/field'
@@ -325,7 +325,7 @@ function CreateFromDSLModal({
>
<DialogHeader>
<DialogTitle>{t(($) => $.importApp, { ns: 'app' })}</DialogTitle>
- <DialogCloseButton
+ <DialogHeaderCloseButton
aria-label={t(($) => $['operation.close'], { ns: 'common' })}
disabled={isImporting}
/>
diff --git a/web/app/components/app/duplicate-modal/index.tsx b/web/app/components/app/duplicate-modal/index.tsx
index 2f3bf5d87ed..fcc241e62f6 100644
--- a/web/app/components/app/duplicate-modal/index.tsx
+++ b/web/app/components/app/duplicate-modal/index.tsx
@@ -5,10 +5,10 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Field } from '@langgenius/dify-ui/field'
@@ -116,7 +116,9 @@ const DuplicateAppModal = ({
<DialogContent className="w-120">
<DialogHeader>
<DialogTitle>{t(($) => $.duplicateTitle, { ns: 'app' })}</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton
+ aria-label={t(($) => $['operation.close'], { ns: 'common' })}
+ />
</DialogHeader>
<form
className="contents"
diff --git a/web/app/components/app/overview/customize/index.tsx b/web/app/components/app/overview/customize/index.tsx
index 1c20fa27e5c..378cac96660 100644
--- a/web/app/components/app/overview/customize/index.tsx
+++ b/web/app/components/app/overview/customize/index.tsx
@@ -7,10 +7,10 @@ import { cn } from '@langgenius/dify-ui/cn'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
DialogTrigger,
} from '@langgenius/dify-ui/dialog'
@@ -85,7 +85,7 @@ export function CustomizeDialog({
<DialogDescription>
{t(($) => $[`${prefixCustomize}.explanation`], { ns: 'appOverview' })}
</DialogDescription>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody>
<div className="w-full rounded-lg border-[0.5px] border-components-panel-border px-6 py-5">
diff --git a/web/app/components/app/overview/embedded/index.tsx b/web/app/components/app/overview/embedded/index.tsx
index bb1a97546b7..b2b25c24293 100644
--- a/web/app/components/app/overview/embedded/index.tsx
+++ b/web/app/components/app/overview/embedded/index.tsx
@@ -9,10 +9,10 @@ import { cn } from '@langgenius/dify-ui/cn'
import { Collapsible, CollapsiblePanel, CollapsibleTrigger } from '@langgenius/dify-ui/collapsible'
import {
DialogBody,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { IconButton } from '@langgenius/dify-ui/icon-button'
@@ -374,7 +374,7 @@ export function EmbeddedDialogContent({
<DialogDescription>
{t(($) => $[`${prefixEmbedded}.explanation`], { ns: 'appOverview' })}
</DialogDescription>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody>
<Suspense
diff --git a/web/app/components/app/overview/settings/index.tsx b/web/app/components/app/overview/settings/index.tsx
index 62236ea4694..8d4c629d9b7 100644
--- a/web/app/components/app/overview/settings/index.tsx
+++ b/web/app/components/app/overview/settings/index.tsx
@@ -13,11 +13,11 @@ import {
Dialog,
DialogBody,
DialogClose,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
DialogTrigger,
} from '@langgenius/dify-ui/dialog'
@@ -684,7 +684,7 @@ export function SettingsDialog({
<DialogDescription>
{t(($) => $[`${prefixSettings}.modalTip`], { ns: 'appOverview' })}
</DialogDescription>
- <DialogCloseButton
+ <DialogHeaderCloseButton
aria-label={t(($) => $['operation.close'], { ns: 'common' })}
disabled={pending}
/>
diff --git a/web/app/components/app/switch-app-modal/index.tsx b/web/app/components/app/switch-app-modal/index.tsx
index 552c9e46a37..e46f2c57fb0 100644
--- a/web/app/components/app/switch-app-modal/index.tsx
+++ b/web/app/components/app/switch-app-modal/index.tsx
@@ -22,11 +22,11 @@ import {
Dialog,
DialogBody,
DialogClose,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Field, FieldError } from '@langgenius/dify-ui/field'
@@ -208,7 +208,7 @@ function SwitchAppSession({
</span>
<span>{t(($) => $.switchTipEnd, { ns: 'app' })}</span>
</DialogDescription>
- <DialogCloseButton
+ <DialogHeaderCloseButton
disabled={isPending}
aria-label={t(($) => $['operation.close'], { ns: 'common' })}
/>
diff --git a/web/app/components/apps/import-from-marketplace-template-modal.tsx b/web/app/components/apps/import-from-marketplace-template-modal.tsx
index af725979894..98f31cacc4f 100644
--- a/web/app/components/apps/import-from-marketplace-template-modal.tsx
+++ b/web/app/components/apps/import-from-marketplace-template-modal.tsx
@@ -4,10 +4,10 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { useCallback, useMemo, useRef, useState } from 'react'
@@ -82,7 +82,7 @@ const ImportFromMarketplaceTemplateModal = ({
<DialogContent className="w-130">
<DialogHeader>
<DialogTitle>{t(($) => $['marketplace.template.modalTitle'], { ns: 'app' })}</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody aria-busy={isLoading}>
diff --git a/web/app/components/base/chat/chat/answer/operation.tsx b/web/app/components/base/chat/chat/answer/operation.tsx
index ed910d5032f..39fec6badef 100644
--- a/web/app/components/base/chat/chat/answer/operation.tsx
+++ b/web/app/components/base/chat/chat/answer/operation.tsx
@@ -7,11 +7,11 @@ import {
Dialog,
DialogBody,
DialogClose,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
DialogTrigger,
} from '@langgenius/dify-ui/dialog'
@@ -107,7 +107,7 @@ function FeedbackForm({ isSubmitting, onSubmit }: FeedbackFormProps) {
{t(($) => $['feedback.subtitle'], { ns: 'common' }) ||
'Please tell us what went wrong with this response'}
</DialogDescription>
- <DialogCloseButton
+ <DialogHeaderCloseButton
aria-label={t(($) => $['operation.close'], { ns: 'common' })}
disabled={isSubmitting}
/>
diff --git a/web/app/components/base/features/new-feature-panel/conversation-opener/modal.tsx b/web/app/components/base/features/new-feature-panel/conversation-opener/modal.tsx
index 4a555edfb0a..707763f7432 100644
--- a/web/app/components/base/features/new-feature-panel/conversation-opener/modal.tsx
+++ b/web/app/components/base/features/new-feature-panel/conversation-opener/modal.tsx
@@ -6,10 +6,10 @@ import { cn } from '@langgenius/dify-ui/cn'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { IconButton } from '@langgenius/dify-ui/icon-button'
@@ -279,7 +279,7 @@ const OpeningSettingModal = ({
<DialogTitle>
{t(($) => $['feature.conversationOpener.title'], { ns: 'appDebug' })}
</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody className="space-y-4">
<div data-testid="opener-input-section" className="py-2">
diff --git a/web/app/components/base/features/new-feature-panel/follow-up-setting-modal.tsx b/web/app/components/base/features/new-feature-panel/follow-up-setting-modal.tsx
index 0b56afedb9f..71291d5d87c 100644
--- a/web/app/components/base/features/new-feature-panel/follow-up-setting-modal.tsx
+++ b/web/app/components/base/features/new-feature-panel/follow-up-setting-modal.tsx
@@ -9,10 +9,10 @@ import {
Dialog,
DialogBody,
DialogClose,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
DialogTrigger,
} from '@langgenius/dify-ui/dialog'
@@ -170,7 +170,7 @@ function FollowUpSettingsForm({ data, onSave }: Omit<FollowUpSettingsDialogProps
<DialogTitle>
{t(($) => $['feature.suggestedQuestionsAfterAnswer.modal.title'], { ns: 'appDebug' })}
</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody className="space-y-4">
<div>
diff --git a/web/app/components/base/features/new-feature-panel/moderation/moderation-setting-modal.tsx b/web/app/components/base/features/new-feature-panel/moderation/moderation-setting-modal.tsx
index b719d1339fb..e3a3b982cff 100644
--- a/web/app/components/base/features/new-feature-panel/moderation/moderation-setting-modal.tsx
+++ b/web/app/components/base/features/new-feature-panel/moderation/moderation-setting-modal.tsx
@@ -6,10 +6,10 @@ import { cn } from '@langgenius/dify-ui/cn'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Separator } from '@langgenius/dify-ui/separator'
@@ -332,7 +332,9 @@ const ModerationSettingModal: FC<ModerationSettingModalProps> = ({ data, onCance
<DialogTitle>
{t(($) => $['feature.moderation.modal.title'], { ns: 'appDebug' })}
</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton
+ aria-label={t(($) => $['operation.close'], { ns: 'common' })}
+ />
</DialogHeader>
<DialogBody className="flex flex-col gap-4">
<div className="flex flex-col gap-1">
diff --git a/web/app/components/billing/pricing/plans/cloud-plan-item/index.tsx b/web/app/components/billing/pricing/plans/cloud-plan-item/index.tsx
index 56ca25bae3e..5e4611be5ef 100644
--- a/web/app/components/billing/pricing/plans/cloud-plan-item/index.tsx
+++ b/web/app/components/billing/pricing/plans/cloud-plan-item/index.tsx
@@ -4,11 +4,11 @@ import type { CloudPlan } from '@dify/contracts/api/console/features/types.gen'
import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { useAtomValue } from 'jotai'
@@ -239,7 +239,9 @@ export function CloudPlanItem({ plan, billingInterval, billing }: CloudPlanItemP
<DialogDescription>
{t(($) => $['educationPricingConfirm.description'], { ns: 'education' })}
</DialogDescription>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton
+ aria-label={t(($) => $['operation.close'], { ns: 'common' })}
+ />
</DialogHeader>
<DialogFooter>
<Button
diff --git a/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/index.tsx b/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/index.tsx
index a57429c26f4..c0f744bdd57 100644
--- a/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/index.tsx
+++ b/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/index.tsx
@@ -3,10 +3,10 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Field, FieldLabel } from '@langgenius/dify-ui/field'
@@ -63,7 +63,9 @@ const CreateFromDSLModal = ({
<DialogContent className="w-120">
<DialogHeader>
<DialogTitle>{t(($) => $.importFromDSL, { ns: 'app' })}</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton
+ aria-label={t(($) => $['operation.close'], { ns: 'common' })}
+ />
</DialogHeader>
<form
className="contents"
diff --git a/web/app/components/datasets/create-from-pipeline/list/template-card/edit-pipeline-info.tsx b/web/app/components/datasets/create-from-pipeline/list/template-card/edit-pipeline-info.tsx
index 9ef50f09cf0..58a0ad529c7 100644
--- a/web/app/components/datasets/create-from-pipeline/list/template-card/edit-pipeline-info.tsx
+++ b/web/app/components/datasets/create-from-pipeline/list/template-card/edit-pipeline-info.tsx
@@ -3,9 +3,9 @@ import type { PipelineTemplate } from '@/models/pipeline'
import { Button } from '@langgenius/dify-ui/button'
import {
DialogBody,
- DialogCloseButton,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Field, FieldLabel } from '@langgenius/dify-ui/field'
@@ -102,7 +102,7 @@ const EditPipelineInfo = ({ onClose, pipeline }: EditPipelineInfoProps) => {
>
<DialogHeader>
<DialogTitle>{t(($) => $.editPipelineInfo, { ns: 'datasetPipeline' })}</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody className="flex flex-col gap-y-5">
<div className="flex items-end gap-x-3 self-stretch">
diff --git a/web/app/components/datasets/create/empty-dataset-creation-modal/index.tsx b/web/app/components/datasets/create/empty-dataset-creation-modal/index.tsx
index 550032351c3..748eaf1aadc 100644
--- a/web/app/components/datasets/create/empty-dataset-creation-modal/index.tsx
+++ b/web/app/components/datasets/create/empty-dataset-creation-modal/index.tsx
@@ -3,11 +3,11 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Field, FieldLabel } from '@langgenius/dify-ui/field'
@@ -77,7 +77,7 @@ const EmptyDatasetCreationModal = ({ show = false, onHide }: IProps) => {
<DialogDescription>
{t(($) => $['stepOne.modal.tip'], { ns: 'datasetCreation' })}
</DialogDescription>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<Form className="contents" onFormSubmit={() => void submit()}>
<DialogBody>
diff --git a/web/app/components/datasets/documents/detail/batch-modal/index.tsx b/web/app/components/datasets/documents/detail/batch-modal/index.tsx
index 98c21e0c1fc..f53b2171470 100644
--- a/web/app/components/datasets/documents/detail/batch-modal/index.tsx
+++ b/web/app/components/datasets/documents/detail/batch-modal/index.tsx
@@ -5,10 +5,10 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import * as React from 'react'
@@ -43,7 +43,7 @@ const BatchModalContent: FC<BatchModalContentProps> = ({ docForm, onCancel, onCo
<DialogTitle>
{t(($) => $['list.batchModal.title'], { ns: 'datasetDocuments' })}
</DialogTitle>
- <DialogCloseButton
+ <DialogHeaderCloseButton
aria-label={t(($) => $['list.batchModal.cancel'], { ns: 'datasetDocuments' })}
/>
</DialogHeader>
diff --git a/web/app/components/datasets/external-api/external-api-modal/index.tsx b/web/app/components/datasets/external-api/external-api-modal/index.tsx
index c7030acbc07..5dd6fa90b1e 100644
--- a/web/app/components/datasets/external-api/external-api-modal/index.tsx
+++ b/web/app/components/datasets/external-api/external-api-modal/index.tsx
@@ -15,10 +15,10 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Popover, PopoverContent, PopoverTrigger } from '@langgenius/dify-ui/popover'
@@ -196,7 +196,7 @@ const AddExternalAPIModal: FC<AddExternalAPIModalProps> = ({
</span>
</div>
)}
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody>
<Form
diff --git a/web/app/components/datasets/hit-testing/components/chunk-detail-dialog.tsx b/web/app/components/datasets/hit-testing/components/chunk-detail-dialog.tsx
index 516875e54b4..c418aea9bd4 100644
--- a/web/app/components/datasets/hit-testing/components/chunk-detail-dialog.tsx
+++ b/web/app/components/datasets/hit-testing/components/chunk-detail-dialog.tsx
@@ -6,9 +6,9 @@ import { cn } from '@langgenius/dify-ui/cn'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
DialogTrigger,
} from '@langgenius/dify-ui/dialog'
@@ -82,7 +82,7 @@ export function ChunkDetailDialog({ payload, open, onOpenChange }: ChunkDetailDi
<DialogTitle>
{t(($) => $[`${i18nPrefix}chunkDetail`], { ns: 'datasetHitTesting' })}
</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody className="flex flex-col gap-6 lg:flex-row">
diff --git a/web/app/components/datasets/hit-testing/components/result-item-external.tsx b/web/app/components/datasets/hit-testing/components/result-item-external.tsx
index 6c50a6a13ee..7a2c341941b 100644
--- a/web/app/components/datasets/hit-testing/components/result-item-external.tsx
+++ b/web/app/components/datasets/hit-testing/components/result-item-external.tsx
@@ -3,9 +3,9 @@ import type { ExternalHitTestingRecordResponse } from '@dify/contracts/api/conso
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
DialogTrigger,
} from '@langgenius/dify-ui/dialog'
@@ -53,7 +53,7 @@ export const ResultItemExternal = memo(({ payload, positionId }: ResultItemExter
<DialogContent className="w-full">
<DialogHeader>
<DialogTitle>{t(($) => $.chunkDetail, { ns: 'datasetHitTesting' })}</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody>
<ResultItemMeta
diff --git a/web/app/components/datasets/metadata/edit-metadata-batch/modal.tsx b/web/app/components/datasets/metadata/edit-metadata-batch/modal.tsx
index 689b99ab604..65d31c25625 100644
--- a/web/app/components/datasets/metadata/edit-metadata-batch/modal.tsx
+++ b/web/app/components/datasets/metadata/edit-metadata-batch/modal.tsx
@@ -6,10 +6,10 @@ import { Checkbox } from '@langgenius/dify-ui/checkbox'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Infotip, InfotipContent, InfotipTrigger } from '@langgenius/dify-ui/infotip'
@@ -147,7 +147,7 @@ const EditMetadataBatchModal: FC<Props> = ({
<div className="system-xs-medium text-text-accent">
{t(($) => $[`${i18nPrefix}.editDocumentsNum`], { ns: 'dataset', num: documentNum })}
</div>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody>
<div className="space-y-2">
diff --git a/web/app/components/datasets/rename-modal/index.tsx b/web/app/components/datasets/rename-modal/index.tsx
index 63dae8e74ab..1b272043060 100644
--- a/web/app/components/datasets/rename-modal/index.tsx
+++ b/web/app/components/datasets/rename-modal/index.tsx
@@ -8,10 +8,10 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Field, FieldLabel } from '@langgenius/dify-ui/field'
@@ -117,7 +117,9 @@ const RenameDatasetModal = ({ show, dataset, onSuccess, onClose }: RenameDataset
>
<DialogHeader>
<DialogTitle>{t(($) => $.title, { ns: 'datasetSettings' })}</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton
+ aria-label={t(($) => $['operation.close'], { ns: 'common' })}
+ />
</DialogHeader>
<DialogBody>
<IconPicker value={appIcon} onValueChange={handleSelectAppIcon}>
diff --git a/web/app/components/explore/create-app-modal/index.tsx b/web/app/components/explore/create-app-modal/index.tsx
index e3d7df1e9ba..4da00211fde 100644
--- a/web/app/components/explore/create-app-modal/index.tsx
+++ b/web/app/components/explore/create-app-modal/index.tsx
@@ -10,10 +10,10 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Field, FieldDescription, FieldLabel } from '@langgenius/dify-ui/field'
@@ -216,7 +216,9 @@ const CreateAppModal = ({
{t(($) => $['appCustomize.title'], { ns: 'explore', name: appName })}
</DialogTitle>
)}
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton
+ aria-label={t(($) => $['operation.close'], { ns: 'common' })}
+ />
</DialogHeader>
<DialogBody>
{/* icon & name */}
diff --git a/web/app/components/header/account-setting/access-rules-page/permission-set-modal/index.tsx b/web/app/components/header/account-setting/access-rules-page/permission-set-modal/index.tsx
index b33a7cb5c4f..af3589c0c1b 100644
--- a/web/app/components/header/account-setting/access-rules-page/permission-set-modal/index.tsx
+++ b/web/app/components/header/account-setting/access-rules-page/permission-set-modal/index.tsx
@@ -4,11 +4,11 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Input } from '@langgenius/dify-ui/input'
@@ -99,7 +99,7 @@ const PermissionSetModalBody = ({
ns: 'permission',
})}
</DialogDescription>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody className="flex flex-col gap-5">
diff --git a/web/app/components/header/account-setting/api-based-extension-page/modal.tsx b/web/app/components/header/account-setting/api-based-extension-page/modal.tsx
index 5e56c35e7ca..5259ef9af18 100644
--- a/web/app/components/header/account-setting/api-based-extension-page/modal.tsx
+++ b/web/app/components/header/account-setting/api-based-extension-page/modal.tsx
@@ -6,10 +6,10 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Field, FieldDescription, FieldError, FieldLabel } from '@langgenius/dify-ui/field'
@@ -100,7 +100,7 @@ export function ApiBasedExtensionModal(props: ApiBasedExtensionModalProps) {
? t(($) => $['apiBasedExtension.modal.editTitle'], { ns: 'common' })
: t(($) => $['apiBasedExtension.modal.title'], { ns: 'common' })}
</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<Form<ApiBasedExtensionPayload> className="contents" onFormSubmit={handleSubmit}>
<DialogBody className="grid gap-4">
diff --git a/web/app/components/header/account-setting/members-page/assign-roles-modal/index.tsx b/web/app/components/header/account-setting/members-page/assign-roles-modal/index.tsx
index 0f1c643f90d..ae91383d53d 100644
--- a/web/app/components/header/account-setting/members-page/assign-roles-modal/index.tsx
+++ b/web/app/components/header/account-setting/members-page/assign-roles-modal/index.tsx
@@ -3,11 +3,11 @@ import type { Role } from '@/models/access-control'
import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { useState } from 'react'
@@ -60,7 +60,7 @@ const AssignRolesModalBody = ({
<DialogHeader>
<DialogTitle>{title}</DialogTitle>
<DialogDescription>{description}</DialogDescription>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<WorkspaceRoleCheckboxList
diff --git a/web/app/components/header/account-setting/members-page/edit-workspace-modal/index.tsx b/web/app/components/header/account-setting/members-page/edit-workspace-modal/index.tsx
index ec492c268e5..91e3585aa0d 100644
--- a/web/app/components/header/account-setting/members-page/edit-workspace-modal/index.tsx
+++ b/web/app/components/header/account-setting/members-page/edit-workspace-modal/index.tsx
@@ -4,10 +4,10 @@ import { cn } from '@langgenius/dify-ui/cn'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Input } from '@langgenius/dify-ui/input'
@@ -76,7 +76,9 @@ const EditWorkspaceModal = ({ onCancel }: IEditWorkspaceModalProps) => {
<DialogTitle>
{t(($) => $['account.editWorkspaceInfo'], { ns: 'accountSettings' })}
</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton
+ aria-label={t(($) => $['operation.close'], { ns: 'common' })}
+ />
</DialogHeader>
<DialogBody className="space-y-2">
diff --git a/web/app/components/header/account-setting/members-page/invite-modal/index.tsx b/web/app/components/header/account-setting/members-page/invite-modal/index.tsx
index 51039897e79..fbfc80fc344 100644
--- a/web/app/components/header/account-setting/members-page/invite-modal/index.tsx
+++ b/web/app/components/header/account-setting/members-page/invite-modal/index.tsx
@@ -7,11 +7,11 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
DialogTrigger,
} from '@langgenius/dify-ui/dialog'
@@ -220,7 +220,7 @@ export function InviteModal({ isEmailSetup, onSend }: InviteModalProps) {
<DialogDescription>
{t(($) => $['members.inviteTeamMemberTip'], { ns: 'workspaceMembers' })}
</DialogDescription>
- <DialogCloseButton
+ <DialogHeaderCloseButton
aria-label={t(($) => $['operation.close'], { ns: 'common' })}
disabled={isPending}
/>
diff --git a/web/app/components/header/account-setting/members-page/invited-modal/index.tsx b/web/app/components/header/account-setting/members-page/invited-modal/index.tsx
index b0fc7a2e7c4..6b6d2e8c0cf 100644
--- a/web/app/components/header/account-setting/members-page/invited-modal/index.tsx
+++ b/web/app/components/header/account-setting/members-page/invited-modal/index.tsx
@@ -8,10 +8,10 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'
@@ -70,7 +70,7 @@ const InvitedModal = ({ invitationResults, onCancel }: IInvitedModalProps) => {
{ ns: 'workspaceMembers' },
)}
</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody className="space-y-5">
{isCloudEdition && <div className="text-sm text-text-tertiary">{description}</div>}
diff --git a/web/app/components/header/account-setting/members-page/member-details-modal/index.tsx b/web/app/components/header/account-setting/members-page/member-details-modal/index.tsx
index 5dfe423eb80..e22f7e3543c 100644
--- a/web/app/components/header/account-setting/members-page/member-details-modal/index.tsx
+++ b/web/app/components/header/account-setting/members-page/member-details-modal/index.tsx
@@ -6,10 +6,10 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { useQuery } from '@tanstack/react-query'
@@ -138,7 +138,7 @@ const MemberDetailsModal = ({
defaultValue: 'Member Details',
})}
</DialogTitle>
- <DialogCloseButton
+ <DialogHeaderCloseButton
disabled={isSaving}
aria-label={t(($) => $['operation.close'], { ns: 'common' })}
/>
diff --git a/web/app/components/header/account-setting/members-page/transfer-ownership-modal/index.tsx b/web/app/components/header/account-setting/members-page/transfer-ownership-modal/index.tsx
index 0bf919cfca9..9989f081a41 100644
--- a/web/app/components/header/account-setting/members-page/transfer-ownership-modal/index.tsx
+++ b/web/app/components/header/account-setting/members-page/transfer-ownership-modal/index.tsx
@@ -2,10 +2,10 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Input } from '@langgenius/dify-ui/input'
@@ -132,7 +132,9 @@ const TransferOwnershipModal = ({ onClose, show }: Props) => {
<DialogTitle>
{t(($) => $['members.transferModal.title'], { ns: 'workspaceMembers' })}
</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton
+ aria-label={t(($) => $['operation.close'], { ns: 'common' })}
+ />
</DialogHeader>
<DialogBody>
<div className="space-y-1 pt-1 pb-2">
@@ -171,7 +173,9 @@ const TransferOwnershipModal = ({ onClose, show }: Props) => {
<DialogTitle>
{t(($) => $['members.transferModal.verifyEmail'], { ns: 'workspaceMembers' })}
</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton
+ aria-label={t(($) => $['operation.close'], { ns: 'common' })}
+ />
</DialogHeader>
<DialogBody>
<div className="pt-1 pb-2">
@@ -251,7 +255,9 @@ const TransferOwnershipModal = ({ onClose, show }: Props) => {
<DialogTitle>
{t(($) => $['members.transferModal.title'], { ns: 'workspaceMembers' })}
</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton
+ aria-label={t(($) => $['operation.close'], { ns: 'common' })}
+ />
</DialogHeader>
<DialogBody>
<div className="space-y-1 pt-1 pb-2">
diff --git a/web/app/components/header/account-setting/model-provider-page/model-modal/index.tsx b/web/app/components/header/account-setting/model-provider-page/model-modal/index.tsx
index 9d25891ed7e..ea8bd38e446 100644
--- a/web/app/components/header/account-setting/model-provider-page/model-modal/index.tsx
+++ b/web/app/components/header/account-setting/model-provider-page/model-modal/index.tsx
@@ -19,11 +19,11 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { memo, useCallback, useMemo, useRef, useState } from 'react'
@@ -319,7 +319,7 @@ const ModelModal: FC<ModelModalProps> = ({
{modalTitle}
{modalDesc}
{modalModel}
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody>
{mode === ModelModalModeEnum.configCustomModel && (
diff --git a/web/app/components/header/account-setting/model-provider-page/system-model-selector/index.tsx b/web/app/components/header/account-setting/model-provider-page/system-model-selector/index.tsx
index 459a3133075..ea826f664eb 100644
--- a/web/app/components/header/account-setting/model-provider-page/system-model-selector/index.tsx
+++ b/web/app/components/header/account-setting/model-provider-page/system-model-selector/index.tsx
@@ -5,11 +5,11 @@ import { cn } from '@langgenius/dify-ui/cn'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
DialogTrigger,
} from '@langgenius/dify-ui/dialog'
@@ -273,7 +273,7 @@ const SystemModel: FC<SystemModelSelectorProps> = ({
<DialogDescription>
{t(($) => $['modelProvider.systemModelSettingsDesc'], { ns: 'modelProvider' })}
</DialogDescription>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody>
{isSystemModelListLoading ? (
diff --git a/web/app/components/header/account-setting/permissions-page/role-modal/index.tsx b/web/app/components/header/account-setting/permissions-page/role-modal/index.tsx
index 7668a9a88c9..f4174af974f 100644
--- a/web/app/components/header/account-setting/permissions-page/role-modal/index.tsx
+++ b/web/app/components/header/account-setting/permissions-page/role-modal/index.tsx
@@ -4,11 +4,11 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Input } from '@langgenius/dify-ui/input'
@@ -81,7 +81,7 @@ const RoleModal = ({ mode, open, role, onClose, onSubmit }: RoleModalProps) => {
<DialogDescription>
{t(($) => $[`role.modal.${mode}.description`], { ns: 'permission' })}
</DialogDescription>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody className="flex flex-col gap-5">
<div className="flex shrink-0 flex-col gap-1">
diff --git a/web/app/components/header/account-setting/resource-access-token-page/token-dialog.tsx b/web/app/components/header/account-setting/resource-access-token-page/token-dialog.tsx
index a9006a307e6..98a55120d9f 100644
--- a/web/app/components/header/account-setting/resource-access-token-page/token-dialog.tsx
+++ b/web/app/components/header/account-setting/resource-access-token-page/token-dialog.tsx
@@ -6,10 +6,10 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Field, FieldError, FieldLabel } from '@langgenius/dify-ui/field'
@@ -128,7 +128,7 @@ export default function ResourceAccessTokenDialog({
? t(($) => $['resourceAccessToken.createdToken'], { ns: 'accountSettings' })
: t(($) => $['resourceAccessToken.createTitle'], { ns: 'accountSettings' })}
</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
{createdToken ? (
diff --git a/web/app/components/header/account-setting/update-setting-dialog.tsx b/web/app/components/header/account-setting/update-setting-dialog.tsx
index f058fb7738a..ff859fecac8 100644
--- a/web/app/components/header/account-setting/update-setting-dialog.tsx
+++ b/web/app/components/header/account-setting/update-setting-dialog.tsx
@@ -6,9 +6,9 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
DialogTrigger,
} from '@langgenius/dify-ui/dialog'
@@ -85,7 +85,7 @@ export function UpdateSettingDialog({ category }: Props) {
<DialogTitle>
{t(($) => $['autoUpdate.autoUpdateSettings'], { ns: 'plugin' })}
</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
{isSettingsLoading && (
<DialogBody>
diff --git a/web/app/components/main-nav/components/help-menu/account-about-dialog.tsx b/web/app/components/main-nav/components/help-menu/account-about-dialog.tsx
index f727e9bd842..678e79fb66f 100644
--- a/web/app/components/main-nav/components/help-menu/account-about-dialog.tsx
+++ b/web/app/components/main-nav/components/help-menu/account-about-dialog.tsx
@@ -5,10 +5,10 @@ import { buttonVariants } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import dayjs from 'dayjs'
@@ -40,7 +40,7 @@ export default function AccountAboutDialog({
<DialogTitle className="sr-only">
{t(($) => $['userProfile.about'], { ns: 'common' })}
</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody className="flex flex-col items-center gap-4">
<DifyLogo alt="Dify" size="large" className="mx-auto" />
diff --git a/web/app/components/plugins/install-plugin/install-bundle/index.tsx b/web/app/components/plugins/install-plugin/install-bundle/index.tsx
index 3395aea2f5f..2f1a78c6f02 100644
--- a/web/app/components/plugins/install-plugin/install-bundle/index.tsx
+++ b/web/app/components/plugins/install-plugin/install-bundle/index.tsx
@@ -4,9 +4,9 @@ import type { Dependency, InstallStatus, Plugin, VersionProps } from '../../type
import { cn } from '@langgenius/dify-ui/cn'
import {
Dialog,
- DialogCloseButton,
DialogContent,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import * as React from 'react'
@@ -78,7 +78,7 @@ const InstallBundle: FC<Props> = ({
>
<DialogHeader>
<DialogTitle>{getTitle()}</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<ReadyToInstall
step={step}
diff --git a/web/app/components/plugins/install-plugin/install-from-github/index.tsx b/web/app/components/plugins/install-plugin/install-from-github/index.tsx
index fb55a90ddf1..16c7cd46fef 100644
--- a/web/app/components/plugins/install-plugin/install-from-github/index.tsx
+++ b/web/app/components/plugins/install-plugin/install-from-github/index.tsx
@@ -6,11 +6,11 @@ import { cn } from '@langgenius/dify-ui/cn'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Field, FieldLabel } from '@langgenius/dify-ui/field'
@@ -209,7 +209,7 @@ const InstallFromGitHub: React.FC<InstallFromGitHubProps> = ({
{t(($) => $['installFromGitHub.installNote'], { ns: 'plugin' })}
</DialogDescription>
)}
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
{completedSteps.includes(state.step) ? (
<Installed
diff --git a/web/app/components/plugins/install-plugin/install-from-local-package/index.tsx b/web/app/components/plugins/install-plugin/install-from-local-package/index.tsx
index 85be31f8bae..63e7476d903 100644
--- a/web/app/components/plugins/install-plugin/install-from-local-package/index.tsx
+++ b/web/app/components/plugins/install-plugin/install-from-local-package/index.tsx
@@ -3,9 +3,9 @@ import type { Dependency, PluginCategoryEnum, PluginDeclaration } from '../../ty
import { cn } from '@langgenius/dify-ui/cn'
import {
Dialog,
- DialogCloseButton,
DialogContent,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import * as React from 'react'
@@ -98,7 +98,7 @@ const InstallFromLocalPackage: React.FC<InstallFromLocalPackageProps> = ({
>
<DialogHeader>
<DialogTitle>{getTitle()}</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
{step === InstallStep.uploading && (
<Uploading
diff --git a/web/app/components/plugins/plugin-auth/authorize/api-key-modal.tsx b/web/app/components/plugins/plugin-auth/authorize/api-key-modal.tsx
index 286d18053e3..6b9e77314d0 100644
--- a/web/app/components/plugins/plugin-auth/authorize/api-key-modal.tsx
+++ b/web/app/components/plugins/plugin-auth/authorize/api-key-modal.tsx
@@ -5,11 +5,11 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { memo, useCallback, useMemo, useRef, useState } from 'react'
@@ -161,7 +161,7 @@ const ApiKeyModal = ({
<DialogDescription>
{t(($) => $['auth.useApiAuthDesc'], { ns: 'plugin' })}
</DialogDescription>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody>
{pluginPayload.detail && (
diff --git a/web/app/components/plugins/plugin-auth/authorize/oauth-client-settings.tsx b/web/app/components/plugins/plugin-auth/authorize/oauth-client-settings.tsx
index d100f7b7d30..a8d9ffa6503 100644
--- a/web/app/components/plugins/plugin-auth/authorize/oauth-client-settings.tsx
+++ b/web/app/components/plugins/plugin-auth/authorize/oauth-client-settings.tsx
@@ -4,10 +4,10 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { useForm, useStore } from '@tanstack/react-form'
@@ -152,7 +152,7 @@ const OAuthClientSettings = ({
<DialogContent backdropProps={{ forceRender: true }}>
<DialogHeader>
<DialogTitle>{t(($) => $['auth.oauthClientSettings'], { ns: 'plugin' })}</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody>
{pluginPayload.detail && (
diff --git a/web/app/components/plugins/plugin-auth/authorize/oauth-visibility-dialog.tsx b/web/app/components/plugins/plugin-auth/authorize/oauth-visibility-dialog.tsx
index cc14976c150..f2c63c3d295 100644
--- a/web/app/components/plugins/plugin-auth/authorize/oauth-visibility-dialog.tsx
+++ b/web/app/components/plugins/plugin-auth/authorize/oauth-visibility-dialog.tsx
@@ -3,11 +3,11 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { memo } from 'react'
@@ -45,7 +45,7 @@ const OAuthVisibilityDialog = ({
<DialogDescription>
{t(($) => $['auth.oauthCredentialPermissionDescription'], { ns: 'plugin' })}
</DialogDescription>
- <DialogCloseButton
+ <DialogHeaderCloseButton
aria-label={t(($) => $['operation.close'], { ns: 'common' })}
disabled={loading}
/>
diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/common-modal.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/common-modal.tsx
index 93d4a856a1e..b123fe30a54 100644
--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/common-modal.tsx
+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/common-modal.tsx
@@ -5,10 +5,10 @@ import { cn } from '@langgenius/dify-ui/cn'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { useTranslation } from 'react-i18next'
@@ -79,7 +79,7 @@ function CommonCreateModalContent({ onClose, createType, builder }: Omit<Props,
<DialogTitle>
{t(($) => $[MODAL_TITLE_KEY_MAP[createType]], { ns: 'pluginTrigger' })}
</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody>
diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/oauth-client.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/oauth-client.tsx
index 3690c06bb60..66b444b0bf7 100644
--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/oauth-client.tsx
+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/oauth-client.tsx
@@ -7,10 +7,10 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { useCallback } from 'react'
@@ -77,7 +77,7 @@ export const OAuthClientSettingsModal = ({
<DialogContent backdropProps={{ forceRender: true }}>
<DialogHeader>
<DialogTitle>{title}</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody>
<div className="mb-2 system-sm-medium text-text-secondary">
diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/apikey-edit-modal.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/apikey-edit-modal.tsx
index bbe5f309a31..20bdac1f6ef 100644
--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/apikey-edit-modal.tsx
+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/apikey-edit-modal.tsx
@@ -6,10 +6,10 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { isEqual } from 'es-toolkit/predicate'
@@ -331,7 +331,7 @@ export const ApiKeyEditModal = ({ onClose, subscription, pluginDetail }: Props)
<DialogContent backdropProps={{ forceRender: true }}>
<DialogHeader>
<DialogTitle>{title}</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody>
{pluginDetail && <ReadmeEntrance pluginDetail={pluginDetail} presentation="dialog" />}
diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/manual-edit-modal.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/manual-edit-modal.tsx
index 681f86da946..1a4c5962bdd 100644
--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/manual-edit-modal.tsx
+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/manual-edit-modal.tsx
@@ -6,10 +6,10 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { isEqual } from 'es-toolkit/predicate'
@@ -152,7 +152,7 @@ export const ManualEditModal = ({ onClose, subscription, pluginDetail }: Props)
<DialogContent backdropProps={{ forceRender: true }}>
<DialogHeader>
<DialogTitle>{title}</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody>
{pluginDetail && <ReadmeEntrance pluginDetail={pluginDetail} presentation="dialog" />}
diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/oauth-edit-modal.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/oauth-edit-modal.tsx
index 05ad9b54b89..770e275295e 100644
--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/oauth-edit-modal.tsx
+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/edit/oauth-edit-modal.tsx
@@ -6,10 +6,10 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { isEqual } from 'es-toolkit/predicate'
@@ -177,7 +177,7 @@ export const OAuthEditModal = ({ onClose, subscription, pluginDetail }: Props) =
<DialogContent backdropProps={{ forceRender: true }}>
<DialogHeader>
<DialogTitle>{title}</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody>
{pluginDetail && <ReadmeEntrance pluginDetail={pluginDetail} presentation="dialog" />}
diff --git a/web/app/components/plugins/plugin-detail-panel/tool-selector/components/schema-dialog.tsx b/web/app/components/plugins/plugin-detail-panel/tool-selector/components/schema-dialog.tsx
index 079722d2180..c59a06d22f1 100644
--- a/web/app/components/plugins/plugin-detail-panel/tool-selector/components/schema-dialog.tsx
+++ b/web/app/components/plugins/plugin-detail-panel/tool-selector/components/schema-dialog.tsx
@@ -4,9 +4,9 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
DialogTrigger,
} from '@langgenius/dify-ui/dialog'
@@ -69,7 +69,7 @@ export function SchemaDialog({ schema, rootName, compact = false }: SchemaDialog
<DialogTitle>
{t(($) => $['nodes.agent.parameterSchema'], { ns: 'workflowAgent' })}
</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody>
<MittProvider>
diff --git a/web/app/components/plugins/plugin-mutation-model/index.tsx b/web/app/components/plugins/plugin-mutation-model/index.tsx
index 18cfc9d9904..29327568611 100644
--- a/web/app/components/plugins/plugin-mutation-model/index.tsx
+++ b/web/app/components/plugins/plugin-mutation-model/index.tsx
@@ -5,10 +5,10 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import * as React from 'react'
@@ -53,7 +53,7 @@ const PluginMutationModal: FC<Props> = ({
<DialogContent className="w-140">
<DialogHeader>
<DialogTitle>{modelTitle}</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody>
<div className="mb-2 system-md-regular text-text-secondary">{description}</div>
diff --git a/web/app/components/plugins/plugin-page/plugin-info.tsx b/web/app/components/plugins/plugin-page/plugin-info.tsx
index dfe9d8327d6..260ee9a449c 100644
--- a/web/app/components/plugins/plugin-page/plugin-info.tsx
+++ b/web/app/components/plugins/plugin-page/plugin-info.tsx
@@ -3,9 +3,9 @@ import type { FC } from 'react'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import * as React from 'react'
@@ -34,7 +34,7 @@ const PlugInfo: FC<Props> = ({ repository, release, packageName, onHide }) => {
<DialogContent className="w-120">
<DialogHeader>
<DialogTitle>{t(($) => $[`${i18nPrefix}.title`], { ns: 'plugin' })}</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody className="space-y-3">
{repository && (
diff --git a/web/app/components/plugins/update-plugin/__tests__/from-market-place.spec.tsx b/web/app/components/plugins/update-plugin/__tests__/from-market-place.spec.tsx
index aa6aea8210e..625d363acf9 100644
--- a/web/app/components/plugins/update-plugin/__tests__/from-market-place.spec.tsx
+++ b/web/app/components/plugins/update-plugin/__tests__/from-market-place.spec.tsx
@@ -273,8 +273,10 @@ describe('UpdateFromMarketplace', () => {
it.each([
{ warning: false, button: 'common.operation.cancel' },
{ warning: true, button: 'app.newApp.Cancel' },
+ { warning: false, button: 'common.operation.close' },
+ { warning: true, button: 'common.operation.close' },
])(
- 'cancels before any update or exclusion request (warning=$warning)',
+ 'cancels via $button before any update or exclusion request (warning=$warning)',
async ({ warning, button }) => {
const user = userEvent.setup()
const onCancel = vi.fn()
diff --git a/web/app/components/plugins/update-plugin/downgrade-warning.tsx b/web/app/components/plugins/update-plugin/downgrade-warning.tsx
index 7d02f037f5f..ceb9abefeb3 100644
--- a/web/app/components/plugins/update-plugin/downgrade-warning.tsx
+++ b/web/app/components/plugins/update-plugin/downgrade-warning.tsx
@@ -1,5 +1,10 @@
import { Button } from '@langgenius/dify-ui/button'
-import { DialogTitle } from '@langgenius/dify-ui/dialog'
+import {
+ DialogFooter,
+ DialogHeader,
+ DialogHeaderCloseButton,
+ DialogTitle,
+} from '@langgenius/dify-ui/dialog'
import { useTranslation } from 'react-i18next'
const i18nPrefix = 'autoUpdate.pluginDowngradeWarning'
@@ -10,17 +15,21 @@ type Props = Readonly<{
onExcludeAndDowngrade: () => void
}>
const DowngradeWarningModal = ({ onCancel, onJustDowngrade, onExcludeAndDowngrade }: Props) => {
- const { t } = useTranslation(['app', 'plugin'])
+ const { t } = useTranslation(['app', 'plugin', 'common'])
return (
<>
- <div className="flex flex-col items-start gap-2 self-stretch">
+ <DialogHeader
+ // oxlint-disable-next-line shadcn/no-restyle -- Preserve the warning's 8px title-to-description gap.
+ className="pb-2"
+ >
<DialogTitle>{t(($) => $[`${i18nPrefix}.title`], { ns: 'plugin' })}</DialogTitle>
- <div className="system-md-regular text-text-secondary">
- {t(($) => $[`${i18nPrefix}.description`], { ns: 'plugin' })}
- </div>
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ </DialogHeader>
+ <div className="px-6 pb-4 system-md-regular text-text-secondary">
+ {t(($) => $[`${i18nPrefix}.description`], { ns: 'plugin' })}
</div>
- <div className="mt-9 flex items-start justify-end space-x-2 self-stretch">
+ <DialogFooter>
<Button variant="secondary" onClick={() => onCancel()}>
{t(($) => $['newApp.Cancel'], { ns: 'app' })}
</Button>
@@ -30,7 +39,7 @@ const DowngradeWarningModal = ({ onCancel, onJustDowngrade, onExcludeAndDowngrad
<Button variant="primary" onClick={onExcludeAndDowngrade}>
{t(($) => $[`${i18nPrefix}.exclude`], { ns: 'plugin' })}
</Button>
- </div>
+ </DialogFooter>
</>
)
}
diff --git a/web/app/components/plugins/update-plugin/from-market-place.tsx b/web/app/components/plugins/update-plugin/from-market-place.tsx
index 533353dbd3f..d958dd52533 100644
--- a/web/app/components/plugins/update-plugin/from-market-place.tsx
+++ b/web/app/components/plugins/update-plugin/from-market-place.tsx
@@ -5,10 +5,10 @@ import { cn } from '@langgenius/dify-ui/cn'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import * as React from 'react'
@@ -155,17 +155,14 @@ const UpdatePluginModal = ({
<Dialog open onOpenChange={() => onCancel()}>
<DialogContent
backdropProps={{ forceRender: true }}
- className={cn('min-w-140', doShowDowngradeWarningModal && 'min-w-160 p-6')}
+ className={cn('min-w-140', doShowDowngradeWarningModal && 'min-w-160')}
>
{doShowDowngradeWarningModal && (
- <>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
- <DowngradeWarningModal
- onCancel={onCancel}
- onJustDowngrade={handleConfirm}
- onExcludeAndDowngrade={handleExcludeAndDownload}
- />
- </>
+ <DowngradeWarningModal
+ onCancel={onCancel}
+ onJustDowngrade={handleConfirm}
+ onExcludeAndDowngrade={handleExcludeAndDownload}
+ />
)}
{!doShowDowngradeWarningModal && (
<>
@@ -179,7 +176,9 @@ const UpdatePluginModal = ({
{ ns: 'plugin' },
)}
</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton
+ aria-label={t(($) => $['operation.close'], { ns: 'common' })}
+ />
</DialogHeader>
<DialogBody>
<div className="mb-2 system-md-regular text-text-secondary">
diff --git a/web/app/components/rag-pipeline/components/publish-as-knowledge-pipeline-modal.tsx b/web/app/components/rag-pipeline/components/publish-as-knowledge-pipeline-modal.tsx
index 9e9b0b0a504..d3025f8b183 100644
--- a/web/app/components/rag-pipeline/components/publish-as-knowledge-pipeline-modal.tsx
+++ b/web/app/components/rag-pipeline/components/publish-as-knowledge-pipeline-modal.tsx
@@ -5,10 +5,10 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Field, FieldLabel } from '@langgenius/dify-ui/field'
@@ -84,7 +84,9 @@ const PublishAsKnowledgePipelineModal = ({
>
<DialogHeader>
<DialogTitle>{t(($) => $['common.publishAs'], { ns: 'pipeline' })}</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton
+ aria-label={t(($) => $['operation.close'], { ns: 'common' })}
+ />
</DialogHeader>
<DialogBody>
<div className="mb-5 flex">
diff --git a/web/app/components/rag-pipeline/components/update-dsl-modal.tsx b/web/app/components/rag-pipeline/components/update-dsl-modal.tsx
index c4d06e83db9..b7b7cecb2b1 100644
--- a/web/app/components/rag-pipeline/components/update-dsl-modal.tsx
+++ b/web/app/components/rag-pipeline/components/update-dsl-modal.tsx
@@ -4,10 +4,10 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { RiAlertFill, RiFileDownloadLine } from '@remixicon/react'
@@ -48,7 +48,9 @@ const UpdateDSLModal = ({ onCancel, onBackup, onImport }: UpdateDSLModalProps) =
<DialogContent className="w-120">
<DialogHeader>
<DialogTitle>{t(($) => $['common.importDSL'], { ns: 'workflow' })}</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton
+ aria-label={t(($) => $['operation.close'], { ns: 'common' })}
+ />
</DialogHeader>
<DialogBody>
<div className="relative mb-2 flex grow gap-0.5 overflow-hidden rounded-xl border-[0.5px] border-components-panel-border bg-components-panel-bg-blur p-2 shadow-xs">
diff --git a/web/app/components/snippets/create-snippet-dialog.tsx b/web/app/components/snippets/create-snippet-dialog.tsx
index a811fe71865..a5650b86691 100644
--- a/web/app/components/snippets/create-snippet-dialog.tsx
+++ b/web/app/components/snippets/create-snippet-dialog.tsx
@@ -6,10 +6,10 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Input } from '@langgenius/dify-ui/input'
@@ -121,7 +121,9 @@ export function CreateSnippetDialog({
<DialogTitle>
{title || t(($) => $['snippet.createDialogTitle'], { ns: 'workflow' })}
</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton
+ aria-label={t(($) => $['operation.close'], { ns: 'common' })}
+ />
</DialogHeader>
<DialogBody className="space-y-4">
diff --git a/web/app/components/snippets/import-snippet-dsl-dialog.tsx b/web/app/components/snippets/import-snippet-dsl-dialog.tsx
index c8c9e200d1a..79835194144 100644
--- a/web/app/components/snippets/import-snippet-dsl-dialog.tsx
+++ b/web/app/components/snippets/import-snippet-dsl-dialog.tsx
@@ -16,10 +16,10 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Input } from '@langgenius/dify-ui/input'
@@ -240,7 +240,9 @@ function ImportSnippetDSLDialog({ isOpen, onClose }: ImportSnippetDSLDialogProps
<DialogContent className="w-120">
<DialogHeader>
<DialogTitle>{t(($) => $.importDialogTitle, { ns: 'snippet' })}</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton
+ aria-label={t(($) => $['operation.close'], { ns: 'common' })}
+ />
</DialogHeader>
<Tabs className="contents" value={currentTab} onValueChange={handleTabChange}>
<TabsList
diff --git a/web/app/components/tools/mcp/mcp-server-modal.tsx b/web/app/components/tools/mcp/mcp-server-modal.tsx
index f20b004e0b4..af8c7c10017 100644
--- a/web/app/components/tools/mcp/mcp-server-modal.tsx
+++ b/web/app/components/tools/mcp/mcp-server-modal.tsx
@@ -4,10 +4,10 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Separator } from '@langgenius/dify-ui/separator'
@@ -115,7 +115,7 @@ const MCPServerModal = ({ appID, latestParams = [], data, show, onHide, appInfo
? t(($) => $['mcp.server.modal.addTitle'], { ns: 'tools' })
: t(($) => $['mcp.server.modal.editTitle'], { ns: 'tools' })}
</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody className="space-y-5">
<div className="space-y-0.5">
diff --git a/web/app/components/tools/mcp/modal.tsx b/web/app/components/tools/mcp/modal.tsx
index c122479926b..0f58b866c8d 100644
--- a/web/app/components/tools/mcp/modal.tsx
+++ b/web/app/components/tools/mcp/modal.tsx
@@ -10,10 +10,10 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { IconButton } from '@langgenius/dify-ui/icon-button'
@@ -161,7 +161,7 @@ const MCPModalContent: FC<MCPModalContentProps> = ({ data, onConfirm, onHide })
? t(($) => $['mcp.modal.editTitle'], { ns: 'tools' })
: t(($) => $['mcp.modal.title'], { ns: 'tools' })}
</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody className="space-y-5">
diff --git a/web/app/components/tools/workflow-tool/confirm-modal/index.tsx b/web/app/components/tools/workflow-tool/confirm-modal/index.tsx
index d7881a81e76..d42a0773380 100644
--- a/web/app/components/tools/workflow-tool/confirm-modal/index.tsx
+++ b/web/app/components/tools/workflow-tool/confirm-modal/index.tsx
@@ -3,11 +3,11 @@
import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { useTranslation } from 'react-i18next'
@@ -41,7 +41,7 @@ const ConfirmModal = ({ show, onConfirm, onClose }: ConfirmModalProps) => {
<DialogDescription>
{t(($) => $['createTool.confirmTip'], { ns: 'tools' })}
</DialogDescription>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogFooter>
<Button onClick={onClose}>{t(($) => $['operation.cancel'], { ns: 'common' })}</Button>
diff --git a/web/app/components/workflow-app/components/workflow-onboarding-modal/index.tsx b/web/app/components/workflow-app/components/workflow-onboarding-modal/index.tsx
index 6dc2b8a4602..6e647e407d5 100644
--- a/web/app/components/workflow-app/components/workflow-onboarding-modal/index.tsx
+++ b/web/app/components/workflow-app/components/workflow-onboarding-modal/index.tsx
@@ -4,10 +4,10 @@ import type { BlockDefaultValue } from '@/app/components/workflow/block-selector
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { useTranslation } from 'react-i18next'
@@ -38,7 +38,7 @@ const WorkflowOnboardingModal: FC<WorkflowOnboardingModalProps> = ({
<DialogDescription>
{t(($) => $['onboarding.description'], { ns: 'workflow' })}
</DialogDescription>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody>
diff --git a/web/app/components/workflow/__tests__/workflow-edge-events.spec.tsx b/web/app/components/workflow/__tests__/workflow-edge-events.spec.tsx
index e9b55a590ec..eedb1d1240b 100644
--- a/web/app/components/workflow/__tests__/workflow-edge-events.spec.tsx
+++ b/web/app/components/workflow/__tests__/workflow-edge-events.spec.tsx
@@ -448,6 +448,12 @@ it('deletes a reply through the real thread confirmation and refreshes its conte
await screen.findByRole('button', { name: 'workflow.keyboard.openComment:{"name":"Alice"}' }),
)
expect(await screen.findByText('Remove this reply')).toBeInTheDocument()
+ // Let the thread's initial focus settle before opening its reply menu.
+ await waitFor(() =>
+ expect(
+ screen.getByPlaceholderText('workflowComments.comments.placeholder.reply'),
+ ).toHaveFocus(),
+ )
await user.click(
screen.getByRole('button', { name: 'workflowComments.comments.aria.replyActions' }),
)
diff --git a/web/app/components/workflow/nodes/agent-v2/components/save-inline-agent-to-roster-dialog.tsx b/web/app/components/workflow/nodes/agent-v2/components/save-inline-agent-to-roster-dialog.tsx
index db256792193..918d4e5f07d 100644
--- a/web/app/components/workflow/nodes/agent-v2/components/save-inline-agent-to-roster-dialog.tsx
+++ b/web/app/components/workflow/nodes/agent-v2/components/save-inline-agent-to-roster-dialog.tsx
@@ -13,11 +13,11 @@ import type {
import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Form } from '@langgenius/dify-ui/form'
@@ -73,7 +73,10 @@ function SaveInlineAgentToRosterFormSession({
<DialogDescription className="sr-only">
{t(($) => $['roster.saveToRosterDialog.description'], { ns: 'agentRoster' })}
</DialogDescription>
- <DialogCloseButton aria-label={tCommon(($) => $['operation.close'])} disabled={pending} />
+ <DialogHeaderCloseButton
+ aria-label={tCommon(($) => $['operation.close'])}
+ disabled={pending}
+ />
</DialogHeader>
<Form<AgentFormValues>
className="contents"
diff --git a/web/app/components/workflow/nodes/human-input/components/delivery-method/email-configure-modal.tsx b/web/app/components/workflow/nodes/human-input/components/delivery-method/email-configure-modal.tsx
index a1f13b5d69f..1658fb4ab3c 100644
--- a/web/app/components/workflow/nodes/human-input/components/delivery-method/email-configure-modal.tsx
+++ b/web/app/components/workflow/nodes/human-input/components/delivery-method/email-configure-modal.tsx
@@ -4,11 +4,11 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Input } from '@langgenius/dify-ui/input'
@@ -118,7 +118,7 @@ const EmailConfigureModal = ({
ns: 'workflowHumanInput',
})}
</DialogDescription>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody className="space-y-5">
<div>
diff --git a/web/app/components/workflow/nodes/human-input/components/delivery-method/test-email-sender.tsx b/web/app/components/workflow/nodes/human-input/components/delivery-method/test-email-sender.tsx
index 4b485a9305d..2eca234fd85 100644
--- a/web/app/components/workflow/nodes/human-input/components/delivery-method/test-email-sender.tsx
+++ b/web/app/components/workflow/nodes/human-input/components/delivery-method/test-email-sender.tsx
@@ -5,10 +5,10 @@ import { cn } from '@langgenius/dify-ui/cn'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Separator } from '@langgenius/dify-ui/separator'
@@ -396,7 +396,7 @@ const EmailSenderContent = ({
/>
</div>
)}
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
{hasBody && (
<DialogBody>
diff --git a/web/app/components/workflow/update-dsl-modal.tsx b/web/app/components/workflow/update-dsl-modal.tsx
index 2bd28ee7e90..aca1e223b42 100644
--- a/web/app/components/workflow/update-dsl-modal.tsx
+++ b/web/app/components/workflow/update-dsl-modal.tsx
@@ -8,10 +8,10 @@ import {
Dialog,
DialogBody,
DialogClose,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { RiAlertFill, RiFileDownloadLine } from '@remixicon/react'
@@ -310,7 +310,7 @@ function ImportForm({
>
<DialogHeader>
<DialogTitle>{t(($) => $.importApp, { ns: 'app' })}</DialogTitle>
- <DialogCloseButton
+ <DialogHeaderCloseButton
aria-label={t(($) => $['operation.close'], { ns: 'common' })}
disabled={isImporting}
/>
diff --git a/web/app/education/expire-notice/modal.tsx b/web/app/education/expire-notice/modal.tsx
index aa6403b28d9..ec4d004c923 100644
--- a/web/app/education/expire-notice/modal.tsx
+++ b/web/app/education/expire-notice/modal.tsx
@@ -4,10 +4,10 @@ import { Button, buttonVariants } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { useSuspenseQuery } from '@tanstack/react-query'
@@ -65,7 +65,7 @@ const ExpireNoticeModal: React.FC<Props> = ({ expireAt, expired, onClose }) => {
interpolation: { escapeValue: false },
})}
</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody>
diff --git a/web/features/agent-v2/agent-detail/configure/components/orchestrate/files/upload-dialog.tsx b/web/features/agent-v2/agent-detail/configure/components/orchestrate/files/upload-dialog.tsx
index 38ada2e4247..be6b900a122 100644
--- a/web/features/agent-v2/agent-detail/configure/components/orchestrate/files/upload-dialog.tsx
+++ b/web/features/agent-v2/agent-detail/configure/components/orchestrate/files/upload-dialog.tsx
@@ -13,11 +13,11 @@ import { cn } from '@langgenius/dify-ui/cn'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { FileTreeIcon } from '@langgenius/dify-ui/file-tree'
@@ -330,7 +330,7 @@ export function AgentFileUploadDialog({
<DialogDescription>
{t(($) => $['agentDetail.configure.files.upload.description'])}
</DialogDescription>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody>
<AgentFileUploader file={file} onChange={setFile} />
diff --git a/web/features/agent-v2/agent-detail/configure/components/orchestrate/skills/upload-dialog.tsx b/web/features/agent-v2/agent-detail/configure/components/orchestrate/skills/upload-dialog.tsx
index 36d9ea3d618..b1930b8d24c 100644
--- a/web/features/agent-v2/agent-detail/configure/components/orchestrate/skills/upload-dialog.tsx
+++ b/web/features/agent-v2/agent-detail/configure/components/orchestrate/skills/upload-dialog.tsx
@@ -10,11 +10,11 @@ import { cn } from '@langgenius/dify-ui/cn'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { IconButton } from '@langgenius/dify-ui/icon-button'
@@ -334,7 +334,7 @@ export function AgentSkillUploadDialog({
<DialogDescription>
{t(($) => $['agentDetail.configure.skills.upload.description'])}
</DialogDescription>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody>
<AgentSkillPackageUploader
diff --git a/web/features/agent-v2/agent-detail/configure/components/orchestrate/tools/cli-tool/dialog.tsx b/web/features/agent-v2/agent-detail/configure/components/orchestrate/tools/cli-tool/dialog.tsx
index 77ce4ad0b02..f75e937d802 100644
--- a/web/features/agent-v2/agent-detail/configure/components/orchestrate/tools/cli-tool/dialog.tsx
+++ b/web/features/agent-v2/agent-detail/configure/components/orchestrate/tools/cli-tool/dialog.tsx
@@ -8,11 +8,11 @@ import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Field, FieldDescription, FieldLabel } from '@langgenius/dify-ui/field'
@@ -178,7 +178,7 @@ export function CliToolDialog({
<DialogDescription>
{t(($) => $['agentDetail.configure.tools.cliDialog.description'])}
</DialogDescription>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<Form<CliToolFormValues> className="contents" onFormSubmit={handleSubmit}>
<DialogBody className="flex flex-col gap-4">
diff --git a/web/features/agent-v2/roster/components/create-agent-dialog.tsx b/web/features/agent-v2/roster/components/create-agent-dialog.tsx
index 489415cb4b5..b4018bf3fe0 100644
--- a/web/features/agent-v2/roster/components/create-agent-dialog.tsx
+++ b/web/features/agent-v2/roster/components/create-agent-dialog.tsx
@@ -5,11 +5,11 @@ import type { AgentFormValues, AgentIconSelection } from './agent-form'
import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
DialogTrigger,
} from '@langgenius/dify-ui/dialog'
@@ -60,7 +60,10 @@ function CreateAgentFormSession({
<DialogDescription className="sr-only">
{t(($) => $['roster.createDialog.description'], { ns: 'agentRoster' })}
</DialogDescription>
- <DialogCloseButton aria-label={tCommon(($) => $['operation.close'])} disabled={pending} />
+ <DialogHeaderCloseButton
+ aria-label={tCommon(($) => $['operation.close'])}
+ disabled={pending}
+ />
</DialogHeader>
<Form<AgentFormValues>
className="contents"
diff --git a/web/features/agent-v2/roster/components/duplicate-agent-dialog.tsx b/web/features/agent-v2/roster/components/duplicate-agent-dialog.tsx
index 1f98e427932..7de0173e0c4 100644
--- a/web/features/agent-v2/roster/components/duplicate-agent-dialog.tsx
+++ b/web/features/agent-v2/roster/components/duplicate-agent-dialog.tsx
@@ -5,11 +5,11 @@ import type { AgentFormSource, AgentFormValues, AgentIconSelection } from './age
import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Form } from '@langgenius/dify-ui/form'
@@ -71,7 +71,10 @@ function DuplicateAgentFormSession({
name: initialValues.sourceName,
})}
</DialogDescription>
- <DialogCloseButton aria-label={tCommon(($) => $['operation.close'])} disabled={pending} />
+ <DialogHeaderCloseButton
+ aria-label={tCommon(($) => $['operation.close'])}
+ disabled={pending}
+ />
</DialogHeader>
<Form<AgentFormValues>
className="contents"
diff --git a/web/features/agent-v2/roster/components/edit-agent-dialog.tsx b/web/features/agent-v2/roster/components/edit-agent-dialog.tsx
index 05b8999701f..c4eea353d17 100644
--- a/web/features/agent-v2/roster/components/edit-agent-dialog.tsx
+++ b/web/features/agent-v2/roster/components/edit-agent-dialog.tsx
@@ -5,11 +5,11 @@ import type { AgentFormSource, AgentFormValues, AgentIconSelection } from './age
import { Button } from '@langgenius/dify-ui/button'
import {
Dialog,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { Form } from '@langgenius/dify-ui/form'
@@ -86,7 +86,10 @@ function EditAgentFormSession({
<DialogDescription className="sr-only">
{t(($) => $['roster.editDialog.description'], { ns: 'agentRoster' })}
</DialogDescription>
- <DialogCloseButton aria-label={tCommon(($) => $['operation.close'])} disabled={pending} />
+ <DialogHeaderCloseButton
+ aria-label={tCommon(($) => $['operation.close'])}
+ disabled={pending}
+ />
</DialogHeader>
<Form<AgentFormValues>
className="contents"
diff --git a/web/features/skills/detail/upload-dialogs.tsx b/web/features/skills/detail/upload-dialogs.tsx
index 8591e96fda3..803a4fa6189 100644
--- a/web/features/skills/detail/upload-dialogs.tsx
+++ b/web/features/skills/detail/upload-dialogs.tsx
@@ -8,11 +8,11 @@ import {
Dialog,
DialogBody,
DialogClose,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { useTranslation } from 'react-i18next'
@@ -176,7 +176,7 @@ export function SkillUploadReviewDialog({
<DialogHeader>
<DialogTitle>{t(($) => $['skillManagement.detail.uploadReviewTitle'])}</DialogTitle>
<DialogDescription>{summary}</DialogDescription>
- <DialogCloseButton aria-label={tCommon(($) => $['operation.close'])} />
+ <DialogHeaderCloseButton aria-label={tCommon(($) => $['operation.close'])} />
</DialogHeader>
<DialogBody className="flex flex-col gap-4">
{candidateItems.length > 0 && (
@@ -247,7 +247,7 @@ export function SkillUploadFailuresDialog({
total: items.length,
})}
</DialogDescription>
- <DialogCloseButton aria-label={tCommon(($) => $['operation.close'])} />
+ <DialogHeaderCloseButton aria-label={tCommon(($) => $['operation.close'])} />
</DialogHeader>
<DialogBody className="flex flex-col gap-1">
{failedItems.map((item) => (
diff --git a/web/features/skills/detail/version-panel.tsx b/web/features/skills/detail/version-panel.tsx
index a50e69c155c..3874acb5005 100644
--- a/web/features/skills/detail/version-panel.tsx
+++ b/web/features/skills/detail/version-panel.tsx
@@ -18,11 +18,11 @@ import {
Dialog,
DialogBody,
DialogClose,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import {
@@ -354,7 +354,7 @@ function VersionRow({
<DialogDescription className="sr-only">
{t(($) => $['skillManagement.detail.renameVersionPrompt'])}
</DialogDescription>
- <DialogCloseButton aria-label={tCommon(($) => $['operation.close'])} />
+ <DialogHeaderCloseButton aria-label={tCommon(($) => $['operation.close'])} />
</DialogHeader>
<DialogBody className="flex flex-col gap-y-4">
<Field name="versionTitle">
diff --git a/web/features/skills/page.tsx b/web/features/skills/page.tsx
index c5d0ce17fe7..843842d5b8e 100644
--- a/web/features/skills/page.tsx
+++ b/web/features/skills/page.tsx
@@ -20,11 +20,11 @@ import {
Dialog,
DialogBody,
DialogClose,
- DialogCloseButton,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import {
@@ -893,7 +893,10 @@ function ImportSkillDialogForm({
>
<DialogHeader>
<DialogTitle>{t(($) => $['skillManagement.importDialog.title'])}</DialogTitle>
- <DialogCloseButton aria-label={tCommon(($) => $['operation.close'])} disabled={importing} />
+ <DialogHeaderCloseButton
+ aria-label={tCommon(($) => $['operation.close'])}
+ disabled={importing}
+ />
</DialogHeader>
<DialogBody>
<div
diff --git a/web/features/tag-management/components/tag-management-modal.tsx b/web/features/tag-management/components/tag-management-modal.tsx
index 17ad2fd7e75..0e575a862ad 100644
--- a/web/features/tag-management/components/tag-management-modal.tsx
+++ b/web/features/tag-management/components/tag-management-modal.tsx
@@ -3,9 +3,9 @@ import type { TagType } from '@dify/contracts/api/console/tags/types.gen'
import {
Dialog,
DialogBody,
- DialogCloseButton,
DialogContent,
DialogHeader,
+ DialogHeaderCloseButton,
DialogTitle,
} from '@langgenius/dify-ui/dialog'
import { useMutation, useQuery } from '@tanstack/react-query'
@@ -82,7 +82,7 @@ export const TagManagementModal = ({
<DialogContent className="w-150">
<DialogHeader>
<DialogTitle>{t(($) => $['tag.manageTags'], { ns: 'common' })}</DialogTitle>
- <DialogCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
+ <DialogHeaderCloseButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} />
</DialogHeader>
<DialogBody className="flex flex-wrap gap-2">
<input