From d13aad62da133d5446198db153346cb0b9ddac9c Mon Sep 17 00:00:00 2001 From: Peach Date: Fri, 17 Nov 2023 15:40:37 +0800 Subject: [PATCH 01/27] docs: changelog for 5.11.2 (#45946) * docs: changelog for 5.11.2 * chore: bump version to 5.11.2 * docs: update changelog --- 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 3f7b1aa74b..d20a9a1d8f 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -16,6 +16,18 @@ tag: vVERSION --- +## 5.11.2 + +`2023-11-17` + +- 🆕 Table with `virtual` can now customize `components` except the `components.body`. [#45857](https://github.com/ant-design/ant-design/pull/45857) +- 🐞 Fix Button with href and disabled that could be focused. [#45910](https://github.com/ant-design/ant-design/pull/45910) [@MadCcc](https://github.com/MadCcc) +- 🐞 Fix `zIndex` logic problem that message and notification are covered when multiple Modal are opened. [#45911](https://github.com/ant-design/ant-design/pull/45911) [#45864](https://github.com/ant-design/ant-design/pull/45864) [@kiner-tang](https://github.com/kiner-tang) +- 💄 Fix QRCode `style.padding` is not working. [#45815](https://github.com/ant-design/ant-design/pull/45815) +- 💄 Optimize Carousel dots border radius style. [#45817](https://github.com/ant-design/ant-design/pull/45817) +- TypeScript + - 🤖 Optimize List `gutter` property type definition. [#45791](https://github.com/ant-design/ant-design/pull/45791) [@Asanio06](https://github.com/Asanio06) + ## 5.11.1 `2023-11-09` diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index 9157bba8e6..62fc02ceb9 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -16,6 +16,18 @@ tag: vVERSION --- +## 5.11.2 + +`2023-11-17` + +- 🆕 放开 Table `virtual` 下 `components` 的限制,现在除了 `components.body` 都可以自定义。[#45857](https://github.com/ant-design/ant-design/pull/45857) +- 🐞 修复 Button 带有链接且禁用时可以被聚焦到的问题。[#45910](https://github.com/ant-design/ant-design/pull/45910) [@MadCcc](https://github.com/MadCcc) +- 🐞 修复 `zIndex` 逻辑,解决多层 Modal 打开时,message 与 notification 被遮盖的问题。[#45911](https://github.com/ant-design/ant-design/pull/45911) [#45864](https://github.com/ant-design/ant-design/pull/45864) [@kiner-tang](https://github.com/kiner-tang) +- 💄 修复 QRCode 设置 `style.padding` 时无效的问题。[#45815](https://github.com/ant-design/ant-design/pull/45815) +- 💄 优化 Carousel 切换条圆角样式。[#45817](https://github.com/ant-design/ant-design/pull/45817) +- TypeScript + - 🤖 优化 List 属性 `gutter` 的类型定义。[#45791](https://github.com/ant-design/ant-design/pull/45791) [@Asanio06](https://github.com/Asanio06) + ## 5.11.1 `2023-11-09` diff --git a/package.json b/package.json index 15eab801f5..2c1e0859e6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "antd", - "version": "5.11.1", + "version": "5.11.2", "description": "An enterprise-class UI design language and React components implementation", "keywords": [ "ant", From aec6a809648c01bed81aaf3cfaa3f4cf561ca2a8 Mon Sep 17 00:00:00 2001 From: Peach Date: Fri, 17 Nov 2023 17:53:28 +0800 Subject: [PATCH 02/27] chore: correct type error in theme file (#45949) Signed-off-by: Peach --- .dumi/theme/slots/Header/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/.dumi/theme/slots/Header/index.tsx b/.dumi/theme/slots/Header/index.tsx index af16184672..6f492550e5 100644 --- a/.dumi/theme/slots/Header/index.tsx +++ b/.dumi/theme/slots/Header/index.tsx @@ -34,6 +34,7 @@ const locales = { message: '', shortMessage: '', more: '', + link: '', }, }; From a308dcfa63a93635413ad09ffee3e4ffdd0dab77 Mon Sep 17 00:00:00 2001 From: nanwy <62697454+nanwy@users.noreply.github.com> Date: Fri, 17 Nov 2023 18:30:43 +0800 Subject: [PATCH 03/27] docs: update Modal.method docs (#45948) * docs: update Modal.method docs * docs: update Modal.method US docs --- components/modal/index.en-US.md | 3 ++- components/modal/index.zh-CN.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/modal/index.en-US.md b/components/modal/index.en-US.md index 1d92813305..2c007a4aa7 100644 --- a/components/modal/index.en-US.md +++ b/components/modal/index.en-US.md @@ -103,7 +103,8 @@ The items listed above are all functions, expecting a settings object as paramet | cancelText | Text of the Cancel button with Modal.confirm | string | `Cancel` | | | centered | Centered Modal | boolean | false | | | className | The className of container | string | - | | -| closeIcon | Custom close icon. 5.7.0: close button will be hidden when setting to `null` or `false` | boolean \| ReactNode | <CloseOutlined /> | | +| closable | Whether a close (x) button is visible on top right of the confirm dialog or not | boolean | false | 4.9.0 | +| closeIcon | Custom close icon | ReactNode | undefined | 4.9.0 | | content | Content | ReactNode | - | | | footer | Footer content, set as `footer: null` when you don't need default buttons | (params:[footerRenderParams](/components/modal-cn#footerrenderparams))=> React.ReactNode \| React.ReactNode | - | 5.9.0 | | getContainer | Return the mount node for Modal | HTMLElement \| () => HTMLElement \| Selectors \| false | document.body | | diff --git a/components/modal/index.zh-CN.md b/components/modal/index.zh-CN.md index 6093d80277..ea6c53034c 100644 --- a/components/modal/index.zh-CN.md +++ b/components/modal/index.zh-CN.md @@ -104,7 +104,8 @@ demo: | cancelText | 设置 Modal.confirm 取消按钮文字 | string | `取消` | | | centered | 垂直居中展示 Modal | boolean | false | | | className | 容器类名 | string | - | | -| closeIcon | 自定义关闭图标。5.7.0:设置为 `null` 或 `false` 时隐藏关闭按钮 | boolean \| ReactNode | <CloseOutlined /> | | +| closable | 是否显示右上角的关闭按钮 | boolean | false | 4.9.0 | +| closeIcon | 自定义关闭图标 | ReactNode | undefined | 4.9.0 | | content | 内容 | ReactNode | - | | | footer | 底部内容,当不需要默认底部按钮时,可以设为 `footer: null` | (params:[footerRenderParams](/components/modal-cn#footerrenderparams))=> React.ReactNode \| React.ReactNode | - | 5.9.0 | | getContainer | 指定 Modal 挂载的 HTML 节点,false 为挂载在当前 dom | HTMLElement \| () => HTMLElement \| Selectors \| false | document.body | | From 370dab72ca20aa3bb2ecc61add5a21f53ce4b9ef Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 19 Nov 2023 10:46:51 +0800 Subject: [PATCH 04/27] chore(deps): update npm to v10.2.4 (#45956) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2c1e0859e6..178ea65124 100644 --- a/package.json +++ b/package.json @@ -325,7 +325,7 @@ "dumi": "^2.3.0-alpha.4" } }, - "packageManager": "npm@10.2.3", + "packageManager": "npm@10.2.4", "size-limit": [ { "path": "./dist/antd.min.js", From 48e9bca683f140f22bee41e808c3683230a58493 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 19 Nov 2023 10:47:24 +0800 Subject: [PATCH 05/27] chore(deps): update cimg/node docker tag to v21.2 (#45957) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2e2f2fd3c8..f7c8f63a42 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,7 @@ version: 2.1 jobs: test-argos-ci: docker: - - image: cimg/node:21.1-browsers + - image: cimg/node:21.2-browsers environment: NODE_OPTIONS: --openssl-legacy-provider steps: From d8d53f14cf90ca4e2e434d10003a77b2c094c472 Mon Sep 17 00:00:00 2001 From: JarvisArt <1120886013@qq.com> Date: Mon, 20 Nov 2023 10:18:05 +0800 Subject: [PATCH 06/27] chore: Delete the rate useless css (#45927) Co-authored-by: afc163 --- .../__snapshots__/demo-extend.test.ts.snap | 1838 +++++++++-------- .../__tests__/__snapshots__/demo.test.ts.snap | 1708 +++++++-------- components/rate/demo/clear.tsx | 14 +- components/rate/demo/text.tsx | 8 +- components/rate/style/index.tsx | 7 - 5 files changed, 1814 insertions(+), 1761 deletions(-) diff --git a/components/rate/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/rate/__tests__/__snapshots__/demo-extend.test.ts.snap index ab2f347011..295864088c 100644 --- a/components/rate/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/rate/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -1261,609 +1261,629 @@ exports[`renders components/rate/demo/character-function.tsx extend context corr exports[`renders components/rate/demo/clear.tsx extend context correctly 1`] = ` Array [ -
    -
  • - +
  • +
  • - - - - - -
  • - +
  • +
    +
    + + + +
    +
    + + + +
    +
    +
  • +
  • +
    +
    + + + +
    +
    + + + +
    +
    +
  • +
  • +
    +
    + + + +
    +
    + + + +
    +
    +
  • +
+ +
-
-
- - - -
-
- - - -
-
- -
  • -
    -
    - - - -
    -
    - - - -
    -
    -
  • -
  • -
    -
    - - - -
    -
    - - - -
    -
    -
  • -
  • -
    -
    - - - -
    -
    - - - -
    -
    -
  • - , - - allowClear: true - , + + allowClear: true + +
    + ,
    , -
      -
    • - +
    • +
    • - - - - - -
    • - +
    • +
      +
      + + + +
      +
      + + + +
      +
      +
    • +
    • +
      +
      + + + +
      +
      + + + +
      +
      +
    • +
    • +
      +
      + + + +
      +
      + + + +
      +
      +
    • +
    + +
    -
    -
    - - - -
    -
    - - - -
    -
    - -
  • -
    -
    - - - -
    -
    - - - -
    -
    -
  • -
  • -
    -
    - - - -
    -
    - - - -
    -
    -
  • -
  • -
    -
    - - - -
    -
    - - - -
    -
    -
  • - , - - allowClear: false - , + + allowClear: false + +
    + , ] `; @@ -2773,404 +2793,412 @@ exports[`renders components/rate/demo/half.tsx extend context correctly 1`] = ` exports[`renders components/rate/demo/half.tsx extend context correctly 2`] = `[]`; exports[`renders components/rate/demo/text.tsx extend context correctly 1`] = ` - -
      +
      -
    • - -
    • - -
      +
      -
      -
      -
    • - -
    • - -
      +
      -
      -
      -
    • - -
    • - -
      +
      -
      -
      -
    • - -
    • - -
      +
      -
      -
      -
    • - -
    • - -
      +
      -
      -
      -
    - + +
    - normal - - + + normal + +
    + `; exports[`renders components/rate/demo/text.tsx extend context correctly 2`] = `[]`; diff --git a/components/rate/__tests__/__snapshots__/demo.test.ts.snap b/components/rate/__tests__/__snapshots__/demo.test.ts.snap index 9ac4ea2e1a..cbf0d9e53a 100644 --- a/components/rate/__tests__/__snapshots__/demo.test.ts.snap +++ b/components/rate/__tests__/__snapshots__/demo.test.ts.snap @@ -1255,609 +1255,629 @@ Array [ exports[`renders components/rate/demo/clear.tsx correctly 1`] = ` Array [ -
      -
    • - +
    • +
    • - - - - - -
    • - +
    • +
      +
      + + + +
      +
      + + + +
      +
      +
    • +
    • +
      +
      + + + +
      +
      + + + +
      +
      +
    • +
    • +
      +
      + + + +
      +
      + + + +
      +
      +
    • +
    + +
    -
    -
    - - - -
    -
    - - - -
    -
    - -
  • -
    -
    - - - -
    -
    - - - -
    -
    -
  • -
  • -
    -
    - - - -
    -
    - - - -
    -
    -
  • -
  • -
    -
    - - - -
    -
    - - - -
    -
    -
  • - , - - allowClear: true - , + + allowClear: true + +
    + ,
    , -
      -
    • - +
    • +
    • - - - - - -
    • - +
    • +
      +
      + + + +
      +
      + + + +
      +
      +
    • +
    • +
      +
      + + + +
      +
      + + + +
      +
      +
    • +
    • +
      +
      + + + +
      +
      + + + +
      +
      +
    • +
    + +
    -
    -
    - - - -
    -
    - - - -
    -
    - -
  • -
    -
    - - - -
    -
    - - - -
    -
    -
  • -
  • -
    -
    - - - -
    -
    - - - -
    -
    -
  • -
  • -
    -
    - - - -
    -
    - - - -
    -
    -
  • - , - - allowClear: false - , + + allowClear: false + +
    + , ] `; @@ -2759,307 +2779,315 @@ exports[`renders components/rate/demo/half.tsx correctly 1`] = ` `; exports[`renders components/rate/demo/text.tsx correctly 1`] = ` - -
      +
      -
    • - -
    • - -
    • -
      +
    • -
      - +
      +
      - - + + +
      - -
    • -
    • -
      +
    • -
      - +
      +
      - - + + +
      - -
    • -
    • -
      +
    • -
      - +
      +
      - - + + +
      - -
    • -
    • -
      +
    • -
      - +
      +
      - - + + +
      - -
    • -
    - + + +
    - normal - - + + normal + +
    + `; diff --git a/components/rate/demo/clear.tsx b/components/rate/demo/clear.tsx index 845e31ee12..eed37f8e4f 100644 --- a/components/rate/demo/clear.tsx +++ b/components/rate/demo/clear.tsx @@ -1,13 +1,17 @@ import React from 'react'; -import { Rate } from 'antd'; +import { Space, Rate } from 'antd'; const App: React.FC = () => ( <> - - allowClear: true + + + allowClear: true +
    - - allowClear: false + + + allowClear: false + ); diff --git a/components/rate/demo/text.tsx b/components/rate/demo/text.tsx index a306d87fd4..0122b64821 100644 --- a/components/rate/demo/text.tsx +++ b/components/rate/demo/text.tsx @@ -1,5 +1,5 @@ import React, { useState } from 'react'; -import { Rate } from 'antd'; +import { Space, Rate } from 'antd'; const desc = ['terrible', 'bad', 'normal', 'good', 'wonderful']; @@ -7,10 +7,10 @@ const App: React.FC = () => { const [value, setValue] = useState(3); return ( - + - {value ? {desc[value - 1]} : ''} - + {value ? {desc[value - 1]} : ''} + ); }; diff --git a/components/rate/style/index.tsx b/components/rate/style/index.tsx index 25a34ed5ec..3dd745dd5e 100644 --- a/components/rate/style/index.tsx +++ b/components/rate/style/index.tsx @@ -120,13 +120,6 @@ const genRateStyle: GenerateStyle = (token) => { // star styles ...genRateStarStyle(token), - // text styles - [`+ ${componentCls}-text`]: { - display: 'inline-block', - marginInlineStart: token.marginXS, - fontSize: token.fontSize, - }, - // rtl styles ...genRateRtlStyle(token), }, From cb56ddddd130e35f42f3f5f5dfbf87f835687562 Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 20 Nov 2023 12:22:29 +0800 Subject: [PATCH 07/27] fix: code ellipsis broken under Layout (#45962) close #45953 --- components/typography/style/mixins.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/typography/style/mixins.ts b/components/typography/style/mixins.ts index 086d601719..73df94c4ea 100644 --- a/components/typography/style/mixins.ts +++ b/components/typography/style/mixins.ts @@ -261,6 +261,8 @@ export const getEllipsisStyles = (): CSSObject => ({ overflow: 'hidden', textOverflow: 'ellipsis', verticalAlign: 'bottom', + // https://github.com/ant-design/ant-design/issues/45953 + boxSizing: 'content-box', }, }, From aee10c89b63267ef7c84295f5fca3edf3e3b55a0 Mon Sep 17 00:00:00 2001 From: Ion Lizarazu Date: Mon, 20 Nov 2023 09:39:41 +0100 Subject: [PATCH 08/27] improve eu_ES language (#45928) * improve eu_ES language * update locale test snapshots --- .../__snapshots__/index.test.tsx.snap | 8 +-- components/locale/eu_ES.ts | 66 +++++++++++-------- 2 files changed, 43 insertions(+), 31 deletions(-) diff --git a/components/locale/__tests__/__snapshots__/index.test.tsx.snap b/components/locale/__tests__/__snapshots__/index.test.tsx.snap index 935d89d485..f3b5be08c4 100644 --- a/components/locale/__tests__/__snapshots__/index.test.tsx.snap +++ b/components/locale/__tests__/__snapshots__/index.test.tsx.snap @@ -76900,7 +76900,7 @@ exports[`Locale Provider should display the text as eu 1`] = ` type="button" > - Ezeztatu + Utzi + +
    + + + Static + + +
    +
    +
    +
    +
    `; exports[`renders components/modal/demo/nested.tsx extend context correctly 2`] = `[]`; diff --git a/components/modal/__tests__/__snapshots__/demo.test.tsx.snap b/components/modal/__tests__/__snapshots__/demo.test.tsx.snap index 21e8d6d062..77b26e875e 100644 --- a/components/modal/__tests__/__snapshots__/demo.test.tsx.snap +++ b/components/modal/__tests__/__snapshots__/demo.test.tsx.snap @@ -640,31 +640,60 @@ exports[`renders components/modal/demo/modal-render.tsx correctly 1`] = ` `; exports[`renders components/modal/demo/nested.tsx correctly 1`] = ` - +
    +
    + + + Static + + +
    +
    +
    +
    +
    `; exports[`renders components/modal/demo/position.tsx correctly 1`] = ` diff --git a/components/modal/demo/nested.tsx b/components/modal/demo/nested.tsx index 45095455de..fcb946546c 100644 --- a/components/modal/demo/nested.tsx +++ b/components/modal/demo/nested.tsx @@ -18,14 +18,21 @@ const Demo: React.FC = () => { const [isModalOpen, setIsModalOpen] = useState(false); + const onShowStatic = () => { + Modal.confirm({ + content: