From 209f4e88d06899f23df0ea728c3d9e0c7ec04aea Mon Sep 17 00:00:00 2001 From: Wanpan Date: Sun, 14 Sep 2025 22:46:16 +0800 Subject: [PATCH 01/10] chore: Add deprecated tips for DropDownProps (#55020) * fix: Add deprecated tips for DropDownProps * fix: update --- components/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/components/index.ts b/components/index.ts index dd9e76a6c3..0f8d8fee91 100644 --- a/components/index.ts +++ b/components/index.ts @@ -56,6 +56,7 @@ export { default as Dropdown } from './dropdown'; export type { // typo, but we need to support it for backwards compatibility // https://github.com/ant-design/ant-design/pull/35161 + /** @deprecated Use `DropdownProps` instead. */ DropdownProps as DropDownProps, DropdownProps, } from './dropdown'; From 2e8f162ff72b6612ded98fd0190155ef298deb66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E6=9E=AB?= <7971419+crazyair@users.noreply.github.com> Date: Mon, 15 Sep 2025 10:57:32 +0800 Subject: [PATCH 02/10] site: stackblitz support zh registry (#54973) --- .dumi/theme/builtins/Previewer/Actions.tsx | 4 ++++ .dumi/theme/builtins/Previewer/stackblitzConfig.ts | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/.dumi/theme/builtins/Previewer/Actions.tsx b/.dumi/theme/builtins/Previewer/Actions.tsx index d9a49a4e6d..094adfbf4d 100644 --- a/.dumi/theme/builtins/Previewer/Actions.tsx +++ b/.dumi/theme/builtins/Previewer/Actions.tsx @@ -7,6 +7,7 @@ import { FormattedMessage, useSiteData } from 'dumi'; import LZString from 'lz-string'; import packageJson from '../../../../package.json'; +import useLocale from '../../../hooks/useLocale'; import ClientOnly from '../../common/ClientOnly'; import CodePenIcon from '../../icons/CodePenIcon'; import CodeSandboxIcon from '../../icons/CodeSandboxIcon'; @@ -54,6 +55,8 @@ const Actions: React.FC = ({ entryCode, styleCode, }) => { + const [, lang] = useLocale(); + const isZhCN = lang === 'cn'; const { pkg } = useSiteData(); const { codeType } = React.use(DemoContext); const codeSandboxIconRef = useRef(null); @@ -214,6 +217,7 @@ createRoot(document.getElementById('container')).render(); demoJsContent, indexCssContent, suffix, + isZhCN, }); return ( diff --git a/.dumi/theme/builtins/Previewer/stackblitzConfig.ts b/.dumi/theme/builtins/Previewer/stackblitzConfig.ts index 70d48a2801..22233ee81a 100644 --- a/.dumi/theme/builtins/Previewer/stackblitzConfig.ts +++ b/.dumi/theme/builtins/Previewer/stackblitzConfig.ts @@ -6,12 +6,14 @@ const getStackblitzConfig = ({ indexCssContent = '', demoJsContent = '', suffix = '', + isZhCN = false, }: { title?: string; dependencies: Record; indexCssContent?: string; demoJsContent?: string; suffix?: string; + isZhCN?: boolean; }) => { const _suffix = suffix === 'tsx' ? suffix : 'jsx'; const packageJSON = { @@ -196,6 +198,9 @@ export default tseslint.config([ if (indexCssContent) { files = { ...files, 'src/index.css': indexCssContent }; } + if (isZhCN) { + files = { ...files, '.npmrc': `registry=https://registry.npmmirror.com/` }; + } const project: Project = { title, description: '', template: 'node', files }; return project; From c172411eb42812ccd2ee3b8b189d89edfdefbcfc Mon Sep 17 00:00:00 2001 From: Guo Yunhe Date: Mon, 15 Sep 2025 10:58:55 +0800 Subject: [PATCH 03/10] fix(Button): icon-only button padding affected by theme (#54970) --- .../__snapshots__/demo-extend.test.ts.snap | 284 +++++++++++++++++- .../__tests__/__snapshots__/demo.test.ts.snap | 284 +++++++++++++++++- components/button/demo/debug-icon.tsx | 36 ++- components/button/style/index.ts | 16 +- 4 files changed, 606 insertions(+), 14 deletions(-) diff --git a/components/button/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/button/__tests__/__snapshots__/demo-extend.test.ts.snap index bade760515..51eeb2bd68 100644 --- a/components/button/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/button/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -1658,7 +1658,7 @@ Array [
, + , +

+ Icon-only button should not be affected by paddingInline / paddingInlineLG / paddingInlineSM +

, +
+ + + +
, +
+ + + +
, +
+ + + +
, ] `; diff --git a/components/button/__tests__/__snapshots__/demo.test.ts.snap b/components/button/__tests__/__snapshots__/demo.test.ts.snap index df271d7711..3ddde280a1 100644 --- a/components/button/__tests__/__snapshots__/demo.test.ts.snap +++ b/components/button/__tests__/__snapshots__/demo.test.ts.snap @@ -1562,7 +1562,7 @@ Array [
, + , +

+ Icon-only button should not be affected by paddingInline / paddingInlineLG / paddingInlineSM +

, +
+ + + +
, +
+ + + +
, +
+ + + +
, ] `; diff --git a/components/button/demo/debug-icon.tsx b/components/button/demo/debug-icon.tsx index f9b312cd9e..5b4302ef89 100644 --- a/components/button/demo/debug-icon.tsx +++ b/components/button/demo/debug-icon.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { MinusSquareOutlined, SearchOutlined } from '@ant-design/icons'; -import { Button, ConfigProvider, Divider, Flex, Radio, Tooltip, Input } from 'antd'; +import { ArrowDownOutlined, MinusSquareOutlined, SearchOutlined } from '@ant-design/icons'; +import { Button, ConfigProvider, Divider, Flex, Input, Radio, Tooltip } from 'antd'; import type { ConfigProviderProps } from 'antd'; import { FiColumns } from 'react-icons/fi'; @@ -99,6 +99,7 @@ const App: React.FC = () => { style={{ transform: 'scale(3)', transformOrigin: 'left top', + marginBottom: 100, }} >