diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 1bba766afc..9eb28f7704 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -15,6 +15,59 @@ timeline: true --- +## 4.17.0 + +`2021-09-01` + +- 🔥 ConfigProvider support dynamic modify theme color. [view detail](/docs/react/customize-theme-variable). [#31496](https://github.com/ant-design/ant-design/pull/31496) +- Table + - 🔥 Table adds `column.filterMode` to support filter in a tree, which could set to `'menu' | 'tree'`. [#31809](https://github.com/ant-design/ant-design/pull/31809) + - 🔥 Table adds `column.filterSearch` for enable search function in filter dropdown. [#31809](https://github.com/ant-design/ant-design/pull/31809) + - 💄 Table filter reset button won't close dropdown now. [#31809](https://github.com/ant-design/ant-design/pull/31809) + - 💄 Tweak Transfer filter search input icon position. [#31809](https://github.com/ant-design/ant-design/pull/31809) + - 🐞 Revert Table sticky `z-index` style back to `calc` instead of less calculation to fix `auto` style failure. [#31874](https://github.com/ant-design/ant-design/pull/31874) [@bconnorwhite](https://github.com/bconnorwhite) + - 🐞 Fix Table scroll bar display issue when data dynamic changed. [#647](https://github.com/react-component/table/pull/647) [@lanten](https://github.com/lanten) +- Cascader + - 🔥 Cascader support `multiple` mode. [#31936](https://github.com/ant-design/ant-design/pull/31936) + - 🆕 Cascader add `title` prop with content by default. [#31237](https://github.com/ant-design/ant-design/pull/31237) [@yingpengsha](https://github.com/yingpengsha) +- 🐞 Fix Steps default responsive style not working. [#31965](https://github.com/ant-design/ant-design/pull/31965) [@tangjinzhou](https://github.com/tangjinzhou) +- InputNumber + - 🔥 InputNumber support `addonBefore` and `addonAfter`. [#31432](https://github.com/ant-design/ant-design/pull/31432) [@Austaras](https://github.com/Austaras) + - 💄 Show InputNumber handler when focus it. [#31911](https://github.com/ant-design/ant-design/pull/31911) + - 🆕 InputNumber now supports `controls` for displaying `+-` buttons or not. [#31548](https://github.com/ant-design/ant-design/pull/31548) + - 🆕 InputNumber `formatter` support additional param to check if current input is user typing. [#31030](https://github.com/ant-design/ant-design/pull/31030) +- 🐞 Fix Input cannot clear content when focus it. [#31931](https://github.com/ant-design/ant-design/pull/31931) [@adaex](https://github.com/adaex) +- 🐞 Fix anchor `targetOffset` not work when contain spaces. [#31952](https://github.com/ant-design/ant-design/pull/31952) [@adaex](https://github.com/adaex) +- 🆕 TreeSelect and Select support `fieldNames`. [#31925](https://github.com/ant-design/ant-design/pull/31925) +- Select + - 🆕 Select support `ctrl + n/p` on mac. [#650](https://github.com/react-component/select/pull/650) + - 🆕 Select add `title` for tag in `multiple` mode. [#637](https://github.com/react-component/select/pull/637) +- Transfer + - 🐞 Fix Transfer list `direction` value in RTL mode. [#31903](https://github.com/ant-design/ant-design/pull/31903) + - 🆕 Transfer support custom left and right `footer`. [#31108](https://github.com/ant-design/ant-design/pull/31108) + - 🆕 Transfer supports `locale.notFoundContent` with array. [#31088](https://github.com/ant-design/ant-design/pull/31088) [@wwyx778](https://github.com/wwyx778) +- 🆕 `DatePicker` and `RangePicker` now support `nextIcon`, `prevIcon`, `superNextIcon` and `superPrevIcon`. [#31703](https://github.com/ant-design/ant-design/pull/31703) [@Oreoz](https://github.com/Oreoz) +- 🆕 Notification support `maxCount` to limit count. [#31807](https://github.com/ant-design/ant-design/pull/31807) [@binyellow](https://github.com/binyellow) +- 🆕 Menu.Divider support `dashed` style. [#31379](https://github.com/ant-design/ant-design/pull/31379) [@Map1en](https://github.com/Map1en) +- Tree + - 🆕 Tree support `fieldNames` to customize node field name. [#31395](https://github.com/ant-design/ant-design/pull/31395) + - 🆕 Tree support `onScroll` in virtual scroll. [#474](https://github.com/react-component/tree/pull/474) + - 🐞 Fix Tree drop outside not clear indicator. [#478](https://github.com/react-component/tree/pull/478) +- 💄 Add `@checkbox-border-radius` less variable. [#31360](https://github.com/ant-design/ant-design/pull/31360) [@Gherciu](https://github.com/Gherciu) +- 🐞 Avatar add `crossOrigin` property to resolve cross origin issue. [#31273](https://github.com/ant-design/ant-design/pull/31273) [@Map1en](https://github.com/Map1en) +- Drawer + - 🆕 Tweak Drawer close icon position and default width, add `extra` and `size` props. [#30908](https://github.com/ant-design/ant-design/pull/30908) + - 🆕 Drawer support `autoFocus` prop. [#181](https://github.com/react-component/drawer/pull/181) +- 🆕 Skeleton.Button add `block` prop. [#30902](https://github.com/ant-design/ant-design/pull/30902) [@Jehu](https://github.com/Jehu) +- 🆕 Popconfirm `onConfirm` supports Promise. [#30871](https://github.com/ant-design/ant-design/pull/30871) [@wendellhu95](https://github.com/wendellhu95) +- Form + - 🆕 Form.ErrorList support customize `className`. [#30887](https://github.com/ant-design/ant-design/pull/30887) + - 🔥 Form `rule` support `warningOnly` to avoid form submit. [#30829](https://github.com/ant-design/ant-design/pull/30829) +- 🌐 Localization + - 🇮🇳 Added Malayalam (ml_IN) locale. [#31521](https://github.com/ant-design/ant-design/pull/31521) [@khjabir](https://github.com/khjabir) + - 🇵🇰 Added Urdu language (ur_PK) locale. [#31346](https://github.com/ant-design/ant-design/pull/31346) [@MuhammadAnas190](https://github.com/MuhammadAnas190) + - 🇧🇩 Added bn_BD (Bangla) locale. [#31257](https://github.com/ant-design/ant-design/pull/31257) [@AminulBD](https://github.com/AminulBD) + ## 4.16.13 `2021-08-23` diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index d19471c4d9..6beea2da3d 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -15,6 +15,59 @@ timeline: true --- +## 4.17.0 + +`2021-09-01` + +- 🔥 ConfigProvider 支持动态配置主题色,[详细文档](/docs/react/customize-theme-variable)。[#31496](https://github.com/ant-design/ant-design/pull/31496) +- Table + - 🔥 Table 新增 `column.filterMode` 以支持配置树形筛选菜单,可选值为 `'menu' | 'tree'`。[#31809](https://github.com/ant-design/ant-design/pull/31809) + - 🔥 Table 新增 `column.filterSearch` 以支持开启筛选列搜索功能。[#31809](https://github.com/ant-design/ant-design/pull/31809) + - 💄 Table 筛选菜单重置按钮现在不再关闭菜单和生效。[#31809](https://github.com/ant-design/ant-design/pull/31809) + - 💄 调整 Transfer 筛选搜索框图标位置,使其和表格筛选搜索框统一。[#31809](https://github.com/ant-design/ant-design/pull/31809) + - 🐞 回滚 Table sticky `z-index` 样式的 less 计算到 `calc`,以防止 `auto` 样式计算错误问题。[#31874](https://github.com/ant-design/ant-design/pull/31874) [@bconnorwhite](https://github.com/bconnorwhite) + - 🐞 修复 Table 在数据变更后滚动条展示问题。[#647](https://github.com/react-component/table/pull/647) [@lanten](https://github.com/lanten) +- Cascader + - 🔥 Cascader 支持 `multiple` 模式。[#31936](https://github.com/ant-design/ant-design/pull/31936) + - 🆕 在 `Cascader` 组件中,默认给选中值的文本添加 `title` 属性。[#31237](https://github.com/ant-design/ant-design/pull/31237) [@yingpengsha](https://github.com/yingpengsha) +- 🐞 修复 Steps 默认响应式不生效的问题。[#31965](https://github.com/ant-design/ant-design/pull/31965) [@tangjinzhou](https://github.com/tangjinzhou) +- InputNumber + - 🔥 InputNumber 增加 `addonBefore` 和 `addonAfter` 属性支持。[#31432](https://github.com/ant-design/ant-design/pull/31432) [@Austaras](https://github.com/Austaras) + - 💄 聚焦 InputNumber 时将始终显示加减操作区。[#31911](https://github.com/ant-design/ant-design/pull/31911) + - 🆕 InputNumber 新增 `controls` 属性用于控制是否显示加减按钮。[#31548](https://github.com/ant-design/ant-design/pull/31548) + - 🆕 InputNumber `formatter` 支持额外参数用以检测当前变更是否为用户输入。[#31030](https://github.com/ant-design/ant-design/pull/31030) +- 🐞 修复 Input 聚焦时点击清除图标无效的问题。[#31931](https://github.com/ant-design/ant-design/pull/31931) [@adaex](https://github.com/adaex) +- 🐞 修复 Anchor 组件包含空格时 `targetOffset` 属性不生效的问题。[#31952](https://github.com/ant-design/ant-design/pull/31952) [@adaex](https://github.com/adaex) +- 🆕 TreeSelect 和 Select 支持 `fieldNames` 自定义字段名称。[#31925](https://github.com/ant-design/ant-design/pull/31925) +- Select + - 🆕 Select 支持 mac 的 `ctrl + n/p` 快捷键组合。[#650](https://github.com/react-component/select/pull/650) + - 🆕 Select 在 `multiple` 模式下,tag 添加 `title` 属性。[#637](https://github.com/react-component/select/pull/637) +- Transfer + - 🐞 修复 Transfer 列表在 RTL 模式下 `direction` 取值。[#31903](https://github.com/ant-design/ant-design/pull/31903) + - 🆕 Transfer 新增自定义左右 `footer`。[#31108](https://github.com/ant-design/ant-design/pull/31108) + - 🆕 Transfer 支持 `locale.notFoundContent` 传入数组。[#31088](https://github.com/ant-design/ant-design/pull/31088) [@wwyx778](https://github.com/wwyx778) +- 🆕 `DatePicker` 和 `RangePicker` 现在支持 `nextIcon`、`prevIcon`、`superNextIcon` 和 `superPrevIcon`。[#31703](https://github.com/ant-design/ant-design/pull/31703) [@Oreoz](https://github.com/Oreoz) +- 🆕 Notification 支持 `maxCount` 属性以限制最大显示数。[#31807](https://github.com/ant-design/ant-design/pull/31807) [@binyellow](https://github.com/binyellow) +- 🆕 增加 Menu.Divider 的 `dashed` 属性。[#31379](https://github.com/ant-design/ant-design/pull/31379) [@Map1en](https://github.com/Map1en) +- Tree + - 🆕 Tree 添加 `fieldNames` 属性以支持自定义节点字段名称。[#31395](https://github.com/ant-design/ant-design/pull/31395) + - 🆕 Tree 虚拟滚动也支持 `onScroll` 事件。[#474](https://github.com/react-component/tree/pull/474) + - 🐞 修复 Tree 拖拽到外部时没有清空指示器的问题。[#478](https://github.com/react-component/tree/pull/478) +- 💄 新增 Less 变量 `@checkbox-border-radius`。[#31360](https://github.com/ant-design/ant-design/pull/31360) [@Gherciu](https://github.com/Gherciu) +- 🐞 Avatar 增加 `crossOrigin` 参数以解决跨域问题。[#31273](https://github.com/ant-design/ant-design/pull/31273) [@Map1en](https://github.com/Map1en) +- Drawer + - 🆕 调整 Drawer 关闭按钮位置和默认宽度,新增 `extra` 操作区域和 `size` 大小属性。[#30908](https://github.com/ant-design/ant-design/pull/30908) + - 🆕 Drawer 支持 `autoFocus` 属性。[#181](https://github.com/react-component/drawer/pull/181) +- 🆕 Skeleton.Button 添加 `block` 属性。[#30902](https://github.com/ant-design/ant-design/pull/30902) [@Jehu](https://github.com/Jehu) +- 🆕 Popconfirm 组件的 `onComfirm` 允许返回一个 Promise。[#30871](https://github.com/ant-design/ant-design/pull/30871) [@wendellhu95](https://github.com/wendellhu95) +- Form + - 🆕 Form.ErrorList 支持自定义 `className` 属性。[#30887](https://github.com/ant-design/ant-design/pull/30887) + - 🔥 Form `rule` 支持 `warningOnly` 实现非阻塞校验。[#30829](https://github.com/ant-design/ant-design/pull/30829) +- 🌐 国际化 + - 🇮🇳 添加马拉雅拉姆语 (ml_IN) 语言环境。[#31521](https://github.com/ant-design/ant-design/pull/31521) [@khjabir](https://github.com/khjabir) + - 🇵🇰 添加乌尔都语 (ur_PK) 语言环境。[#31346](https://github.com/ant-design/ant-design/pull/31346) [@MuhammadAnas190](https://github.com/MuhammadAnas190) + - 🇧🇩 添加孟加拉语 (bn_BD) 语言环境。[#31257](https://github.com/ant-design/ant-design/pull/31257) [@AminulBD](https://github.com/AminulBD) + ## 4.16.13 `2021-08-23` diff --git a/components/config-provider/__tests__/__snapshots__/components.test.js.snap b/components/config-provider/__tests__/__snapshots__/components.test.js.snap index 034aef950c..7522e24371 100644 --- a/components/config-provider/__tests__/__snapshots__/components.test.js.snap +++ b/components/config-provider/__tests__/__snapshots__/components.test.js.snap @@ -12299,6 +12299,7 @@ exports[`ConfigProvider components Drawer configProvider 1`] = ` class="" >
@@ -12363,6 +12364,7 @@ exports[`ConfigProvider components Drawer configProvider componentSize large 1`] class="" >
@@ -12427,6 +12429,7 @@ exports[`ConfigProvider components Drawer configProvider componentSize middle 1` class="" >
@@ -12491,6 +12494,7 @@ exports[`ConfigProvider components Drawer configProvider virtual and dropdownMat class="" >
@@ -12555,6 +12559,7 @@ exports[`ConfigProvider components Drawer normal 1`] = ` class="" >
@@ -12619,6 +12624,7 @@ exports[`ConfigProvider components Drawer prefixCls 1`] = ` class="" >
diff --git a/components/drawer/__tests__/__snapshots__/Drawer.test.js.snap b/components/drawer/__tests__/__snapshots__/Drawer.test.js.snap index d8d415af68..3aae9e8c75 100644 --- a/components/drawer/__tests__/__snapshots__/Drawer.test.js.snap +++ b/components/drawer/__tests__/__snapshots__/Drawer.test.js.snap @@ -5,6 +5,7 @@ exports[`Drawer className is test_drawer 1`] = ` class="" >
@@ -72,6 +73,7 @@ exports[`Drawer closable is false 1`] = ` class="" >
@@ -105,6 +107,7 @@ exports[`Drawer destroyOnClose is true 1`] = ` class="" >
@@ -242,6 +245,7 @@ exports[`Drawer have a footer 1`] = ` class="" >
@@ -313,6 +317,7 @@ exports[`Drawer have a title 1`] = ` class="" >
@@ -384,6 +389,7 @@ exports[`Drawer render correctly 1`] = ` class="" >
@@ -450,6 +456,7 @@ exports[`Drawer render top drawer 1`] = ` class="" >
@@ -518,6 +525,7 @@ exports[`Drawer style/drawerStyle/headerStyle/bodyStyle should work 1`] = ` class="" >
diff --git a/components/drawer/__tests__/__snapshots__/demo.test.js.snap b/components/drawer/__tests__/__snapshots__/demo.test.js.snap index 7e51b6b8b4..bbd523a9cc 100644 --- a/components/drawer/__tests__/__snapshots__/demo.test.js.snap +++ b/components/drawer/__tests__/__snapshots__/demo.test.js.snap @@ -313,6 +313,7 @@ exports[`renders ./components/drawer/demo/render-in-current.md correctly 1`] = ` class="" >
( ```ts ConfigProvider.config({ + prefixCls: 'custom', theme: { - prefixCls: 'custom', primaryColor: '#25b864', }, }); @@ -68,5 +70,5 @@ ConfigProvider.config({ 由于前缀变更,你需要重新生成一份对应的 css 文件。 ```bash -lessc --modify-var="ant-prefix=custom" antd/dist/antd.variable.less modified.css +lessc --modify-var="ant-prefix=custom" antd/dist/antd.variable.less modified.css ``` diff --git a/docs/react/customize-theme.en-US.md b/docs/react/customize-theme.en-US.md index ccff12a204..ab37aff515 100644 --- a/docs/react/customize-theme.en-US.md +++ b/docs/react/customize-theme.en-US.md @@ -105,6 +105,10 @@ Another approach to customize theme is creating a `less` file within variables t Note: This way will load the styles of all components, regardless of your demand, which cause `style` option of `babel-plugin-import` not working. +### Dynamic theme + +Runtime update theme color please [ref this doc](/docs/react/customize-theme-variable). + ## How to avoid modifying global styles? Currently ant-design is designed as a whole experience and modify global styles (eg `body` etc). If you need to integrate ant-design as a part of an existing website, it's likely you want to prevent ant-design to override global styles. diff --git a/docs/react/customize-theme.zh-CN.md b/docs/react/customize-theme.zh-CN.md index e0cc530169..7ebca0f1c7 100644 --- a/docs/react/customize-theme.zh-CN.md +++ b/docs/react/customize-theme.zh-CN.md @@ -105,6 +105,10 @@ module.exports = { 注意,这种方式已经载入了所有组件的样式,不需要也无法和按需加载插件 `babel-plugin-import` 的 `style` 属性一起使用。 +### 动态主题色 + +在运行时调整主题色请[参考此处](/docs/react/customize-theme-variable)。 + ## 没有生效? 注意样式必须加载 less 格式,一个常见的问题就是引入了多份样式,less 的样式被 css 的样式覆盖了。 diff --git a/package.json b/package.json index 18f726bb29..d96f0413de 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "antd", - "version": "4.16.13", + "version": "4.17.0-alpha.0", "description": "An enterprise-class UI design language and React components implementation", "title": "Ant Design", "keywords": [ @@ -121,7 +121,7 @@ "rc-checkbox": "~2.3.0", "rc-collapse": "~3.1.0", "rc-dialog": "~8.6.0", - "rc-drawer": "~4.3.0", + "rc-drawer": "~4.4.1", "rc-dropdown": "~3.2.0", "rc-field-form": "~1.21.0-2", "rc-image": "~5.2.5", @@ -139,7 +139,7 @@ "rc-slider": "~9.7.1", "rc-steps": "~4.1.0", "rc-switch": "~3.2.0", - "rc-table": "~7.16.0", + "rc-table": "~7.17.0", "rc-tabs": "~11.10.0", "rc-textarea": "~0.3.0", "rc-tooltip": "~5.1.1",