From 5d7ae56deb9257cebaf0bc5ea98875c4170a1b59 Mon Sep 17 00:00:00 2001
From: yyh <92089059+lyzno1@users.noreply.github.com>
Date: Sat, 4 Jul 2026 22:59:24 +0800
Subject: [PATCH] fix(dify-ui): standardize story focus indicators (#38417)
---
.../src/alert-dialog/index.stories.tsx | 2 +-
.../dify-ui/src/collapsible/index.stories.tsx | 2 +-
.../src/context-menu/index.stories.tsx | 2 +-
packages/dify-ui/src/dialog/index.stories.tsx | 227 +++++++++++++++---
packages/dify-ui/src/dialog/index.tsx | 79 ++++--
.../src/dropdown-menu/index.stories.tsx | 2 +-
packages/dify-ui/src/kbd/index.stories.tsx | 4 +-
.../dify-ui/src/popover/index.stories.tsx | 6 +-
.../src/preview-card/index.stories.tsx | 8 +-
.../dify-ui/src/radio-group/index.stories.tsx | 2 +-
.../dify-ui/src/scroll-area/index.stories.tsx | 75 ------
packages/dify-ui/src/switch/index.stories.tsx | 2 +-
packages/dify-ui/src/toast/index.stories.tsx | 2 +-
.../dify-ui/src/tooltip/index.stories.tsx | 6 +-
14 files changed, 273 insertions(+), 146 deletions(-)
diff --git a/packages/dify-ui/src/alert-dialog/index.stories.tsx b/packages/dify-ui/src/alert-dialog/index.stories.tsx
index c8dcc6ac533..d00328270b9 100644
--- a/packages/dify-ui/src/alert-dialog/index.stories.tsx
+++ b/packages/dify-ui/src/alert-dialog/index.stories.tsx
@@ -13,7 +13,7 @@ import {
} from '.'
import { Button } from '../button'
-const triggerButtonClassName = 'rounded-lg border border-divider-subtle bg-components-button-secondary-bg px-3 py-1.5 text-sm text-text-secondary shadow-xs hover:bg-state-base-hover'
+const triggerButtonClassName = 'rounded-lg border border-divider-subtle bg-components-button-secondary-bg px-3 py-1.5 text-sm text-text-secondary shadow-xs outline-hidden hover:bg-state-base-hover focus-visible:ring-2 focus-visible:ring-state-accent-solid'
const meta = {
title: 'Base/UI/AlertDialog',
diff --git a/packages/dify-ui/src/collapsible/index.stories.tsx b/packages/dify-ui/src/collapsible/index.stories.tsx
index 291297e981d..4376161beb7 100644
--- a/packages/dify-ui/src/collapsible/index.stories.tsx
+++ b/packages/dify-ui/src/collapsible/index.stories.tsx
@@ -97,7 +97,7 @@ export const Controlled: Story = {
@@ -89,7 +152,7 @@ export const WithoutCloseButton: Story = {
render: () => (
-
setOpen(false)}>
@@ -170,7 +233,7 @@ const FormDialogDemo = () => {
return (