From 6f68cf30ac69ee120f0cd0a888b8d4673a37c74d Mon Sep 17 00:00:00 2001 From: lijianan <574980606@qq.com> Date: Sat, 2 Mar 2024 10:47:22 +0800 Subject: [PATCH 01/30] demo: demo code optimization (#47680) --- components/auto-complete/demo/options.tsx | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/components/auto-complete/demo/options.tsx b/components/auto-complete/demo/options.tsx index b857d6e58c..337f0d5b0b 100644 --- a/components/auto-complete/demo/options.tsx +++ b/components/auto-complete/demo/options.tsx @@ -1,22 +1,20 @@ -import React, { useState } from 'react'; +import React from 'react'; import { AutoComplete } from 'antd'; +import type { DefaultOptionType } from 'antd/es/select'; const App: React.FC = () => { - const [options, setOptions] = useState<{ value: string; label: string }[]>([]); - + const [options, setOptions] = React.useState([]); const handleSearch = (value: string) => { - let res: { value: string; label: string }[] = []; - if (!value || value.indexOf('@') >= 0) { - res = []; - } else { - res = ['gmail.com', '163.com', 'qq.com'].map((domain) => ({ - value: `${value}@${domain}`, + setOptions(() => { + if (!value || value.includes('@')) { + return []; + } + return ['gmail.com', '163.com', 'qq.com'].map((domain) => ({ label: `${value}@${domain}`, + value: `${value}@${domain}`, })); - } - setOptions(res); + }); }; - return ( Date: Sat, 2 Mar 2024 21:09:48 +0800 Subject: [PATCH 02/30] docs: add 5.15.0 changelog (#47672) * docs: add 5.15.0 changelog * Update CHANGELOG.zh-CN.md Co-authored-by: kiner-tang <1127031143@qq.com> Signed-off-by: xrkffgg * Update CHANGELOG.en-US.md Co-authored-by: kiner-tang <1127031143@qq.com> Signed-off-by: xrkffgg * Update CHANGELOG.zh-CN.md Signed-off-by: xrkffgg --------- Signed-off-by: xrkffgg Co-authored-by: kiner-tang <1127031143@qq.com> --- CHANGELOG.en-US.md | 33 +++++++++++++++++++++++++++++++++ CHANGELOG.zh-CN.md | 33 +++++++++++++++++++++++++++++++++ package.json | 2 +- 3 files changed, 67 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 86d5e66573..6c329124a9 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -16,6 +16,39 @@ tag: vVERSION --- +## 5.15.0 + +`2024-03-02` + +- ConfigProvider + - 🆕 ConfigProvider support Input.TextArea `allowClear` `autoComplete` `className` `style` `classNames` `styles` props. [#47589](https://github.com/ant-design/ant-design/pull/47589) + - 🆕 ConfigProvider support Input `allowClear` props. [#47602](https://github.com/ant-design/ant-design/pull/47602) + - 🆕 ConfigProvider support Menu `expandIcon` props. [#47561](https://github.com/ant-design/ant-design/pull/47561) + - 🆕 ConfigProvider support Collapse `expandIcon` props. [#47473](https://github.com/ant-design/ant-design/pull/47473) + - 🆕 ConfigProvider support Tabs `removeIcon` props, when set `type="editable-card"`. [#47334](https://github.com/ant-design/ant-design/pull/47334) + - 🆕 Prefixes for CSS variables follow the `prefixCls` property of ConfigProvider by default. [#47481](https://github.com/ant-design/ant-design/pull/47481) + - 🤖 CardProps `styles` in ConfigProvider is set to optional. [#47601](https://github.com/ant-design/ant-design/pull/47601) [@Yawenina](https://github.com/Yawenina) +- 🆕 Select、Checkbox、Radio、DatePicker、TreeSelect、Cascader the `focus` supports passing `options`. [#47664](https://github.com/ant-design/ant-design/pull/47664) +- 🆕 Modal support configuring `aria-*` in `closable`. [#47650](https://github.com/ant-design/ant-design/pull/47650) +- 🆕 Alert support configuring `aria-*` in `closable`. [#47474](https://github.com/ant-design/ant-design/pull/47474) +- 🆕 Tabs support `removeIcon` props, when set `type="editable-card"`. [#47334](https://github.com/ant-design/ant-design/pull/47334) +- Drawer + - 🆕 Drawer support configuring `aria-*` in `closable`. [#47543](https://github.com/ant-design/ant-design/pull/47543) + - 🆕 Drawer support passing `aria-*` attributes to panel nodes. [#47387](https://github.com/ant-design/ant-design/pull/47387) +- Table + - 🆕 Table adds `filterOnClose` to specify whether to trigger filtering when the filter menu is closed. [#47451](https://github.com/ant-design/ant-design/pull/47451) [@xsjcTony](https://github.com/xsjcTony) + - 🆕 Table adds `components.header.table` to customize the header component when scrolling the column. [#47382](https://github.com/ant-design/ant-design/pull/47382) + - 🐞 Fix the issue where scroll bars would not be displayed during initial rendering under Table `sticky`. [#47382](https://github.com/ant-design/ant-design/pull/47382) + - 🐞 Fix the issue where the `th` element is not used in the column header when Table `column.title` is empty. [#47382](https://github.com/ant-design/ant-design/pull/47382) + - 🐞 Fix the issue where `prefixCls` is invalid when Table uses a virtual list. [#47639](https://github.com/ant-design/ant-design/pull/47639) + - 💄 Fix abnormal shadow display when Table fixed columns. [#47518](https://github.com/ant-design/ant-design/pull/47518) +- 🐞 Fix the issue where when using DirectoryTree in Tree, pressing shift for continuous multi-selection will report an error. [#47567](https://github.com/ant-design/ant-design/pull/47567) [@wkmyws](https://github.com/wkmyws) +- 🐞 Fix the issue where `isFieldsTouched(true)` always returns `false` when Form exists in Form.List. [#47629](https://github.com/ant-design/ant-design/pull/47629) [@lemonied](https://github.com/lemonied) +- 🐞 Fix the issue of Button being incompatible with v4 `type=''`. [#47612](https://github.com/ant-design/ant-design/pull/47612) +- 🛠 Refactor Typography to omit measurement logic to support dynamic row height scenarios. [#47597](https://github.com/ant-design/ant-design/pull/47597) +- 💄 Remove redundant margin styles from Tag. [#47504](https://github.com/ant-design/ant-design/pull/47504) +- 🤖 MISC: fix an issue that could not be compiled under pnpm configuration `hoist: false`. [#47587](https://github.com/ant-design/ant-design/pull/47587) + ## 5.14.2 `2024-02-23` diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index 5c368ef478..fc6664d6b5 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -16,6 +16,39 @@ tag: vVERSION --- +## 5.15.0 + +`2024-03-02` + +- ConfigProvider + - 🆕 ConfigProvider 支持 Input.TextArea 组件 `allowClear`、`autoComplete`、`className`、`style`、`classNames`、`styles` 属性。[#47589](https://github.com/ant-design/ant-design/pull/47589) + - 🆕 ConfigProvider 支持 Input 组件 `allowClear` 属性。[#47602](https://github.com/ant-design/ant-design/pull/47602) + - 🆕 ConfigProvider 支持 Menu 组件 `expandIcon` 属性。[#47561](https://github.com/ant-design/ant-design/pull/47561) + - 🆕 ConfigProvider 支持 Collapse 组件 `expandIcon` 属性。[#47473](https://github.com/ant-design/ant-design/pull/47473) + - 🆕 ConfigProvider 支持 Tabs `removeIcon` 属性, 在设置 `type="editable-card"` 时有效。[#47334](https://github.com/ant-design/ant-design/pull/47334) + - 🆕 CSS 变量的前缀默认跟随 ConfigProvider 的 `prefixCls` 属性。[#47481](https://github.com/ant-design/ant-design/pull/47481) + - 🤖 ConfigProvider 中 CardProps `styles` 设为可选。[#47601](https://github.com/ant-design/ant-design/pull/47601) [@Yawenina](https://github.com/Yawenina) +- 🆕 Select、Checkbox、Radio、DatePicker、TreeSelect、Cascader 支持 `focus` 功能支持传递 `options`。[#47664](https://github.com/ant-design/ant-design/pull/47664) +- 🆕 Modal 支持在 `closable` 中配置 `aria-*`。[#47650](https://github.com/ant-design/ant-design/pull/47650) +- 🆕 Alert 支持在 `closable` 中配置 `aria-*`。[#47474](https://github.com/ant-design/ant-design/pull/47474) +- 🆕 Tabs 组件支持 `removeIcon` 属性,在设置 `type="editable-card"` 时有效。[#47334](https://github.com/ant-design/ant-design/pull/47334) +- Drawer + - 🆕 Drawer 支持在 `closable` 中配置 `aria-*`。[#47543](https://github.com/ant-design/ant-design/pull/47543) + - 🆕 Drawer 支持传递 `aria-*` 属性给 panel 节点。[#47387](https://github.com/ant-design/ant-design/pull/47387) +- Table + - 🆕 Table 新增 `filterOnClose` 用于指定是否在筛选菜单关闭时触发筛选。[#47451](https://github.com/ant-design/ant-design/pull/47451) [@xsjcTony](https://github.com/xsjcTony) + - 🆕 Table 新增 `components.header.table` 以自定义滚动列时的标题组件。[#47382](https://github.com/ant-design/ant-design/pull/47382) + - 🐞 修复 Table `sticky` 下,初次渲染不会显示滚动条的问题。[#47382](https://github.com/ant-design/ant-design/pull/47382) + - 🐞 修复 Table `column.title` 为空时列头没有使用 `th` 元素的问题。[#47382](https://github.com/ant-design/ant-design/pull/47382) + - 🐞 修复 Table 使用虚拟列表时 `prefixCls` 无效的问题。[#47639](https://github.com/ant-design/ant-design/pull/47639) + - 💄 修复 Table 固定列时阴影展示异常的问题。[#47518](https://github.com/ant-design/ant-design/pull/47518) +- 🐞 修复 Tree 使用 DirectoryTree 时,按住 shift 连续多选报错的问题。[#47567](https://github.com/ant-design/ant-design/pull/47567) [@wkmyws](https://github.com/wkmyws) +- 🐞 修复 Form 存在 Form.List 时,`isFieldsTouched(true)` 始终会返回 `false` 的问题。[#47629](https://github.com/ant-design/ant-design/pull/47629) [@lemonied](https://github.com/lemonied) +- 🐞 修复 Button 不兼容 v4 `type=''` 的问题。[#47612](https://github.com/ant-design/ant-design/pull/47612) +- 🛠 重构 Typography 省略测量逻辑以支持动态行高的场景。[#47597](https://github.com/ant-design/ant-design/pull/47597) +- 💄 移除 Tag 组件多余的 margin 样式。[#47504](https://github.com/ant-design/ant-design/pull/47504) +- 🤖 杂项:修复不能在 pnpm 配置 `hoist: false` 下编译的问题。[#47587](https://github.com/ant-design/ant-design/pull/47587) + ## 5.14.2 `2024-02-23` diff --git a/package.json b/package.json index 21be8a77bd..f2f9b5da88 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "antd", - "version": "5.14.2", + "version": "5.15.0", "description": "An enterprise-class UI design language and React components implementation", "keywords": [ "ant", From 9970fd3754d22e2b43e07411f2174fed2b348427 Mon Sep 17 00:00:00 2001 From: lqzhgood <9134671+lqzhgood@users.noreply.github.com> Date: Sun, 3 Mar 2024 14:42:04 +0800 Subject: [PATCH 03/30] =?UTF-8?q?=F0=9F=93=83=20docs(Select):=20add=20optG?= =?UTF-8?q?roups=20props=20(#47687)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/react-component/select/pull/1020/ --- components/select/index.en-US.md | 12 ++++++++---- components/select/index.zh-CN.md | 11 +++++++---- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/components/select/index.en-US.md b/components/select/index.en-US.md index 3df6a052e3..a87e6ae3ad 100644 --- a/components/select/index.en-US.md +++ b/components/select/index.en-US.md @@ -154,10 +154,14 @@ Common props ref:[Common props](/docs/react/common-props) ### OptGroup props -| Property | Description | Type | Default | Version | -| -------- | ----------- | ----------------------- | ------- | ------- | -| key | Group key | string | - | | -| label | Group label | string \| React.Element | - | | +| Property | Description | Type | Default | Version | +| -------- | ------------------------------------- | ----------------------- | ------- | ------- | +| key | Group key | string | - | | +| label | Group label | string \| React.Element | - | | +| className | The additional class to option | string | - | | +| title | `title` attribute of Select Option | string | - | | + + ## Design Token diff --git a/components/select/index.zh-CN.md b/components/select/index.zh-CN.md index 4c0f491d61..77725526e6 100644 --- a/components/select/index.zh-CN.md +++ b/components/select/index.zh-CN.md @@ -155,10 +155,13 @@ return ( ### OptGroup props -| 参数 | 说明 | 类型 | 默认值 | 版本 | -| ----- | ---- | ----------------------- | ------ | ---- | -| key | Key | string | - | | -| label | 组名 | string \| React.Element | - | | +| 参数 | 说明 | 类型 | 默认值 | 版本 | +| --------- | ----------------------- | ------------------------ | ------- | ---- | +| key | Key | string | - | | +| label | 组名 | string \| React.Element | - | | +| className | Option 器类名 | string | - | | +| title | 选项上的原生 title 提示 | string | - | | + ## 主题变量(Design Token) From a4077b673987b5d9c0777c9e8277f944d852d468 Mon Sep 17 00:00:00 2001 From: lijianan <574980606@qq.com> Date: Mon, 4 Mar 2024 13:55:24 +0800 Subject: [PATCH 04/30] demo: update Select label type in demo and docs (#47694) --- .../__snapshots__/demo-extend.test.ts.snap | 61 +++++++++++++------ .../__snapshots__/demo.test.tsx.snap | 4 +- components/select/demo/optgroup.tsx | 15 +++-- components/select/index.en-US.md | 14 ++--- components/select/index.zh-CN.md | 13 ++-- 5 files changed, 66 insertions(+), 41 deletions(-) diff --git a/components/select/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/select/__tests__/__snapshots__/demo-extend.test.ts.snap index c5fb468faa..9b3737c359 100644 --- a/components/select/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/select/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -6880,9 +6880,9 @@ exports[`renders components/select/demo/optgroup.tsx extend context correctly 1` - Lucy + lucy
- jack + Jack
- lucy + Lucy
- Manager + + manager +
- Jack + + Jack +
- Lucy + + Lucy +
- - COOL - - - TEACHER - + + COOL + + + TEACHER + +
- - nice - - - developer - + + NICE + + + DEVELOPER + + - - loser - + + LOSER + + - - cool - - - teacher - + + COOL + + + TEACHER + + - +
@@ -22946,7 +22972,7 @@ exports[`renders components/table/demo/pagination.tsx extend context correctly 1 > DEVELOPER - +
- +
LOSER - +
- +
@@ -23061,7 +23091,7 @@ exports[`renders components/table/demo/pagination.tsx extend context correctly 1 > TEACHER - +
- - NICE - - - DEVELOPER - + + NICE + + + DEVELOPER + + - - LOSER - + + LOSER + + - - COOL - - - TEACHER - + + COOL + + + TEACHER + + - - nice - - - developer - + + NICE + + + DEVELOPER + + - - loser - + + LOSER + + - - cool - - - teacher - + + COOL + + + TEACHER + + - +
@@ -18366,7 +18392,7 @@ exports[`renders components/table/demo/pagination.tsx correctly 1`] = ` > DEVELOPER - +
- +
LOSER - +
- +
@@ -18485,7 +18515,7 @@ exports[`renders components/table/demo/pagination.tsx correctly 1`] = ` > TEACHER - +
['columns'] = [ key: 'tags', dataIndex: 'tags', render: (_, { tags }) => ( - <> - {tags.map((tag) => { + + {tags.map((tag) => { let color = tag.length > 5 ? 'geekblue' : 'green'; if (tag === 'loser') { color = 'volcano'; @@ -44,7 +44,7 @@ const columns: TableProps['columns'] = [ ); })} - + ), }, { diff --git a/components/table/demo/jsx.tsx b/components/table/demo/jsx.tsx index 4dadb6720d..f8d54ca8b2 100644 --- a/components/table/demo/jsx.tsx +++ b/components/table/demo/jsx.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Space, Table, Tag } from 'antd'; +import { Flex, Space, Table, Tag } from 'antd'; const { Column, ColumnGroup } = Table; @@ -52,13 +52,19 @@ const App: React.FC = () => ( dataIndex="tags" key="tags" render={(tags: string[]) => ( - <> - {tags.map((tag) => ( - - {tag} - - ))} - + + {tags.map((tag) => { + let color = tag.length > 5 ? 'geekblue' : 'green'; + if (tag === 'loser') { + color = 'volcano'; + } + return ( + + {tag.toUpperCase()} + + ); + })} + )} /> = TableProps['columns']; @@ -50,8 +50,8 @@ const columns: ColumnsType = [ key: 'tags', dataIndex: 'tags', render: (tags: string[]) => ( - - {tags.map((tag) => { + + {tags.map((tag) => { let color = tag.length > 5 ? 'geekblue' : 'green'; if (tag === 'loser') { color = 'volcano'; @@ -62,7 +62,7 @@ const columns: ColumnsType = [ ); })} - + ), }, { From dbac97c09856c38958b23662c2037a22e1934a8a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Mar 2024 21:24:57 +0800 Subject: [PATCH 11/30] chore(deps-dev): bump the dev-dependencies group with 3 updates (#47718) Updates the requirements on [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin), [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) and [puppeteer](https://github.com/puppeteer/puppeteer) to permit the latest version. Updates `@typescript-eslint/eslint-plugin` to 7.1.1 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.1.1/packages/eslint-plugin) Updates `@typescript-eslint/parser` to 7.1.1 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.1.1/packages/parser) Updates `puppeteer` to 22.4.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.3.0...puppeteer-v22.4.0) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development dependency-group: dev-dependencies - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development dependency-group: dev-dependencies - dependency-name: puppeteer 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index e861191710..69ab4bd5c1 100644 --- a/package.json +++ b/package.json @@ -217,8 +217,8 @@ "@types/tar": "^6.1.11", "@types/throttle-debounce": "^5.0.2", "@types/warning": "^3.0.3", - "@typescript-eslint/eslint-plugin": "^7.1.0", - "@typescript-eslint/parser": "^7.1.0", + "@typescript-eslint/eslint-plugin": "^7.1.1", + "@typescript-eslint/parser": "^7.1.1", "ali-oss": "^6.20.0", "antd-img-crop": "^4.21.0", "antd-style": "^3.6.1", @@ -287,7 +287,7 @@ "pretty-format": "^29.7.0", "prismjs": "^1.29.0", "progress": "^2.0.3", - "puppeteer": "^22.3.0", + "puppeteer": "^22.4.0", "qs": "^6.11.2", "rc-footer": "^0.6.8", "rc-tween-one": "^3.0.6", From fe837e964c651a7427b695e6bdf180b9d14d16ef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Mar 2024 22:02:55 +0800 Subject: [PATCH 12/30] chore(deps): update rc-field-form requirement from ~1.42.0 to ~1.42.1 (#47719) Updates the requirements on [rc-field-form](https://github.com/react-component/field-form) to permit the latest version. - [Release notes](https://github.com/react-component/field-form/releases) - [Changelog](https://github.com/react-component/field-form/blob/master/CHANGELOG.md) - [Commits](https://github.com/react-component/field-form/compare/v1.42.0...v1.42.1) --- updated-dependencies: - dependency-name: rc-field-form dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: lijianan <574980606@qq.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 69ab4bd5c1..3006ead1aa 100644 --- a/package.json +++ b/package.json @@ -135,7 +135,7 @@ "rc-dialog": "~9.4.0", "rc-drawer": "~7.1.0", "rc-dropdown": "~4.1.0", - "rc-field-form": "~1.42.0", + "rc-field-form": "~1.42.1", "rc-image": "~7.6.0", "rc-input": "~1.4.3", "rc-input-number": "~9.0.0", From 44b55c643576156e062083c33715bf3dfd68a573 Mon Sep 17 00:00:00 2001 From: Olivier Louvignes Date: Wed, 6 Mar 2024 02:44:26 +0100 Subject: [PATCH 13/30] demo: improve types for form basic demo (#47722) --- components/form/demo/basic.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/components/form/demo/basic.tsx b/components/form/demo/basic.tsx index 087d2b88b3..1f0c76a068 100644 --- a/components/form/demo/basic.tsx +++ b/components/form/demo/basic.tsx @@ -1,13 +1,5 @@ import React from 'react'; -import { Button, Checkbox, Form, Input } from 'antd'; - -const onFinish = (values: any) => { - console.log('Success:', values); -}; - -const onFinishFailed = (errorInfo: any) => { - console.log('Failed:', errorInfo); -}; +import { Button, Checkbox, Form, type FormProps, Input } from 'antd'; type FieldType = { username?: string; @@ -15,6 +7,14 @@ type FieldType = { remember?: string; }; +const onFinish: FormProps["onFinish"] = (values) => { + console.log('Success:', values); +}; + +const onFinishFailed: FormProps["onFinishFailed"] = (errorInfo) => { + console.log('Failed:', errorInfo); +}; + const App: React.FC = () => (
Date: Wed, 6 Mar 2024 19:21:42 +0800 Subject: [PATCH 14/30] docs: fix typo in blog (#47735) fix typo Signed-off-by: WeLong --- docs/blog/virtual-table.zh-CN.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/blog/virtual-table.zh-CN.md b/docs/blog/virtual-table.zh-CN.md index 8ed1973a44..043c202cfd 100644 --- a/docs/blog/virtual-table.zh-CN.md +++ b/docs/blog/virtual-table.zh-CN.md @@ -55,7 +55,7 @@ antd 的 Table 底层使用了 `rc-table` 组件,我们的虚拟滚动功能 但是在测试时,我们发现一个奇怪的现象。表格在首次、再次渲染时,会有非常大的卡顿。在进行断点时,它来自于 `useFlattenRecords` hooks。而测试的代码本身并没有使用可展开树的功能,于是我们对其进行了排查。发现在 `useFlattenRecords` 中,存在大量的 GC 操作。而这些操作是由于一段不起眼的代码引起的: ```tsx -// Fake code. Not used in real word +// Fake code. Not used in real world function flatten(data: T[] = []) { let tmpList: T[] = []; @@ -71,7 +71,7 @@ function flatten(data: T[] = []) { 在遍历过程中,虽然 `children` 为空只会进入一次递归。但是在循环每个 Record 时都会创建一次临时的空数组。但是当 `dataSource` 数据巨大时,它们会不断触发 GC 清理这些临时数组。因而我们通过改造添加逻辑以避免不必要的消耗: ```tsx -// Fake code. Not used in real word +// Fake code. Not used in real world function flatten(data: T[] = [], list: T[] = []) { for (let i = 0; i < data.length; i += 1) { const record = data[i]; @@ -132,7 +132,7 @@ const Demo = () => { `rc-virtual-list` 提供了 `extraRender` 方法,它会提供当前虚拟滚动中所渲染的行号。我们只需要对这个范围内的 Record 执行一次 `onCell` 获取每个 `cell` 的 `rowSpan` 和 `colSpan` 信息。既可以知道当前行是否存在对外的 `rowSpan` 依赖: ```tsx -// Fake code. Not used in real word +// Fake code. Not used in real world const extraRender = ({ start, end }) => { // Start record const startRecord = flattenData[start]; From 0652c32830a9e9529e443d0c2e042f6c3d897d12 Mon Sep 17 00:00:00 2001 From: MadCcc Date: Wed, 6 Mar 2024 21:51:17 +0800 Subject: [PATCH 15/30] fix: sibling Tags should have margin (#47736) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: sibling Tag should have margin * chore: update snapshot * chore: revert * chore: link issue * docs: update demo * Revert "demo: update Grid、Table、Select demo (#47709)" This reverts commit c01c1b505b57ef01f9da29b185d4e9096fea1137. * chore: update snapshot * chore: update demo --- .../__snapshots__/demo-extend.test.ts.snap | 10 +- .../__tests__/__snapshots__/demo.test.ts.snap | 10 +- components/grid/demo/useBreakpoint.tsx | 11 +- .../__snapshots__/demo-extend.test.ts.snap | 32 ++- .../__snapshots__/demo.test.tsx.snap | 12 +- components/select/demo/custom-tag-render.tsx | 9 +- .../__snapshots__/demo-extend.test.ts.snap | 130 +++++------- .../__tests__/__snapshots__/demo.test.ts.snap | 130 +++++------- components/table/demo/basic.tsx | 8 +- components/table/demo/jsx.tsx | 22 +- components/table/demo/pagination.tsx | 8 +- .../__snapshots__/demo-extend.test.ts.snap | 196 +++++++++--------- .../__tests__/__snapshots__/demo.test.ts.snap | 196 +++++++++--------- components/tag/demo/animation.tsx | 6 +- components/tag/demo/basic.tsx | 6 +- components/tag/demo/borderless.tsx | 4 +- components/tag/demo/borderlessLayout.tsx | 4 +- components/tag/demo/checkable.tsx | 2 +- components/tag/demo/colorful-inverse.tsx | 2 +- components/tag/demo/colorful.tsx | 4 +- components/tag/demo/component-token.tsx | 2 +- components/tag/demo/control.tsx | 2 +- components/tag/demo/customize.tsx | 2 +- components/tag/demo/draggable.tsx | 2 +- components/tag/demo/icon.tsx | 2 +- components/tag/demo/status.tsx | 4 +- components/tag/style/index.ts | 2 + 27 files changed, 375 insertions(+), 443 deletions(-) diff --git a/components/grid/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/grid/__tests__/__snapshots__/demo-extend.test.ts.snap index bc365b9f12..62d97b5865 100644 --- a/components/grid/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/grid/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -1500,16 +1500,14 @@ exports[`renders components/grid/demo/sort.tsx extend context correctly 1`] = ` exports[`renders components/grid/demo/sort.tsx extend context correctly 2`] = `[]`; exports[`renders components/grid/demo/useBreakpoint.tsx extend context correctly 1`] = ` -
- Current break point: +Array [ + Current break point: , xs - -
+ , +] `; exports[`renders components/grid/demo/useBreakpoint.tsx extend context correctly 2`] = `[]`; diff --git a/components/grid/__tests__/__snapshots__/demo.test.ts.snap b/components/grid/__tests__/__snapshots__/demo.test.ts.snap index d55d0afdb9..ea31e061cc 100644 --- a/components/grid/__tests__/__snapshots__/demo.test.ts.snap +++ b/components/grid/__tests__/__snapshots__/demo.test.ts.snap @@ -1419,9 +1419,9 @@ exports[`renders components/grid/demo/sort.tsx correctly 1`] = ` `; exports[`renders components/grid/demo/useBreakpoint.tsx correctly 1`] = ` -
- Current break point: -
+Array [ + Current break point:, + , + , +] `; diff --git a/components/grid/demo/useBreakpoint.tsx b/components/grid/demo/useBreakpoint.tsx index 160233c51d..90baf90e24 100644 --- a/components/grid/demo/useBreakpoint.tsx +++ b/components/grid/demo/useBreakpoint.tsx @@ -1,21 +1,22 @@ import React from 'react'; -import { Flex, Grid, Tag } from 'antd'; +import { Grid, Tag } from 'antd'; const { useBreakpoint } = Grid; const App: React.FC = () => { const screens = useBreakpoint(); + return ( - - Current break point: + <> + Current break point:{' '} {Object.entries(screens) .filter((screen) => !!screen[1]) - .map((screen) => ( + .map((screen) => ( {screen[0]} ))} - + ); }; diff --git a/components/select/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/select/__tests__/__snapshots__/demo-extend.test.ts.snap index 5cce851ef8..9b3737c359 100644 --- a/components/select/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/select/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -1522,11 +1522,9 @@ exports[`renders components/select/demo/custom-tag-render.tsx extend context cor - - gold - + gold - - cyan - + cyan
- - gold - + gold
, @@ -178,7 +172,7 @@ exports[`renders components/tag/demo/basic.tsx extend context correctly 1`] = ` /> -
+
, @@ -207,8 +201,8 @@ exports[`renders components/tag/demo/basic.tsx extend context correctly 1`] = `
-
- +
, +] `; exports[`renders components/tag/demo/basic.tsx extend context correctly 2`] = `[]`; @@ -216,7 +210,8 @@ exports[`renders components/tag/demo/basic.tsx extend context correctly 2`] = `[ exports[`renders components/tag/demo/borderless.tsx extend context correctly 1`] = ` Array [
,
Categories: @@ -552,7 +551,8 @@ Array [
,
,
,
,
-
+ Tag 1 - Tag 1 - + + + + + Tag 2 - Tag 2 - + + + + + Tag 3 - Tag 3 - + + -
+
, +Array [ Tag 1 - + , @@ -150,7 +144,7 @@ exports[`renders components/tag/demo/basic.tsx correctly 1`] = ` > Link - +
, @@ -176,7 +170,7 @@ exports[`renders components/tag/demo/basic.tsx correctly 1`] = ` /> - + , @@ -205,14 +199,15 @@ exports[`renders components/tag/demo/basic.tsx correctly 1`] = ` - -
+
, +] `; exports[`renders components/tag/demo/borderless.tsx correctly 1`] = ` Array [
,
Categories: @@ -542,7 +541,8 @@ Array [
,
,
,
,
{ @@ -73,9 +73,7 @@ const App: React.FC = () => { } }} > - - {tagChild} - + {tagChild}
{inputVisible ? ( diff --git a/components/tag/demo/basic.tsx b/components/tag/demo/basic.tsx index 5476737640..21134b87d6 100644 --- a/components/tag/demo/basic.tsx +++ b/components/tag/demo/basic.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { CloseCircleOutlined } from '@ant-design/icons'; -import { Flex, Tag } from 'antd'; +import { Tag } from 'antd'; const preventDefault = (e: React.MouseEvent) => { e.preventDefault(); @@ -8,7 +8,7 @@ const preventDefault = (e: React.MouseEvent) => { }; const App: React.FC = () => ( - + <> Tag 1 Link @@ -19,7 +19,7 @@ const App: React.FC = () => ( } onClose={console.log}> Tag 2 - + ); export default App; diff --git a/components/tag/demo/borderless.tsx b/components/tag/demo/borderless.tsx index 26ccb9ae98..da95014d87 100644 --- a/components/tag/demo/borderless.tsx +++ b/components/tag/demo/borderless.tsx @@ -3,7 +3,7 @@ import { Divider, Flex, Tag } from 'antd'; const App: React.FC = () => ( <> - + Tag 1 Tag 2 @@ -14,7 +14,7 @@ const App: React.FC = () => ( - + processing diff --git a/components/tag/demo/borderlessLayout.tsx b/components/tag/demo/borderlessLayout.tsx index 8ad6fc8618..a3c614732d 100644 --- a/components/tag/demo/borderlessLayout.tsx +++ b/components/tag/demo/borderlessLayout.tsx @@ -5,7 +5,7 @@ const App: React.FC = () => { const { token } = theme.useToken(); return (
- + Tag 1 Tag 2 @@ -16,7 +16,7 @@ const App: React.FC = () => { - + magenta diff --git a/components/tag/demo/checkable.tsx b/components/tag/demo/checkable.tsx index 412052603f..65cea1425d 100644 --- a/components/tag/demo/checkable.tsx +++ b/components/tag/demo/checkable.tsx @@ -14,7 +14,7 @@ const App: React.FC = () => { }; return ( - + Categories: {tagsData.map((tag) => ( ( - + magenta red volcano diff --git a/components/tag/demo/colorful.tsx b/components/tag/demo/colorful.tsx index 0ab8125033..e0e4e4765f 100644 --- a/components/tag/demo/colorful.tsx +++ b/components/tag/demo/colorful.tsx @@ -4,7 +4,7 @@ import { Divider, Flex, Tag } from 'antd'; const App: React.FC = () => ( <> Presets - + magenta red volcano @@ -18,7 +18,7 @@ const App: React.FC = () => ( purple Custom - + #f50 #2db7f5 #87d068 diff --git a/components/tag/demo/component-token.tsx b/components/tag/demo/component-token.tsx index fa918c49cb..f47a7fa493 100644 --- a/components/tag/demo/component-token.tsx +++ b/components/tag/demo/component-token.tsx @@ -6,7 +6,7 @@ const App: React.FC = () => ( - + Link diff --git a/components/tag/demo/control.tsx b/components/tag/demo/control.tsx index fcb775981b..bf25ca662b 100644 --- a/components/tag/demo/control.tsx +++ b/components/tag/demo/control.tsx @@ -71,7 +71,7 @@ const App: React.FC = () => { }; return ( - + {tags.map((tag, index) => { if (editInputIndex === index) { return ( diff --git a/components/tag/demo/customize.tsx b/components/tag/demo/customize.tsx index d52605cb79..007608b36c 100644 --- a/components/tag/demo/customize.tsx +++ b/components/tag/demo/customize.tsx @@ -3,7 +3,7 @@ import { CloseCircleOutlined } from '@ant-design/icons'; import { Flex, Tag } from 'antd'; const App: React.FC = () => ( - + Tag1 diff --git a/components/tag/demo/draggable.tsx b/components/tag/demo/draggable.tsx index 6b0dcca70b..ad4b7e792e 100644 --- a/components/tag/demo/draggable.tsx +++ b/components/tag/demo/draggable.tsx @@ -68,7 +68,7 @@ const App: React.FC = () => { return ( - + {items.map((item) => ( ))} diff --git a/components/tag/demo/icon.tsx b/components/tag/demo/icon.tsx index 5749eb0f7f..04fbbe9563 100644 --- a/components/tag/demo/icon.tsx +++ b/components/tag/demo/icon.tsx @@ -8,7 +8,7 @@ import { import { Flex, Tag } from 'antd'; const App: React.FC = () => ( - + } color="#55acee"> Twitter diff --git a/components/tag/demo/status.tsx b/components/tag/demo/status.tsx index 91d55f375b..af768a92c5 100644 --- a/components/tag/demo/status.tsx +++ b/components/tag/demo/status.tsx @@ -12,7 +12,7 @@ import { Divider, Flex, Tag } from 'antd'; const App: React.FC = () => ( <> Without icon - + success processing error @@ -20,7 +20,7 @@ const App: React.FC = () => ( default With icon - + } color="success"> success diff --git a/components/tag/style/index.ts b/components/tag/style/index.ts index 365b095849..4165b0abe9 100644 --- a/components/tag/style/index.ts +++ b/components/tag/style/index.ts @@ -40,6 +40,8 @@ const genBaseStyle = (token: TagToken): CSSInterpolation => { ...resetComponent(token), display: 'inline-block', height: 'auto', + // https://github.com/ant-design/ant-design/pull/47504 + marginInlineEnd: token.marginXS, paddingInline, fontSize: token.tagFontSize, lineHeight: token.tagLineHeight, From 8460eb39c3acc7773d005724cead12177969a59c Mon Sep 17 00:00:00 2001 From: MadCcc Date: Wed, 6 Mar 2024 22:07:00 +0800 Subject: [PATCH 16/30] docs: changelog 5.15.1 (#47744) --- BUG_VERSIONS.json | 3 ++- CHANGELOG.en-US.md | 7 +++++++ CHANGELOG.zh-CN.md | 7 +++++++ package.json | 2 +- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/BUG_VERSIONS.json b/BUG_VERSIONS.json index b8770657d6..d2e791c807 100644 --- a/BUG_VERSIONS.json +++ b/BUG_VERSIONS.json @@ -51,5 +51,6 @@ "5.12.3": ["https://github.com/ant-design/ant-design/issues/46525"], "5.12.6": ["https://github.com/ant-design/ant-design/issues/46719"], "5.13.0": ["https://github.com/ant-design/ant-design/pull/46962"], - "5.14.0": ["https://github.com/ant-design/ant-design/issues/47354"] + "5.14.0": ["https://github.com/ant-design/ant-design/issues/47354"], + "5.15.0": ["https://github.com/ant-design/ant-design/pull/47504#issuecomment-1980459433"] } diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 6c329124a9..aca675c661 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -16,6 +16,13 @@ tag: vVERSION --- +## 5.15.1 + +`2024-03-06` + +- 🐞 Revert code that removed margin of Tag. [#47736](https://github.com/ant-design/ant-design/pull/47736) +- 🇷🇺 Improve DatePicker ru_RU locale. [#47705](https://github.com/ant-design/ant-design/pull/47705) + ## 5.15.0 `2024-03-02` diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index fc6664d6b5..df6bdecb2f 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -16,6 +16,13 @@ tag: vVERSION --- +## 5.15.1 + +`2024-03-06` + +- 🐞 回滚移除 Tag 默认间距的代码。[#47736](https://github.com/ant-design/ant-design/pull/47736) +- 🇷🇺 更新 DatePicker 的俄语文案。[#47705](https://github.com/ant-design/ant-design/pull/47705) + ## 5.15.0 `2024-03-02` diff --git a/package.json b/package.json index 3006ead1aa..383a2e3e67 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "antd", - "version": "5.15.0", + "version": "5.15.1", "description": "An enterprise-class UI design language and React components implementation", "keywords": [ "ant", From a5356347ace8052cf6efa9282e831c777cd26752 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Mar 2024 22:23:05 +0800 Subject: [PATCH 17/30] chore(deps-dev): update typedoc requirement from ^0.25.10 to ^0.25.11 (#47739) Updates the requirements on [typedoc](https://github.com/TypeStrong/TypeDoc) to permit the latest version. - [Release notes](https://github.com/TypeStrong/TypeDoc/releases) - [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md) - [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.25.10...v0.25.11) --- updated-dependencies: - dependency-name: typedoc dependency-type: direct:development ... 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 383a2e3e67..4f8a2b105b 100644 --- a/package.json +++ b/package.json @@ -326,7 +326,7 @@ "tar-fs": "^3.0.5", "terser": "^5.28.1", "tsx": "^4.7.1", - "typedoc": "^0.25.10", + "typedoc": "^0.25.11", "typescript": "~5.3.3", "vanilla-jsoneditor": "^0.22.0", "vanilla-tilt": "^1.8.1", From e1da03d6f5a509ff5cd89bd385fbfbc117acaffc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Mar 2024 01:56:21 +0800 Subject: [PATCH 18/30] chore(deps): update rc-util requirement from ^5.38.2 to ^5.39.0 (#47741) Updates the requirements on [rc-util](https://github.com/react-component/util) to permit the latest version. - [Release notes](https://github.com/react-component/util/releases) - [Changelog](https://github.com/react-component/util/blob/master/HISTORY.md) - [Commits](https://github.com/react-component/util/compare/v5.38.2...v5.39.0) --- updated-dependencies: - dependency-name: rc-util 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 4f8a2b105b..7422eb1741 100644 --- a/package.json +++ b/package.json @@ -160,7 +160,7 @@ "rc-tree": "~5.8.5", "rc-tree-select": "~5.18.0", "rc-upload": "~4.5.2", - "rc-util": "^5.38.2", + "rc-util": "^5.39.0", "scroll-into-view-if-needed": "^3.1.0", "throttle-debounce": "^5.0.0" }, From f826d3da35dbbb0801fb22683e62e1d82617e17d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Mar 2024 01:56:58 +0800 Subject: [PATCH 19/30] chore(deps-dev): bump the dev-dependencies group with 2 updates (#47745) --- updated-dependencies: - dependency-name: "@types/react-dom" 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7422eb1741..9171c755d5 100644 --- a/package.json +++ b/package.json @@ -210,7 +210,7 @@ "@types/qs": "^6.9.12", "@types/react": "18.2.60", "@types/react-copy-to-clipboard": "^5.0.7", - "@types/react-dom": "^18.2.19", + "@types/react-dom": "^18.2.20", "@types/react-highlight-words": "^0.16.7", "@types/react-resizable": "^3.0.7", "@types/semver": "^7.5.8", @@ -324,7 +324,7 @@ "sylvanas": "^0.6.1", "tar": "^6.2.0", "tar-fs": "^3.0.5", - "terser": "^5.28.1", + "terser": "^5.29.1", "tsx": "^4.7.1", "typedoc": "^0.25.11", "typescript": "~5.3.3", From 3d7a3813edb1ce80425f1634d469fde3288bea3a Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 7 Mar 2024 10:08:06 +0800 Subject: [PATCH 20/30] fix: Descriptions extra padding (#47737) --- components/descriptions/style/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/descriptions/style/index.ts b/components/descriptions/style/index.ts index 9df8763c1a..d34fc297cc 100644 --- a/components/descriptions/style/index.ts +++ b/components/descriptions/style/index.ts @@ -59,7 +59,6 @@ const genBorderedStyle = (token: DescriptionsToken): CSSObject => { border: `${unit(token.lineWidth)} ${token.lineType} ${token.colorSplit}`, '> table': { tableLayout: 'auto', - borderCollapse: 'collapse', }, [`${componentCls}-row`]: { borderBottom: `${unit(token.lineWidth)} ${token.lineType} ${token.colorSplit}`, @@ -140,6 +139,7 @@ const genDescriptionStyles: GenerateStyle = (token) => { table: { width: '100%', tableLayout: 'fixed', + borderCollapse: 'collapse', }, }, [`${componentCls}-row`]: { @@ -155,7 +155,7 @@ const genDescriptionStyles: GenerateStyle = (token) => { fontWeight: 'normal', fontSize: token.fontSize, lineHeight: token.lineHeight, - textAlign: `start`, + textAlign: 'start', '&::after': { content: '":"', From c2938c14f2dddd4579980905cb8fc9871486b716 Mon Sep 17 00:00:00 2001 From: yingjiechen <53926916+jj19100@users.noreply.github.com> Date: Thu, 7 Mar 2024 12:39:40 +0800 Subject: [PATCH 21/30] docs: change the default value 'closeable' (#47730) Change the default value of the attribute 'closeable' from true to false Signed-off-by: yingjiechen <53926916+jj19100@users.noreply.github.com> --- components/modal/index.zh-CN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/modal/index.zh-CN.md b/components/modal/index.zh-CN.md index d8140d4700..6bd4375361 100644 --- a/components/modal/index.zh-CN.md +++ b/components/modal/index.zh-CN.md @@ -104,7 +104,7 @@ demo: | cancelText | 设置 Modal.confirm 取消按钮文字 | string | `取消` | | | centered | 垂直居中展示 Modal | boolean | false | | | className | 容器类名 | string | - | | -| closable | 是否显示右上角的关闭按钮 | boolean | false | 4.9.0 | +| closable | 是否显示右上角的关闭按钮 | boolean | true | 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 | From 3843ac5cb2c46ae795b3938127d9c4847c9ae2d5 Mon Sep 17 00:00:00 2001 From: Alexey Teterin Date: Fri, 8 Mar 2024 03:53:16 +0500 Subject: [PATCH 22/30] fix: fix ru_RU locale for DatePicker (#47768) Co-authored-by: Alexey Teterin --- components/date-picker/locale/ru_RU.ts | 2 +- .../__tests__/__snapshots__/index.test.tsx.snap | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/components/date-picker/locale/ru_RU.ts b/components/date-picker/locale/ru_RU.ts index 5342b41631..44f40df517 100644 --- a/components/date-picker/locale/ru_RU.ts +++ b/components/date-picker/locale/ru_RU.ts @@ -16,7 +16,7 @@ const locale: PickerLocale = { rangeYearPlaceholder: ['Начальный год', 'Год окончания'], rangeMonthPlaceholder: ['Начальный месяц', 'Конечный месяц'], rangeWeekPlaceholder: ['Начальная неделя', 'Конечная неделя'], - shortWeekDays: ['Вскр', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сбб'], + shortWeekDays: ['Вс', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'], shortMonths: ['Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн', 'Июл', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек'], ...CalendarLocale, }, diff --git a/components/locale/__tests__/__snapshots__/index.test.tsx.snap b/components/locale/__tests__/__snapshots__/index.test.tsx.snap index f4f89b2200..642ac6e792 100644 --- a/components/locale/__tests__/__snapshots__/index.test.tsx.snap +++ b/components/locale/__tests__/__snapshots__/index.test.tsx.snap @@ -281920,10 +281920,10 @@ exports[`Locale Provider should display the text as ru 1`] = ` Пт - Сбб + Сб - Вскр + Вс @@ -284141,10 +284141,10 @@ exports[`Locale Provider should display the text as ru 1`] = ` Пт - Сбб + Сб - Вскр + Вс @@ -284677,10 +284677,10 @@ exports[`Locale Provider should display the text as ru 1`] = ` Пт - Сбб + Сб - Вскр + Вс @@ -285826,10 +285826,10 @@ exports[`Locale Provider should display the text as ru 1`] = ` Пт - Сбб + Сб - Вскр + Вс From 14eb973d73ce5a60358a7c712a97d4f15eda4f71 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Mar 2024 06:53:43 +0800 Subject: [PATCH 23/30] chore(deps): update rc-util requirement from ^5.39.0 to ^5.39.1 (#47766) Updates the requirements on [rc-util](https://github.com/react-component/util) to permit the latest version. - [Release notes](https://github.com/react-component/util/releases) - [Changelog](https://github.com/react-component/util/blob/master/HISTORY.md) - [Commits](https://github.com/react-component/util/compare/v5.39.0...v5.39.1) --- updated-dependencies: - dependency-name: rc-util 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 9171c755d5..305d4b9045 100644 --- a/package.json +++ b/package.json @@ -160,7 +160,7 @@ "rc-tree": "~5.8.5", "rc-tree-select": "~5.18.0", "rc-upload": "~4.5.2", - "rc-util": "^5.39.0", + "rc-util": "^5.39.1", "scroll-into-view-if-needed": "^3.1.0", "throttle-debounce": "^5.0.0" }, From 30ae7fcf2a29253a11d18eac20d16419378a14ee Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Mar 2024 06:54:19 +0800 Subject: [PATCH 24/30] chore(deps): update rc-picker requirement from ~4.2.0 to ~4.2.1 (#47764) 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.2.0...v4.2.1) --- 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 305d4b9045..d4ec594332 100644 --- a/package.json +++ b/package.json @@ -144,7 +144,7 @@ "rc-motion": "^2.9.0", "rc-notification": "~5.3.0", "rc-pagination": "~4.0.4", - "rc-picker": "~4.2.0", + "rc-picker": "~4.2.1", "rc-progress": "~3.5.1", "rc-rate": "~2.12.0", "rc-resize-observer": "^1.4.0", From 1c7d133de5d59c0d9ff7a588c63c64f698ef429a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Mar 2024 06:54:43 +0800 Subject: [PATCH 25/30] chore(deps): update rc-select requirement from ~14.12.0 to ~14.12.1 (#47765) Updates the requirements on [rc-select](https://github.com/react-component/select) to permit the latest version. - [Release notes](https://github.com/react-component/select/releases) - [Commits](https://github.com/react-component/select/compare/v14.12.0...v14.12.1) --- updated-dependencies: - dependency-name: rc-select 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 d4ec594332..2a5a633a2e 100644 --- a/package.json +++ b/package.json @@ -149,7 +149,7 @@ "rc-rate": "~2.12.0", "rc-resize-observer": "^1.4.0", "rc-segmented": "~2.3.0", - "rc-select": "~14.12.0", + "rc-select": "~14.12.1", "rc-slider": "~10.5.0", "rc-steps": "~6.0.1", "rc-switch": "~4.1.0", From 998eaf1849305a125df3522e29abb6c38b8a7230 Mon Sep 17 00:00:00 2001 From: xiejiahe Date: Fri, 8 Mar 2024 07:12:03 +0800 Subject: [PATCH 26/30] test: remove null check (#47759) `querySelectorAll` always returns an array without the need for null check. Signed-off-by: xiejiahe --- components/descriptions/__tests__/index.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/descriptions/__tests__/index.test.tsx b/components/descriptions/__tests__/index.test.tsx index f3d48e317e..861c3e781c 100644 --- a/components/descriptions/__tests__/index.test.tsx +++ b/components/descriptions/__tests__/index.test.tsx @@ -357,7 +357,7 @@ describe('Descriptions', () => { , ); - const nestDesc = container.querySelectorAll('.ant-descriptions')?.[1]; + const nestDesc = container.querySelectorAll('.ant-descriptions')[1]; const view = nestDesc.querySelector('.ant-descriptions-view'); expect(getComputedStyle(view!).border).toBeFalsy(); }); From ade622e8f41a28b6315ddafb3f57f586cae98aca Mon Sep 17 00:00:00 2001 From: ChuYang <45116321+ChuYang-FE@users.noreply.github.com> Date: Fri, 8 Mar 2024 07:17:46 +0800 Subject: [PATCH 27/30] demo: a wrong word (#47746) * fix: a wrong word * fix: update snapshot --- .../__tests__/__snapshots__/demo-extend.test.ts.snap | 6 +++--- .../typography/__tests__/__snapshots__/demo.test.tsx.snap | 6 +++--- components/typography/demo/suffix.tsx | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/typography/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/typography/__tests__/__snapshots__/demo-extend.test.ts.snap index 688a799537..a60e36b09e 100644 --- a/components/typography/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/typography/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -2197,11 +2197,11 @@ Array [
,
- To be, or not to be, that is a question: Whether it is nobler in the mind to suffer. The slings and arrows of outrageous fortune Or to take arms against a sea of troubles, And by opposing end them? To die: to sleep; No more; and by a sleep to say we end The heart-ache and the thousand natural shocks That flesh is heir to, 'tis a consummation Devoutly to be wish'd. To die, to sleep To sleep- perchance to dream: ay, there's the rub! For in that sleep of death what dreams may come When we have shuffled off this mortal coil, Must give us pause. There 's the respect That makes calamity of so long life--William Shakespeare + To be, or not to be, that is the question: Whether it is nobler in the mind to suffer. The slings and arrows of outrageous fortune Or to take arms against a sea of troubles, And by opposing end them? To die: to sleep; No more; and by a sleep to say we end The heart-ache and the thousand natural shocks That flesh is heir to, 'tis a consummation Devoutly to be wish'd. To die, to sleep To sleep- perchance to dream: ay, there's the rub! For in that sleep of death what dreams may come When we have shuffled off this mortal coil, Must give us pause. There 's the respect That makes calamity of so long life--William Shakespeare
, ] `; diff --git a/components/typography/__tests__/__snapshots__/demo.test.tsx.snap b/components/typography/__tests__/__snapshots__/demo.test.tsx.snap index 7aa38cda04..397a4a374e 100644 --- a/components/typography/__tests__/__snapshots__/demo.test.tsx.snap +++ b/components/typography/__tests__/__snapshots__/demo.test.tsx.snap @@ -1687,11 +1687,11 @@ Array [ />
,
- To be, or not to be, that is a question: Whether it is nobler in the mind to suffer. The slings and arrows of outrageous fortune Or to take arms against a sea of troubles, And by opposing end them? To die: to sleep; No more; and by a sleep to say we end The heart-ache and the thousand natural shocks That flesh is heir to, 'tis a consummation Devoutly to be wish'd. To die, to sleep To sleep- perchance to dream: ay, there's the rub! For in that sleep of death what dreams may come When we have shuffled off this mortal coil, Must give us pause. There 's the respect That makes calamity of so long life + To be, or not to be, that is the question: Whether it is nobler in the mind to suffer. The slings and arrows of outrageous fortune Or to take arms against a sea of troubles, And by opposing end them? To die: to sleep; No more; and by a sleep to say we end The heart-ache and the thousand natural shocks That flesh is heir to, 'tis a consummation Devoutly to be wish'd. To die, to sleep To sleep- perchance to dream: ay, there's the rub! For in that sleep of death what dreams may come When we have shuffled off this mortal coil, Must give us pause. There 's the respect That makes calamity of so long life --William Shakespeare
, diff --git a/components/typography/demo/suffix.tsx b/components/typography/demo/suffix.tsx index 254b1262bc..29c4344eb5 100644 --- a/components/typography/demo/suffix.tsx +++ b/components/typography/demo/suffix.tsx @@ -7,7 +7,7 @@ const App: React.FC = () => { const [rows, setRows] = useState(1); const article = - "To be, or not to be, that is a question: Whether it is nobler in the mind to suffer. The slings and arrows of outrageous fortune Or to take arms against a sea of troubles, And by opposing end them? To die: to sleep; No more; and by a sleep to say we end The heart-ache and the thousand natural shocks That flesh is heir to, 'tis a consummation Devoutly to be wish'd. To die, to sleep To sleep- perchance to dream: ay, there's the rub! For in that sleep of death what dreams may come When we have shuffled off this mortal coil, Must give us pause. There 's the respect That makes calamity of so long life"; + "To be, or not to be, that is the question: Whether it is nobler in the mind to suffer. The slings and arrows of outrageous fortune Or to take arms against a sea of troubles, And by opposing end them? To die: to sleep; No more; and by a sleep to say we end The heart-ache and the thousand natural shocks That flesh is heir to, 'tis a consummation Devoutly to be wish'd. To die, to sleep To sleep- perchance to dream: ay, there's the rub! For in that sleep of death what dreams may come When we have shuffled off this mortal coil, Must give us pause. There 's the respect That makes calamity of so long life"; return ( <> From 36122780d724d1c90ad9fb7ad8d6c1413c0a62bb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Mar 2024 09:00:51 +0800 Subject: [PATCH 28/30] chore(deps-dev): bump the dev-dependencies group with 3 updates (#47763) * chore(deps-dev): bump the dev-dependencies group with 5 updates --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development dependency-group: dev-dependencies - dependency-name: "@types/react-dom" dependency-type: direct:development dependency-group: dev-dependencies - dependency-name: eslint-plugin-markdown dependency-type: direct:development update-type: version-update:semver-major dependency-group: dev-dependencies - dependency-name: qs dependency-type: direct:development dependency-group: dev-dependencies - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev-dependencies ... Signed-off-by: dependabot[bot] * Update package.json Signed-off-by: lijianan <574980606@qq.com> * Update package.json Signed-off-by: lijianan <574980606@qq.com> --------- Signed-off-by: dependabot[bot] Signed-off-by: lijianan <574980606@qq.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: lijianan <574980606@qq.com> --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 2a5a633a2e..ef4e8db4dc 100644 --- a/package.json +++ b/package.json @@ -201,7 +201,7 @@ "@types/jsdom": "^21.1.6", "@types/lodash": "^4.14.202", "@types/minimist": "^1.2.5", - "@types/node": "^20.11.24", + "@types/node": "^20.11.25", "@types/nprogress": "^0.2.3", "@types/pixelmatch": "^5.2.6", "@types/pngjs": "^6.0.4", @@ -210,7 +210,7 @@ "@types/qs": "^6.9.12", "@types/react": "18.2.60", "@types/react-copy-to-clipboard": "^5.0.7", - "@types/react-dom": "^18.2.20", + "@types/react-dom": "^18.2.21", "@types/react-highlight-words": "^0.16.7", "@types/react-resizable": "^3.0.7", "@types/semver": "^7.5.8", @@ -288,7 +288,7 @@ "prismjs": "^1.29.0", "progress": "^2.0.3", "puppeteer": "^22.4.0", - "qs": "^6.11.2", + "qs": "^6.12.0", "rc-footer": "^0.6.8", "rc-tween-one": "^3.0.6", "rc-virtual-list": "^3.11.4", From 7d9bc97c9b7ceb41ea6ec4788d43fa1198937c3b Mon Sep 17 00:00:00 2001 From: afc163 Date: Fri, 8 Mar 2024 10:19:23 +0800 Subject: [PATCH 29/30] style: add ColorPicker clear icon hover style (#47761) --- components/color-picker/style/index.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/color-picker/style/index.ts b/components/color-picker/style/index.ts index e2e4fc2a37..d96323f3bf 100644 --- a/components/color-picker/style/index.ts +++ b/components/color-picker/style/index.ts @@ -55,7 +55,7 @@ const genClearStyle = ( size: number, extraStyle?: CSSObject, ): CSSObject => { - const { componentCls, borderRadiusSM, lineWidth, colorSplit, red6 } = token; + const { componentCls, borderRadiusSM, lineWidth, colorSplit, colorBorder, red6 } = token; return { [`${componentCls}-clear`]: { @@ -65,6 +65,9 @@ const genClearStyle = ( border: `${unit(lineWidth)} solid ${colorSplit}`, position: 'relative', overflow: 'hidden', + cursor: 'pointer', + transition: `all ${token.motionDurationFast}`, + ...extraStyle, '&::after': { content: '""', @@ -78,6 +81,10 @@ const genClearStyle = ( transform: 'rotate(-45deg)', backgroundColor: red6, }, + + '&:hover': { + borderColor: colorBorder, + }, }, }; }; From 630f4d9cfbf84fa7fd44db7292e441da66f7cbbf Mon Sep 17 00:00:00 2001 From: lijianan <574980606@qq.com> Date: Fri, 8 Mar 2024 10:51:31 +0800 Subject: [PATCH 30/30] demo: Tag demo update (#47751) * demo: Tag demo update * fix: fix * fix: fix --- .../__snapshots__/demo-extend.test.ts.snap | 4 ++-- .../__snapshots__/demo.test.tsx.snap | 4 ++-- components/select/demo/custom-tag-render.tsx | 9 +++++++-- .../__snapshots__/demo-extend.test.ts.snap | 20 +++++++++---------- .../__tests__/__snapshots__/demo.test.ts.snap | 20 +++++++++---------- components/table/demo/jsx.tsx | 16 ++++++++++----- 6 files changed, 42 insertions(+), 31 deletions(-) diff --git a/components/select/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/select/__tests__/__snapshots__/demo-extend.test.ts.snap index 9b3737c359..1030acf613 100644 --- a/components/select/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/select/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -1522,7 +1522,7 @@ exports[`renders components/select/demo/custom-tag-render.tsx extend context cor gold cyan gold cyan { const { label, value, closable, onClose } = props; @@ -18,7 +23,7 @@ const tagRender: TagRender = (props) => { onMouseDown={onPreventMouseDown} closable={closable} onClose={onClose} - style={{ marginRight: 3 }} + style={{ marginInlineEnd: 4 }} > {label} diff --git a/components/table/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/table/__tests__/__snapshots__/demo-extend.test.ts.snap index 376e356b05..ae446a0726 100644 --- a/components/table/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/table/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -17451,14 +17451,14 @@ exports[`renders components/table/demo/jsx.tsx extend context correctly 1`] = ` class="ant-table-cell" > - nice + NICE - developer + DEVELOPER - loser + LOSER - cool + COOL - teacher + TEACHER - nice + NICE - developer + DEVELOPER - loser + LOSER - cool + COOL - teacher + TEACHER ( key="tags" render={(tags: string[]) => ( <> - {tags.map((tag) => ( - - {tag} - - ))} + {tags.map((tag) => { + let color = tag.length > 5 ? 'geekblue' : 'green'; + if (tag === 'loser') { + color = 'volcano'; + } + return ( + + {tag.toUpperCase()} + + ); + })} )} />