Skip to content

Commit 767dcc3

Browse files
authored
Merge branch 'ant-design:master' into master
2 parents 7def118 + a9c1cc5 commit 767dcc3

File tree

71 files changed

+17964
-15813
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+17964
-15813
lines changed

docs/changelog.en-US.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
## @ant-design/pro-components@2.8.8
2+
3+
`2025-06-10`
4+
5+
- feat(form): extend the input argument of the render method in the read mode of select (#9059). [#9059](https://github.com/ant-design/pro-components/pull/#9059) [@rubbishmaker](https://github.com/rubbishmaker)
6+
- fix(form): 修复 StrictMode 模式下,BetaSchemaForm-ModalForm 渲染表单项失败的问题 (#9069). [#9069](https://github.com/ant-design/pro-components/pull/#9069) [@Lemonnnnnnnnnnn](https://github.com/Lemonnnnnnnnnnn)
7+
- fix(form): 修复 validateDebounce 属性不生效的问题 (#9072). [#9072](https://github.com/ant-design/pro-components/pull/#9072) [@Lemonnnnnnnnnnn](https://github.com/Lemonnnnnnnnnnn)
8+
- fix(form): 修复使用QueryFilter时报findDOMNode is deprecated的问题。 (#9065). [#9065](https://github.com/ant-design/pro-components/pull/#9065) [@Jarod-Xie](https://github.com/Jarod-Xie)
9+
- fix(form): 给 select readonly 模式下 render 方法提供组件内部计算好的 options (#9068). [#9068](https://github.com/ant-design/pro-components/pull/#9068) [@zwmmm](https://github.com/zwmmm)
10+
- fix(form): 使用useRef优化valuePair的处理逻辑,确保在边界值外的值更新更为准确 (#9058). [#9058](https://github.com/ant-design/pro-components/pull/#9058) [@Lemonnnnnnnnnnn](https://github.com/Lemonnnnnnnnnnn)
11+
- feat(table): 新增 filter 與 sort 受控方式 (#9060). [#9060](https://github.com/ant-design/pro-components/pull/#9060) [@leadingtw273](https://github.com/leadingtw273)
12+
113
## @ant-design/pro-components@2.8.6
214

315
`2025-02-17`

docs/changelog.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
## @ant-design/pro-components@2.8.8
2+
3+
`2025-06-10`
4+
5+
- feat(form): extend the input argument of the render method in the read mode of select (#9059). [#9059](https://github.com/ant-design/pro-components/pull/#9059) [@rubbishmaker](https://github.com/rubbishmaker)
6+
- fix(form): 修复 StrictMode 模式下,BetaSchemaForm-ModalForm 渲染表单项失败的问题 (#9069). [#9069](https://github.com/ant-design/pro-components/pull/#9069) [@Lemonnnnnnnnnnn](https://github.com/Lemonnnnnnnnnnn)
7+
- fix(form): 修复 validateDebounce 属性不生效的问题 (#9072). [#9072](https://github.com/ant-design/pro-components/pull/#9072) [@Lemonnnnnnnnnnn](https://github.com/Lemonnnnnnnnnnn)
8+
- fix(form): 修复使用QueryFilter时报findDOMNode is deprecated的问题。 (#9065). [#9065](https://github.com/ant-design/pro-components/pull/#9065) [@Jarod-Xie](https://github.com/Jarod-Xie)
9+
- fix(form): 给 select readonly 模式下 render 方法提供组件内部计算好的 options (#9068). [#9068](https://github.com/ant-design/pro-components/pull/#9068) [@zwmmm](https://github.com/zwmmm)
10+
- fix(form): 使用useRef优化valuePair的处理逻辑,确保在边界值外的值更新更为准确 (#9058). [#9058](https://github.com/ant-design/pro-components/pull/#9058) [@Lemonnnnnnnnnnn](https://github.com/Lemonnnnnnnnnnn)
11+
- feat(table): 新增 filter 與 sort 受控方式 (#9060). [#9060](https://github.com/ant-design/pro-components/pull/#9060) [@leadingtw273](https://github.com/leadingtw273)
12+
113
## @ant-design/pro-components@2.8.6
214

315
`2025-02-17`

package.json

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@
5151
"@ant-design/antd-theme-variable": "^1.0.0",
5252
"@ant-design/cssinjs": "^1.23.0",
5353
"@ant-design/icons": "^5.6.1",
54-
"@babel/core": "^7.26.10",
55-
"@babel/eslint-plugin": "^7.27.0",
56-
"@babel/parser": "^7.27.0",
54+
"@babel/core": "^7.27.4",
55+
"@babel/eslint-plugin": "^7.27.1",
56+
"@babel/parser": "^7.27.5",
5757
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
58-
"@babel/preset-env": "^7.26.9",
59-
"@babel/preset-react": "^7.26.3",
60-
"@babel/preset-typescript": "^7.27.0",
61-
"@babel/traverse": "^7.27.0",
58+
"@babel/preset-env": "^7.27.2",
59+
"@babel/preset-react": "^7.27.1",
60+
"@babel/preset-typescript": "^7.27.1",
61+
"@babel/traverse": "^7.27.4",
6262
"@emotion/babel-plugin": "^11.13.5",
6363
"@emotion/cache": "^11.14.0",
6464
"@emotion/css": "^11.13.5",
@@ -68,19 +68,19 @@
6868
"@octokit/rest": "^18.12.0",
6969
"@testing-library/dom": "^10.4.0",
7070
"@testing-library/jest-dom": "^6.6.3",
71-
"@testing-library/react": "^16.2.0",
71+
"@testing-library/react": "^16.3.0",
7272
"@testing-library/react-hooks": "^8.0.1",
7373
"@testing-library/user-event": "^14.6.1",
7474
"@types/chroma-js": "^2.4.5",
7575
"@types/glob": "^8.1.0",
7676
"@types/history": "^4.7.11",
7777
"@types/jsdom": "^21.1.7",
78-
"@types/lodash": "^4.17.16",
78+
"@types/lodash": "^4.17.17",
7979
"@types/lodash-es": "^4.17.12",
8080
"@types/mockjs": "^1.0.10",
8181
"@types/node": "^14.18.63",
82-
"@types/react": "^18.3.20",
83-
"@types/react-dom": "^18.3.5",
82+
"@types/react": "^18.3.23",
83+
"@types/react-dom": "^18.3.7",
8484
"@types/react-helmet": "^6.1.11",
8585
"@types/react-responsive": "^8.0.8",
8686
"@types/shallowequal": "^1.1.5",
@@ -91,10 +91,10 @@
9191
"@umijs/plugin-analytics": "^0.2.4",
9292
"@umijs/test": "^3.5.43",
9393
"@umijs/test-utils": "^3.5.43",
94-
"@umijs/utils": "^4.4.6",
94+
"@umijs/utils": "^4.4.11",
9595
"@vitest/coverage-istanbul": "^2.1.9",
9696
"animated-scroll-to": "^2.3.2",
97-
"antd": "^5.24.5",
97+
"antd": "^5.25.4",
9898
"antd-style": "^3.7.1",
9999
"babel-loader": "^9.2.1",
100100
"babel-types": "^6.26.0",
@@ -104,44 +104,44 @@
104104
"copy-to-clipboard": "^3.3.3",
105105
"cross-env": "^7.0.3",
106106
"dayjs": "^1.11.13",
107-
"dumi": "~2.4.18",
107+
"dumi": "~2.4.21",
108108
"dumi-theme-antd-style": "~0.31.1",
109109
"esbuild": "^0.15.18",
110110
"eslint": "^8.57.1",
111111
"eslint-plugin-jest": "^27.9.0",
112-
"eslint-plugin-react": "^7.37.4",
112+
"eslint-plugin-react": "^7.37.5",
113113
"eslint-plugin-react-hooks": "^4.6.2",
114114
"eslint-plugin-unicorn": "^47.0.0",
115115
"execa": "^5.1.1",
116116
"express": "^4.21.2",
117117
"fast-deep-equal": "^3.1.3",
118-
"father": "^4.5.3",
118+
"father": "^4.5.6",
119119
"gh-pages": "^5.0.0",
120120
"glob": "^8.1.0",
121121
"identity-obj-proxy": "^3.0.0",
122122
"inquirer": "^8.2.6",
123123
"jest-canvas-mock": "^2.5.2",
124124
"jest-fetch-mock": "^3.0.3",
125-
"jsdom": "^26.0.0",
125+
"jsdom": "^26.1.0",
126126
"lerna": "^3.22.1",
127127
"lint-staged": "^10.5.4",
128128
"lodash-es": "^4.17.21",
129129
"mockdate": "^3.0.5",
130130
"mockjs": "^1.1.0",
131131
"np": "^6.5.0",
132132
"nprogress": "^0.2.0",
133-
"octokit": "^3.2.1",
133+
"octokit": "^3.2.2",
134134
"polished": "^4.3.1",
135135
"prettier": "^3.5.3",
136136
"prettier-plugin-organize-imports": "^3.2.4",
137-
"prettier-plugin-packagejson": "^2.5.10",
137+
"prettier-plugin-packagejson": "^2.5.15",
138138
"pretty-quick": "^3.3.1",
139139
"query-string": "^6.14.1",
140140
"rc-field-form": "^2.7.0",
141141
"rc-footer": "^0.6.8",
142142
"rc-resize-observer": "^1.4.3",
143143
"rc-steps": "^6.0.1",
144-
"rc-table": "^7.50.4",
144+
"rc-table": "^7.51.0",
145145
"rc-util": "^5.44.4",
146146
"react": "^18.3.1",
147147
"react-dom": "^18.3.1",
@@ -159,16 +159,16 @@
159159
"stylelint": "^13.13.1",
160160
"timezone-mock": "^1.3.6",
161161
"ts-node": "^10.9.2",
162-
"typescript": "^5.8.2",
163-
"umi": "^4.4.6",
162+
"typescript": "^5.8.3",
163+
"umi": "^4.4.11",
164164
"umi-request": "^1.4.0",
165165
"unified": "^11.0.5",
166166
"unist-util-visit": "^5.0.0",
167167
"vitest": "^2.1.9",
168168
"write-pkg": "^4.0.0",
169169
"xhr-mock": "^2.5.1",
170170
"yorkie": "^2.0.0",
171-
"zustand": "^4.5.6"
171+
"zustand": "^4.5.7"
172172
},
173173
"gitHooks": {
174174
"pre-commit": "pretty-quick --staged",

packages/card/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
44

5+
## [2.9.9](https://github.com/ant-design/pro-components/compare/@ant-design/[email protected]...@ant-design/[email protected]) (2025-06-10)
6+
7+
**Note:** Version bump only for package @ant-design/pro-card
8+
9+
## [2.9.8](https://github.com/ant-design/pro-components/compare/@ant-design/[email protected]...@ant-design/[email protected]) (2025-06-10)
10+
11+
**Note:** Version bump only for package @ant-design/pro-card
12+
513
## [2.9.7](https://github.com/ant-design/pro-components/compare/@ant-design/[email protected]...@ant-design/[email protected]) (2025-03-31)
614

715
### Bug Fixes

packages/card/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ant-design/pro-card",
3-
"version": "2.9.7",
3+
"version": "2.9.9",
44
"description": "@ant-design/pro-card",
55
"keywords": [
66
"antd",
@@ -36,8 +36,8 @@
3636
"dependencies": {
3737
"@ant-design/cssinjs": "^1.21.1",
3838
"@ant-design/icons": "^5.0.0",
39-
"@ant-design/pro-provider": "2.15.4",
40-
"@ant-design/pro-utils": "2.17.0",
39+
"@ant-design/pro-provider": "2.16.1",
40+
"@ant-design/pro-utils": "2.17.2",
4141
"@babel/runtime": "^7.18.0",
4242
"classnames": "^2.3.2",
4343
"rc-resize-observer": "^1.0.0",

packages/card/src/components/Card/index.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ const Card = React.forwardRef((props: CardProps, ref: any) => {
5151
type,
5252
...rest
5353
} = props;
54-
const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);
55-
54+
const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);
55+
5656
const screens = useBreakpoint() || {
5757
lg: true,
5858
md: true,
@@ -228,6 +228,9 @@ const Card = React.forwardRef((props: CardProps, ref: any) => {
228228
collapsibleIconRender({ collapsed })
229229
) : (
230230
<RightOutlined
231+
onClick={()=>{
232+
if (collapsible === 'icon') setCollapsed(!collapsed);
233+
}}
231234
rotate={!collapsed ? 90 : undefined}
232235
className={`${prefixCls}-collapsible-icon ${hashId}`.trim()}
233236
/>
@@ -252,10 +255,10 @@ const Card = React.forwardRef((props: CardProps, ref: any) => {
252255
})}
253256
style={headStyle}
254257
onClick={() => {
255-
if (collapsibleButton) setCollapsed(!collapsed);
258+
if (collapsible === 'header' || collapsible === true) setCollapsed(!collapsed);
256259
}}
257260
>
258-
<div className={`${prefixCls}-title ${hashId}`.trim()}>
261+
<div className={`${prefixCls}-title ${hashId}`.trim()} >
259262
{collapsibleButton}
260263
<LabelIconTip label={title} tooltip={tooltip} subTitle={subTitle} />
261264
</div>

packages/card/src/components/card.en-US.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ When adding a divider it automatically increases the height of the header to sep
8686

8787
### Collapsible
8888

89-
- You can use `collapsible` to configure whether the card is collapsible or not, and configure whether the card is collapsed by default through the `defaultCollapsed` property.
89+
- You can use `collapsible` to configure whether the card is collapsible or not,or to specify the area that triggers the collapse. and configure whether the card is collapsed by default through the `defaultCollapsed` property.
9090
- Or you can customize it by controlling the `collapsed` property.
9191

9292
<code src="../demos/collapsible.tsx" background="var(--main-bg-color)" oldtitle="collapsible"></code>
@@ -179,7 +179,7 @@ The `Steps` component is combined with the `ProCard` component to complete the v
179179
| ghost | Ghost mode, that is, whether to cancel the padding of the card content area and the background color of the card. | `boolean` | false | |
180180
| headerBordered | Whether the header has a dividing line | `boolean` | false | |
181181
| collapsed | Controlled property, whether to collapse | `boolean` | false | |
182-
| collapsible | Whether the configuration is collapsible, invalid when controlled | `boolean` | false | |
182+
| collapsible | Whether the configuration is collapsible or specifies the trigger area for collapsing | `icon \| header \| boolean`, when the value is `true`, the default trigger area is `header` | false |
183183
| collapsibleIconRender | Replaces default collapsed icon | `({ collapsed }: { collapsed: boolean }) => React.ReactNode` | - | |
184184
| defaultCollapsed | Default collapsing, invalid when controlled | `boolean` | false | |
185185
| onCollapse | Collapsed card event, invalid when controlled | `(collapsed: boolean) => void` | - | |

packages/card/src/components/card.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ atomId: ProCard
7272

7373
### 可折叠
7474

75-
- 你可以使用 `collapsible` 来配置卡片是否可折叠,通过 `defaultCollapsed` 属性配置是否默认折叠。
75+
- 你可以使用 `collapsible` 来配置卡片是否可折叠或者指定触发折叠的区域,通过 `defaultCollapsed` 属性配置是否默认折叠。
7676
- 或者你可以通过 `collapsed` 属性受控进行自定义。
7777

7878
<code src="../demos/collapsible.tsx" background="var(--main-bg-color)" ></code>
@@ -163,7 +163,7 @@ atomId: ProCard
163163
| ghost | 幽灵模式,即是否取消卡片内容区域的 padding 和 卡片的背景颜色。 | `boolean` | false | |
164164
| headerBordered | 页头是否有分割线 | `boolean` | false | |
165165
| collapsed | 受控属性,是否折叠 | `boolean` | false | |
166-
| collapsible | 配置是否可折叠,受控时无效 | `boolean` | false | |
166+
| collapsible | 配置是否可折叠或者指定可折叠触发的区域 | `icon \| header \| boolean`,当值为`true`时默认触发区域为`header` | false | |
167167
| collapsibleIconRender | 替换默认折叠图标 | `({ collapsed }: { collapsed: boolean }) => React.ReactNode` | - | |
168168
| defaultCollapsed | 默认折叠,受控时无效 | `boolean` | false | |
169169
| onCollapse | 收起卡片的事件,受控时无效 | `(collapsed: boolean) => void` | - | |

packages/card/src/demos/collapsible.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,25 @@ export default () => {
3434
>
3535
Content
3636
</ProCard>
37+
<ProCard
38+
title="Collapsible"
39+
headerBordered
40+
collapsible="icon"
41+
defaultCollapsed
42+
onCollapse={(collapse) => console.log(collapse)}
43+
extra={
44+
<Button
45+
size="small"
46+
onClick={(e) => {
47+
e.stopPropagation();
48+
}}
49+
>
50+
Submit
51+
</Button>
52+
}
53+
>
54+
Content
55+
</ProCard>
3756
<ProCard
3857
title="Collapsible"
3958
bordered

packages/card/src/typing.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { ReactNode } from 'react';
55
export type Breakpoint = 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs';
66
export type Gutter = number | Partial<Record<Breakpoint, number>>;
77
export type ColSpanType = number | string;
8-
8+
type CollapsibleType = 'icon' | 'header' | boolean;
99
type CardPropsBase = {
1010
/** 标题样式 */
1111
headStyle?: React.CSSProperties;
@@ -53,7 +53,7 @@ type CardPropsBase = {
5353
/** 幽灵模式,即是否取消卡片内容区域的 padding 和 背景颜色。 */
5454
ghost?: boolean;
5555
/** 是否可折叠 */
56-
collapsible?: boolean;
56+
collapsible?: CollapsibleType;
5757
/** 受控 collapsed 属性 */
5858
collapsed?: boolean;
5959
/** 折叠按钮自定义节点 */

0 commit comments

Comments
 (0)