From 8cf629f1267abd2b7aa2ead4a12cadd3c1a04c61 Mon Sep 17 00:00:00 2001 From: susuhhhhhh <75416694+susu-hu@users.noreply.github.com> Date: Wed, 21 Feb 2024 19:37:40 +0800 Subject: [PATCH 01/11] demo: replace abandoned APIs with new ones (#47519) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix:废弃 api 替换成新 api * Update demo-extend.test.ts.snap --------- Co-authored-by: lijianan <574980606@qq.com> --- .dumi/theme/slots/Header/index.tsx | 2 +- .../__tests__/__snapshots__/demo-extend.test.ts.snap | 6 +----- components/tooltip/demo/arrow-point-at-center.tsx | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.dumi/theme/slots/Header/index.tsx b/.dumi/theme/slots/Header/index.tsx index c09f5ddc79..3b2978c737 100644 --- a/.dumi/theme/slots/Header/index.tsx +++ b/.dumi/theme/slots/Header/index.tsx @@ -360,7 +360,7 @@ const Header: React.FC = () => { content={menu} trigger="click" open={menuVisible} - arrow={{ arrowPointAtCenter: true }} + arrow={{ pointAtCenter: true }} onOpenChange={onMenuVisibleChange} > diff --git a/components/tooltip/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/tooltip/__tests__/__snapshots__/demo-extend.test.ts.snap index ff4abcd082..18ee1f050c 100644 --- a/components/tooltip/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/tooltip/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -508,11 +508,7 @@ exports[`renders components/tooltip/demo/arrow-point-at-center.tsx extend contex `; -exports[`renders components/tooltip/demo/arrow-point-at-center.tsx extend context correctly 2`] = ` -[ - "Warning: [antd: Tooltip] \`arrowPointAtCenter\` is deprecated. Please use \`arrow={{ pointAtCenter: true }}\` instead.", -] -`; +exports[`renders components/tooltip/demo/arrow-point-at-center.tsx extend context correctly 2`] = `[]`; exports[`renders components/tooltip/demo/auto-adjust-overflow.tsx extend context correctly 1`] = `
( - + From d8b66fec1dd9330dae246d35bf7aa0b808c053ea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Feb 2024 21:57:14 +0800 Subject: [PATCH 02/11] chore(deps): update rc-picker requirement from ~4.1.2 to ~4.1.3 (#47529) Updates the requirements on [rc-picker](https://github.com/react-component/picker) to permit the latest version. - [Release notes](https://github.com/react-component/picker/releases) - [Changelog](https://github.com/react-component/picker/blob/master/CHANGELOG.md) - [Commits](https://github.com/react-component/picker/compare/v4.1.2...v4.1.3) --- updated-dependencies: - dependency-name: rc-picker dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5c96f7c760..d7ef8f7d29 100644 --- a/package.json +++ b/package.json @@ -143,7 +143,7 @@ "rc-motion": "^2.9.0", "rc-notification": "~5.3.0", "rc-pagination": "~4.0.4", - "rc-picker": "~4.1.2", + "rc-picker": "~4.1.3", "rc-progress": "~3.5.1", "rc-rate": "~2.12.0", "rc-resize-observer": "^1.4.0", From b3e66500886a480c0bef193e34dca6202caa3f1d Mon Sep 17 00:00:00 2001 From: zhw <116932167+coderz-w@users.noreply.github.com> Date: Thu, 22 Feb 2024 14:03:29 +0800 Subject: [PATCH 03/11] fix: datePicker document (#47537) --- components/date-picker/demo/variant.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/date-picker/demo/variant.md b/components/date-picker/demo/variant.md index 4ba16eaa6d..7d07b411ff 100644 --- a/components/date-picker/demo/variant.md +++ b/components/date-picker/demo/variant.md @@ -4,4 +4,4 @@ ## en-US -There are `outlined` `fille` and `borderless`, totally three variants to choose from. +There are `outlined` `filled` and `borderless`, totally three variants to choose from. From d41e253f56ba8e082456b46edf27af40d30c5512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E8=B4=A7=E7=88=B1=E5=90=83=E7=99=BD=E8=90=9D?= =?UTF-8?q?=E5=8D=9C?= Date: Thu, 22 Feb 2024 15:40:14 +0800 Subject: [PATCH 04/11] docs: re-order open link (#47540) --- .../builtins/Previewer/CodePreviewer.tsx | 65 ++++++++++--------- 1 file changed, 34 insertions(+), 31 deletions(-) diff --git a/.dumi/theme/builtins/Previewer/CodePreviewer.tsx b/.dumi/theme/builtins/Previewer/CodePreviewer.tsx index fa5213d5cf..605cb00f63 100644 --- a/.dumi/theme/builtins/Previewer/CodePreviewer.tsx +++ b/.dumi/theme/builtins/Previewer/CodePreviewer.tsx @@ -435,6 +435,40 @@ createRoot(document.getElementById('container')).render(); ) : null} + }> + { + track({ type: 'stackblitz', demo: asset.id }); + stackblitzSdk.openProject(stackblitzPrefillConfig, { + openFile: [`demo.${suffix}`], + }); + }} + > + + + +
{ + track({ type: 'codepen', demo: asset.id }); + codepenIconRef.current?.submit(); + }} + > + + + + }> + + +
); -
{ - track({ type: 'codepen', demo: asset.id }); - codepenIconRef.current?.submit(); - }} - > - - - - }> - - -
- }> - { - track({ type: 'stackblitz', demo: asset.id }); - stackblitzSdk.openProject(stackblitzPrefillConfig, { - openFile: [`demo.${suffix}`], - }); - }} - > - - - }> Date: Thu, 22 Feb 2024 23:12:27 +0800 Subject: [PATCH 05/11] chore(deps-dev): bump the dev-dependencies group with 2 updates (#47544) Updates the requirements on [puppeteer](https://github.com/puppeteer/puppeteer) and [react-intersection-observer](https://github.com/thebuilder/react-intersection-observer) to permit the latest version. Updates `puppeteer` to 22.2.0 - [Release notes](https://github.com/puppeteer/puppeteer/releases) - [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json) - [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-v22.1.0...puppeteer-v22.2.0) Updates `react-intersection-observer` to 9.8.1 - [Release notes](https://github.com/thebuilder/react-intersection-observer/releases) - [Commits](https://github.com/thebuilder/react-intersection-observer/compare/v9.8.0...v9.8.1) --- updated-dependencies: - dependency-name: puppeteer dependency-type: direct:development dependency-group: dev-dependencies - dependency-name: react-intersection-observer dependency-type: direct:development dependency-group: dev-dependencies ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d7ef8f7d29..b9ca540884 100644 --- a/package.json +++ b/package.json @@ -286,7 +286,7 @@ "pretty-format": "^29.7.0", "prismjs": "^1.29.0", "progress": "^2.0.3", - "puppeteer": "^22.1.0", + "puppeteer": "^22.2.0", "qs": "^6.11.2", "rc-footer": "^0.6.8", "rc-tween-one": "^3.0.6", @@ -299,7 +299,7 @@ "react-fast-marquee": "^1.6.4", "react-highlight-words": "^0.20.0", "react-infinite-scroll-component": "^6.1.0", - "react-intersection-observer": "^9.8.0", + "react-intersection-observer": "^9.8.1", "react-resizable": "^3.0.5", "react-router-dom": "^6.22.1", "react-sticky-box": "^2.0.5", From 31b421d739d0c8eaa261117d214227062c12a6a7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Feb 2024 23:12:58 +0800 Subject: [PATCH 06/11] chore(deps): update rc-picker requirement from ~4.1.3 to ~4.1.4 (#47545) Updates the requirements on [rc-picker](https://github.com/react-component/picker) to permit the latest version. - [Release notes](https://github.com/react-component/picker/releases) - [Changelog](https://github.com/react-component/picker/blob/master/CHANGELOG.md) - [Commits](https://github.com/react-component/picker/compare/v4.1.3...v4.1.4) --- updated-dependencies: - dependency-name: rc-picker dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b9ca540884..1e8a960e31 100644 --- a/package.json +++ b/package.json @@ -143,7 +143,7 @@ "rc-motion": "^2.9.0", "rc-notification": "~5.3.0", "rc-pagination": "~4.0.4", - "rc-picker": "~4.1.3", + "rc-picker": "~4.1.4", "rc-progress": "~3.5.1", "rc-rate": "~2.12.0", "rc-resize-observer": "^1.4.0", From dccdb377b0b610fd81016163161981216514d307 Mon Sep 17 00:00:00 2001 From: lijianan <574980606@qq.com> Date: Fri, 23 Feb 2024 11:01:56 +0800 Subject: [PATCH 07/11] demo: demo update (#47551) * demo: update demo code * fix: fix --- components/form/__tests__/index.test.tsx | 10 ++++++--- components/form/demo/validate-only.tsx | 27 ++++++++++++------------ 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/components/form/__tests__/index.test.tsx b/components/form/__tests__/index.test.tsx index da48269de2..c48a41a89b 100644 --- a/components/form/__tests__/index.test.tsx +++ b/components/form/__tests__/index.test.tsx @@ -127,7 +127,7 @@ describe('Form', () => { try { await form.validateFields(); - } catch (err) { + } catch { // do nothing } }; @@ -1777,7 +1777,9 @@ describe('Form', () => { const form = useRef>(null); useEffect(() => { - if (!trigger) return; + if (!trigger) { + return; + } form.current?.validateFields(); }, [trigger]); @@ -1885,7 +1887,9 @@ describe('Form', () => { const form = useRef>(null); useEffect(() => { - if (!trigger) return; + if (!trigger) { + return; + } form.current?.validateFields(); }, [trigger]); diff --git a/components/form/demo/validate-only.tsx b/components/form/demo/validate-only.tsx index d2ef117299..159cb995ed 100644 --- a/components/form/demo/validate-only.tsx +++ b/components/form/demo/validate-only.tsx @@ -2,33 +2,32 @@ import React from 'react'; import type { FormInstance } from 'antd'; import { Button, Form, Input, Space } from 'antd'; -const SubmitButton = ({ form }: { form: FormInstance }) => { - const [submittable, setSubmittable] = React.useState(false); +interface SubmitButtonProps { + form: FormInstance; +} + +const SubmitButton: React.FC> = ({ form, children }) => { + const [submittable, setSubmittable] = React.useState(false); // Watch all values const values = Form.useWatch([], form); React.useEffect(() => { - form.validateFields({ validateOnly: true }).then( - () => { - setSubmittable(true); - }, - () => { - setSubmittable(false); - }, - ); - }, [values]); + form + .validateFields({ validateOnly: true }) + .then(() => setSubmittable(true)) + .catch(() => setSubmittable(false)); + }, [form, values]); return ( ); }; const App: React.FC = () => { const [form] = Form.useForm(); - return (
@@ -39,7 +38,7 @@ const App: React.FC = () => { - + Submit From 08d432fa418860b4a3e82c05620988f95a309477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E8=B4=A7=E7=88=B1=E5=90=83=E7=99=BD=E8=90=9D?= =?UTF-8?q?=E5=8D=9C?= Date: Fri, 23 Feb 2024 11:32:04 +0800 Subject: [PATCH 08/11] fix: RangePicker time column sometime not scroll (#47542) * fix: style fixing of time scroll * chore: bump rc-picker --- components/date-picker/style/panel.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/components/date-picker/style/panel.ts b/components/date-picker/style/panel.ts index 0d393025d2..29cb910d15 100644 --- a/components/date-picker/style/panel.ts +++ b/components/date-picker/style/panel.ts @@ -571,7 +571,7 @@ export const genPanelStyle = (token: SharedPickerToken): CSSObject => { '&::after': { display: 'block', - height: token.calc(timeColumnHeight).sub(timeCellHeight).equal(), + height: token.calc('100%').sub(timeCellHeight).equal(), content: '""', }, @@ -629,14 +629,6 @@ export const genPanelStyle = (token: SharedPickerToken): CSSObject => { }, }, }, - // https://github.com/ant-design/ant-design/issues/39227 - [`&-datetime-panel ${componentCls}-time-panel-column:after`]: { - height: token - .calc(timeColumnHeight) - .sub(timeCellHeight) - .add(token.calc(paddingXXS).mul(2)) - .equal(), - }, }, }; }; From 53b01060c980514a67f282c5a3b87bf4733fd2ea Mon Sep 17 00:00:00 2001 From: Peach Date: Fri, 23 Feb 2024 15:01:51 +0800 Subject: [PATCH 09/11] docs: changelog for 5.14.2 (#47557) * docs: changelog for 5.14.2 * chore: bump version to 5.14.2 --- CHANGELOG.en-US.md | 12 ++++++++++++ CHANGELOG.zh-CN.md | 12 ++++++++++++ package.json | 2 +- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 323c82f471..86d5e66573 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -16,6 +16,18 @@ tag: vVERSION --- +## 5.14.2 + +`2024-02-23` + +- 🐞 Fix DatePicker.RangePicker time column sometime not scroll to the target time value. [#47542](https://github.com/ant-design/ant-design/pull/47542) +- 🐞 Fix Modal that pointer events will triggered during openning animation. [#47508](https://github.com/ant-design/ant-design/pull/47508) [@MadCcc](https://github.com/MadCcc) +- 🐞 Fix Avatar.Group unnecessary dom since tooltip. [#47478](https://github.com/ant-design/ant-design/pull/47478) +- 💄 Fix Progress unexpected margin style. [#47493](https://github.com/ant-design/ant-design/pull/47493) [@li-jia-nan](https://github.com/li-jia-nan) +- 💄 Fix Table scrollbar color in darkmode. [#47487](https://github.com/ant-design/ant-design/pull/47487) [@wkmyws](https://github.com/wkmyws) +- 💄 Fix Layout content font color in dark mode. [#47441](https://github.com/ant-design/ant-design/pull/47441) [@nova1751](https://github.com/nova1751) +- 💄 Fix Menu cannot customize `darkItemSelectedColor` and `darkItemSelectedBg` token in horizontal dark mode. [#47463](https://github.com/ant-design/ant-design/pull/47463) [@gandavarapurajasekhar](https://github.com/gandavarapurajasekhar) + ## 5.14.1 `2024-02-13` diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index 62c2779a96..5c368ef478 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -16,6 +16,18 @@ tag: vVERSION --- +## 5.14.2 + +`2024-02-23` + +- 🐞 修复 DatePicker.RangePicker 的时间列有时不会滚动到正确位置的问题。[#47542](https://github.com/ant-design/ant-design/pull/47542) +- 🐞 修复 Modal 在打开期间会触发其他鼠标事件的问题。[#47508](https://github.com/ant-design/ant-design/pull/47508) [@MadCcc](https://github.com/MadCcc) +- 🐞 修复 Avatar.Group 的 tooltip 存在多余 dom 残留的问题。[#47478](https://github.com/ant-design/ant-design/pull/47478) +- 💄 修复 Progress 组件多余的 `margin` 样式。[#47493](https://github.com/ant-design/ant-design/pull/47493) [@li-jia-nan](https://github.com/li-jia-nan) +- 💄 修复 Table 滚动条在暗黑模式下的颜色。[#47487](https://github.com/ant-design/ant-design/pull/47487) [@wkmyws](https://github.com/wkmyws) +- 💄 修复 Layout 内容字体在暗黑模式下的颜色。[#47441](https://github.com/ant-design/ant-design/pull/47441) [@nova1751](https://github.com/nova1751) +- 💄 修复 Menu 组件在水平暗黑模式下自定义 `darkItemSelectedColor` 和 `darkItemSelectedBg` token 不生效的问题。[#47463](https://github.com/ant-design/ant-design/pull/47463) [@gandavarapurajasekhar](https://github.com/gandavarapurajasekhar) + ## 5.14.1 `2024-02-13` diff --git a/package.json b/package.json index 1e8a960e31..6452ecfce4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "antd", - "version": "5.14.1", + "version": "5.14.2", "description": "An enterprise-class UI design language and React components implementation", "keywords": [ "ant", From cebe217604e583644229936dd6f28bd3ef5233d4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Feb 2024 20:21:35 +0800 Subject: [PATCH 10/11] chore(deps-dev): bump the dev-dependencies group with 4 updates (#47566) --- updated-dependencies: - dependency-name: "@codesandbox/sandpack-react" dependency-type: direct:development dependency-group: dev-dependencies - dependency-name: "@types/node" dependency-type: direct:development dependency-group: dev-dependencies - dependency-name: "@types/react" dependency-type: direct:development dependency-group: dev-dependencies - dependency-name: terser dependency-type: direct:development dependency-group: dev-dependencies ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 6452ecfce4..61c4984eb7 100644 --- a/package.json +++ b/package.json @@ -170,7 +170,7 @@ "@antv/g6": "^4.8.24", "@babel/eslint-plugin": "^7.23.5", "@biomejs/biome": "^1.5.3", - "@codesandbox/sandpack-react": "^2.12.1", + "@codesandbox/sandpack-react": "^2.13.0", "@dnd-kit/core": "^6.1.0", "@dnd-kit/modifiers": "^7.0.0", "@dnd-kit/sortable": "^8.0.0", @@ -200,14 +200,14 @@ "@types/jsdom": "^21.1.6", "@types/lodash": "^4.14.202", "@types/minimist": "^1.2.5", - "@types/node": "^20.11.19", + "@types/node": "^20.11.20", "@types/nprogress": "^0.2.3", "@types/pixelmatch": "^5.2.6", "@types/pngjs": "^6.0.4", "@types/prismjs": "^1.26.3", "@types/progress": "^2.0.7", "@types/qs": "^6.9.11", - "@types/react": "^18.2.57", + "@types/react": "^18.2.58", "@types/react-copy-to-clipboard": "^5.0.7", "@types/react-dom": "^18.2.19", "@types/react-highlight-words": "^0.16.7", @@ -323,7 +323,7 @@ "sylvanas": "^0.6.1", "tar": "^6.2.0", "tar-fs": "^3.0.5", - "terser": "^5.27.2", + "terser": "^5.28.0", "tsx": "^4.7.1", "typedoc": "^0.25.8", "typescript": "~5.3.3", From d3111c0be51a261e4126625e00e981bc62025212 Mon Sep 17 00:00:00 2001 From: Pob Ch <590650@gmail.com> Date: Sat, 24 Feb 2024 09:23:04 +0700 Subject: [PATCH 11/11] docs: fix typo in customize-theme.en-US.md (#47572) Signed-off-by: Pob Ch <590650@gmail.com> --- docs/react/customize-theme.en-US.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/react/customize-theme.en-US.md b/docs/react/customize-theme.en-US.md index 979f3e6032..9877ce2a98 100644 --- a/docs/react/customize-theme.en-US.md +++ b/docs/react/customize-theme.en-US.md @@ -17,7 +17,7 @@ In version 5.0, we provide a new way to customize themes. Different from the les ## Basic Usage -In version 5.0 we call the smallest element that affects the theme **Design Token**. By modifying the Design Token, we can present various themes or components. You can pass `theme` to `ConfigProvider`` to customize theme. After migrate to V5, theme of V5 will be applied by default. +In version 5.0 we call the smallest element that affects the theme **Design Token**. By modifying the Design Token, we can present various themes or components. You can pass `theme` to `ConfigProvider` to customize theme. After migrate to V5, theme of V5 will be applied by default. :::warning