diff --git a/.dumi/hooks/useMenu.tsx b/.dumi/hooks/useMenu.tsx index d464195654..d8daa644a8 100644 --- a/.dumi/hooks/useMenu.tsx +++ b/.dumi/hooks/useMenu.tsx @@ -46,7 +46,7 @@ const useStyle = createStyles(({ css, cssVar }) => ({ font-weight: normal; font-size: ${cssVar.fontSizeSM}; opacity: 0.8; - margin-left: 4px; + margin-inline-start: ${cssVar.marginSM}; `, })); @@ -66,6 +66,7 @@ const MenuItemLabelWithTag: React.FC = (props) => { const { before, after, link, title, subtitle, search, tag, className } = props; const [locale] = useLocale(locales); + const getLocale = (name: string) => { return (locale as any)[name.toLowerCase()] ?? name; }; @@ -73,7 +74,7 @@ const MenuItemLabelWithTag: React.FC = (props) => { if (!before && !after) { return ( - + {title} {subtitle && {subtitle}} diff --git a/.dumi/pages/index/components/ComponentsList.tsx b/.dumi/pages/index/components/ComponentsList.tsx index 4884ea0a1b..727ef0459c 100644 --- a/.dumi/pages/index/components/ComponentsList.tsx +++ b/.dumi/pages/index/components/ComponentsList.tsx @@ -1,13 +1,14 @@ import React from 'react'; import { CustomerServiceOutlined, QuestionCircleOutlined, SyncOutlined } from '@ant-design/icons'; import { - Alert, + Card, Carousel, DatePicker, Flex, FloatButton, + Masonry, Modal, - Progress, + Splitter, Tag, Tour, Typography, @@ -181,29 +182,30 @@ const ComponentsList: React.FC = () => { ), }, - { - title: 'Progress', - type: 'update', - node: ( - - - - {locale.inProgress} - - - - {locale.success} - - - - {locale.taskFailed} - - - ), - }, + // { + // title: 'Progress', + // type: 'update', + // node: ( + // + // + // + // {locale.inProgress} + // + // + // + // {locale.success} + // + // + // + // {locale.taskFailed} + // + // + // ), + // }, + { title: 'Tour', - type: 'new', + type: 'update', node: ( { /> ), }, + { title: 'FloatButton', - type: 'new', + type: 'update', node: ( { // }, { - title: 'Alert', - type: 'update', + title: 'Splitter', + type: 'new', node: ( - + + + + First + + + + + + + + Second + + + + + ), + }, + + { + title: 'Masonry', + type: 'new', + node: ( + ( + + {index + 1} + + )} /> ), }, + + // { + // title: 'Alert', + // type: 'update', + // node: ( + // + // ), + // }, ], [ isMobile, diff --git a/.dumi/theme/builtins/Sandpack/index.tsx b/.dumi/theme/builtins/Sandpack/index.tsx index 7a5f218593..35e1ccaeb0 100644 --- a/.dumi/theme/builtins/Sandpack/index.tsx +++ b/.dumi/theme/builtins/Sandpack/index.tsx @@ -83,6 +83,7 @@ const Sandpack: React.FC> = (props) => { ({ width: 100%; min-height: 600px; height: fit-content; - background-color: #f5f5f5; + background-color: ${cssVar.colorBgLayout}; border: 1px solid #e8e8e8; border-radius: ${cssVar.borderRadiusLG}; overflow: hidden; @@ -54,7 +54,7 @@ const useStyle = createStyles(({ cssVar }) => ({ inset-inline-end: 20px; z-index: 10; border-radius: 4px; - font-size: 14px; + font-size: ${cssVar.fontSize}; `, mvp: css` margin-inline-end: ${cssVar.marginMD}; diff --git a/.dumi/theme/common/BehaviorMap/useMermaidCode.ts b/.dumi/theme/common/BehaviorMap/useMermaidCode.ts index 7d16412977..18bcf40fae 100644 --- a/.dumi/theme/common/BehaviorMap/useMermaidCode.ts +++ b/.dumi/theme/common/BehaviorMap/useMermaidCode.ts @@ -2,50 +2,45 @@ import { useMemo } from 'react'; import type { BehaviorMapItem } from './BehaviorMap'; -export const useMermaidCode = (data: BehaviorMapItem): string => { - const generateMermaidCode = (root: BehaviorMapItem): string => { - const lines: string[] = []; +const generateMermaidCode = (root: BehaviorMapItem) => { + const lines: string[] = []; - lines.push('graph LR'); + lines.push('graph LR'); - lines.push(`classDef baseNode fill:#fff,stroke:none,stroke-width:0px,rx:5,ry:5,font-size:14px`); + lines.push(`classDef baseNode fill:#fff,stroke:none,stroke-width:0px,rx:5,ry:5,font-size:14px`); - const traverse = (node: BehaviorMapItem, parentId?: string) => { - const safeId = `node_${node.id.replace(/[^a-z0-9]/gi, '_')}`; - let labelText = node.label.replace(/"/g, "'"); + const traverse = (node: BehaviorMapItem, parentId?: string) => { + const safeId = `node_${node.id.replace(/[^a-z0-9]/gi, '_')}`; + let labelText = node.label.replace(/"/g, "'"); - if (!parentId) { - lines.push(`style ${safeId} font-size:16px`); - labelText = `**${labelText}**`; - } else if (node.targetType === 'mvp') { - const blueDot = ``; - labelText = `${blueDot}${labelText}`; - } else if (node.targetType === 'extension') { - const grayDot = ``; - labelText = `${grayDot}${labelText}`; - } - lines.push(`${safeId}["${labelText}"]:::baseNode`); + if (!parentId) { + lines.push(`style ${safeId} font-size:16px`); + labelText = `**${labelText}**`; + } else if (node.targetType === 'mvp') { + const blueDot = ``; + labelText = `${blueDot}${labelText}`; + } else if (node.targetType === 'extension') { + const grayDot = ``; + labelText = `${grayDot}${labelText}`; + } + lines.push(`${safeId}["${labelText}"]:::baseNode`); - if (node.link) { - lines.push(`click ${safeId} "#${node.link}"`); - } + if (node.link) { + lines.push(`click ${safeId} "#${node.link}"`); + } - if (parentId) { - lines.push(`${parentId} --> ${safeId}`); - } + if (parentId) { + lines.push(`${parentId} --> ${safeId}`); + } - if (node.children && node.children.length > 0) { - node.children.forEach((child) => traverse(child, safeId)); - } - }; - - traverse(root); - return lines.join('\n'); + if (node.children && node.children.length > 0) { + node.children.forEach((child) => traverse(child, safeId)); + } }; - - const mermaidCode = useMemo(() => { - return generateMermaidCode(data); - }, [data]); - - return mermaidCode; + traverse(root); + return lines.join('\n'); +}; + +export const useMermaidCode = (data: BehaviorMapItem) => { + return useMemo(() => generateMermaidCode(data), [data]); }; diff --git a/.github/workflows/pr-check-merge.yml b/.github/workflows/pr-check-merge.yml index e62f52fcec..e49ae95b47 100644 --- a/.github/workflows/pr-check-merge.yml +++ b/.github/workflows/pr-check-merge.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest if: (github.event.pull_request.head.ref == 'next' || github.event.pull_request.head.ref == 'feature' || github.event.pull_request.head.ref == 'master') && github.event.pull_request.head.user.login == 'ant-design' steps: - - uses: actions-cool/issues-helper@d1d51fccf39469b5458203b1369060db0ff0c0db + - uses: actions-cool/issues-helper@e2ff99831a4f13625d35064e2b3dfe65c07a0396 with: actions: create-comment issue-number: ${{ github.event.number }} diff --git a/.jest.js b/.jest.js index e3df529c74..52638779f9 100644 --- a/.jest.js +++ b/.jest.js @@ -9,6 +9,7 @@ const compileModules = [ '@rc-component', // jsdom 27+ depends on ESM parse5, need transform 'parse5', + '@exodus', 'jsdom', ]; diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index b53392ad6a..c8931e62a1 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -15,6 +15,13 @@ tag: vVERSION --- +## 6.1.3 + +`2025-12-29` + +- 🐞 Fix Drawer.PurePanel failing to respond to mouse interactions. [#56387](https://github.com/ant-design/ant-design/pull/56387) [@wanpan11](https://github.com/wanpan11) +- 🐞 Fix Select `options` props leaking to DOM elements and causing React unknown-prop warnings. [#56341](https://github.com/ant-design/ant-design/pull/56341) [@afc163](https://github.com/afc163) + ## 6.1.2 `2025-12-24` diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index a631d7c500..cee7c6d83c 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -15,6 +15,13 @@ tag: vVERSION --- +## 6.1.3 + +`2025-12-29` + +- 🐞 修复 Drawer.PurePanel 无法响应鼠标交互的问题。[#56387](https://github.com/ant-design/ant-design/pull/56387) [@wanpan11](https://github.com/wanpan11) +- 🐞 修复 Select options 属性透传至原生 DOM 导致 React 未知属性警告的问题。[#56341](https://github.com/ant-design/ant-design/pull/56341) [@afc163](https://github.com/afc163) + ## 6.1.2 `2025-12-24` diff --git a/components/badge/ScrollNumber.tsx b/components/badge/ScrollNumber.tsx index b45c7cb13b..140146905e 100644 --- a/components/badge/ScrollNumber.tsx +++ b/components/badge/ScrollNumber.tsx @@ -11,7 +11,7 @@ export interface ScrollNumberProps { motionClassName?: string; count?: string | number | null; children?: React.ReactElement; - component?: React.ComponentType; + component?: React.ComponentType>; style?: React.CSSProperties; title?: string | number | null; show: boolean; diff --git a/components/button/Button.tsx b/components/button/Button.tsx index 27b234080a..99e042cd33 100644 --- a/components/button/Button.tsx +++ b/components/button/Button.tsx @@ -120,7 +120,7 @@ const ButtonTypeMap: Partial> = { primary: ['primary', 'solid'], dashed: ['default', 'dashed'], // `link` is not a real color but we should compatible with it - link: ['link' as any, 'link'], + link: ['link' as ButtonColorType, 'link'], text: ['default', 'text'], }; diff --git a/components/drawer/style/index.ts b/components/drawer/style/index.ts index ca775ca1a0..3bfc154dc2 100644 --- a/components/drawer/style/index.ts +++ b/components/drawer/style/index.ts @@ -77,6 +77,7 @@ const genDrawerStyle: GenerateStyle = (token) => { background: colorBgElevated, display: 'flex', flexDirection: 'column', + pointerEvents: 'auto', [`&${componentCls}-left`]: { boxShadow: token.boxShadowDrawerLeft, diff --git a/components/input/Search.tsx b/components/input/Search.tsx index ce16333e92..eeb202c155 100644 --- a/components/input/Search.tsx +++ b/components/input/Search.tsx @@ -254,7 +254,7 @@ const Search = React.forwardRef((props, ref) => { onChange, disabled, }, - Object.keys(rootProps) as any[], + Object.keys(rootProps) as Array, ); return ( diff --git a/components/message/PurePanel.tsx b/components/message/PurePanel.tsx index 1a5d892a9e..a83984d5d6 100644 --- a/components/message/PurePanel.tsx +++ b/components/message/PurePanel.tsx @@ -40,7 +40,7 @@ export interface PureContentProps { export const PureContent: React.FC> = (props) => { const { prefixCls, type, icon, children, classNames: pureContentClassNames, styles } = props; const iconElement = icon || (type && TypeIcon[type]); - const iconNode = cloneElement(iconElement, (currentProps) => { + const iconNode = cloneElement>(iconElement, (currentProps) => { const mergedStyle: React.CSSProperties = { ...currentProps?.style, ...styles?.icon }; return { className: clsx(currentProps.className, pureContentClassNames?.icon), diff --git a/components/message/index.tsx b/components/message/index.tsx index b24b3b1124..5990afa712 100755 --- a/components/message/index.tsx +++ b/components/message/index.tsx @@ -328,7 +328,7 @@ methods.forEach((type: keyof MessageMethods) => { // ============================================================================== const noop = () => {}; -let _actWrapper: (wrapper: any) => void = noop; +let _actWrapper: (wrapper: (fn: () => void) => void) => void = noop; if (process.env.NODE_ENV === 'test') { _actWrapper = (wrapper) => { act = wrapper; diff --git a/components/notification/index.tsx b/components/notification/index.tsx index 93c5252cb2..7b027d2f63 100755 --- a/components/notification/index.tsx +++ b/components/notification/index.tsx @@ -247,7 +247,7 @@ methods.forEach((type: keyof NoticeMethods) => { // ============================================================================== const noop = () => {}; -let _actWrapper: (wrapper: any) => void = noop; +let _actWrapper: (wrapper: (fn: () => void) => void) => void = noop; if (process.env.NODE_ENV === 'test') { _actWrapper = (wrapper) => { act = wrapper; diff --git a/package.json b/package.json index bbc4f87f1c..f6c3117d49 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "antd", - "version": "6.1.2", + "version": "6.1.3", "description": "An enterprise-class UI design language and React components implementation", "license": "MIT", "funding": { @@ -247,7 +247,7 @@ "eslint-plugin-react-hooks": "^7.0.1", "eslint-plugin-react-refresh": "^0.4.24", "fast-glob": "^3.3.3", - "father": "4.6.11", + "father": "4.6.12", "fs-extra": "^11.3.2", "gh-pages": "^6.3.0", "github-slugger": "^2.0.0", @@ -268,7 +268,7 @@ "jest-image-snapshot": "^6.5.1", "jest-puppeteer": "^11.0.0", "jquery": "^3.7.1", - "jsdom": "27.3.0", + "jsdom": "27.4.0", "jsonml-to-react-element": "^1.1.11", "jsonml.js": "^0.1.0", "lint-staged": "^16.2.7", @@ -284,9 +284,9 @@ "ora": "^9.0.0", "p-all": "^5.0.1", "package-manager-detector": "^1.6.0", - "parse5": "6.0.1", - "parse5-htmlparser2-tree-adapter": "6.0.1", - "parse5-parser-stream": "6.0.1", + "parse5": "8.0.0", + "parse5-htmlparser2-tree-adapter": "8.0.0", + "parse5-parser-stream": "8.0.0", "pngjs": "^7.0.0", "portfinder": "^1.0.38", "prettier": "^3.7.4",