Skip to content

Commit d0da3d8

Browse files
committed
chore(merge): Merge master branch and fix conflicts
2 parents 414c85d + b88518b commit d0da3d8

16 files changed

Lines changed: 850 additions & 910 deletions

File tree

docs/design/design-CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ group: 基础组件
88

99
---
1010

11+
## 0.4.15
12+
13+
`2025-08-21`
14+
15+
- 🐞 修复 Form.Item `action` 属性在 antd 5.27.0 版本下不生效的问题。[#1141](https://github.com/oceanbase/oceanbase-design/pull/1141)
16+
1117
## 0.4.14
1218

1319
`2025-08-07`

docs/ui/ui-CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ group: 业务组件
88

99
---
1010

11+
## 0.4.18
12+
13+
`2025-08-21`
14+
15+
- DateRanger
16+
- ⭐️ DateRanger 新增 `近 7 天` 的快捷选项。[#1142](https://github.com/oceanbase/oceanbase-design/pull/1142) [@wzc520pyfm](https://github.com/wzc520pyfm)
17+
- 🐞 修复 DateRanger 在连续点击时面板会频繁开启、关闭的问题。[#1148](https://github.com/oceanbase/oceanbase-design/pull/1148) [@wzc520pyfm](https://github.com/wzc520pyfm)
18+
1119
## 0.4.17
1220

1321
`2025-08-07`

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
"@ant-design/colors": "^7.2.1",
4646
"@ant-design/cssinjs": "^1.24.0",
4747
"@ant-design/icons": "^5.6.1",
48-
"@babel/cli": "^7.28.0",
49-
"@babel/preset-env": "^7.28.0",
48+
"@babel/cli": "^7.28.3",
49+
"@babel/preset-env": "^7.28.3",
5050
"@chenshuai2144/less2cssinjs": "^1.0.7",
5151
"@ctrl/tinycolor": "^4.1.0",
5252
"@emotion/babel-preset-css-prop": "^11.12.0",
@@ -57,7 +57,7 @@
5757
"@rc-component/trigger": "^3.5.2",
5858
"@stackblitz/sdk": "^1.11.0",
5959
"@testing-library/dom": "^10.4.1",
60-
"@testing-library/jest-dom": "^6.6.4",
60+
"@testing-library/jest-dom": "^6.7.0",
6161
"@testing-library/react": "^16.3.0",
6262
"@testing-library/react-hooks": "^8.0.1",
6363
"@testing-library/user-event": "^14.6.1",
@@ -67,7 +67,7 @@
6767
"@umijs/fabric": "^4.0.1",
6868
"@umijs/test": "^4.4.12",
6969
"@vercel/analytics": "^1.5.0",
70-
"antd": "^5.26.7",
70+
"antd": "^5.27.0",
7171
"antd-style": "^3.7.1",
7272
"antd-token-previewer": "^2.0.8",
7373
"babel-jest": "^30.0.5",

packages/codemod/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@oceanbase/codemod",
3-
"version": "0.4.14",
3+
"version": "0.4.15",
44
"description": "Codemod for OceanBase Design upgrade",
55
"keywords": [
66
"oceanbase",

packages/design/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@oceanbase/design",
3-
"version": "0.4.14",
3+
"version": "0.4.15",
44
"description": "The Design System of OceanBase",
55
"keywords": [
66
"oceanbase",
@@ -46,16 +46,16 @@
4646
"@oceanbase/icons": "workspace:^",
4747
"@oceanbase/util": "workspace:^",
4848
"ahooks": "^2.10.14",
49-
"antd": "^5.26.7",
49+
"antd": "^5.27.0",
5050
"classnames": "^2.5.1",
5151
"lodash": "^4.17.21",
5252
"lottie-web": "^5.13.0",
5353
"prop-types": "^15.8.1",
5454
"rc-util": "^5.44.4"
5555
},
5656
"devDependencies": {
57-
"@babel/cli": "^7.28.0",
58-
"@babel/preset-env": "^7.28.0",
57+
"@babel/cli": "^7.28.3",
58+
"@babel/preset-env": "^7.28.3",
5959
"antd-token-previewer": "^2.0.8",
6060
"rc-select": "^14.16.8",
6161
"rc-slider": "^11.1.8",

packages/design/src/config-provider/__tests__/__snapshots__/form.test.tsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ exports[`ConfigProvider form > ConfigProvider form.requiredMark should be \`opti
1010
type="text"
1111
/>
1212
<div
13-
class="ant-form-item"
13+
class="ant-form-item ant-form-item-vertical"
1414
>
1515
<div
1616
class="ant-row ant-form-item-row"
@@ -82,7 +82,7 @@ exports[`ConfigProvider form > ConfigProvider form.requiredMark should be \`opti
8282
</div>
8383
</div>
8484
<div
85-
class="ant-form-item"
85+
class="ant-form-item ant-form-item-vertical"
8686
>
8787
<div
8888
class="ant-row ant-form-item-row"

packages/design/src/form/FormItem.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { useContext } from 'react';
22
import type { ReactNode } from 'react';
33
import { Form as AntForm } from 'antd';
4+
import { FormItemLayout } from 'antd/es/form/Form';
45
import { FormContext } from 'antd/es/form/context';
56
import type { FormItemProps as AntFormItemProps } from 'antd/es/form';
67
import { isPlainObject } from 'lodash';
@@ -32,7 +33,7 @@ const FormItem: CompoundedComponent = ({
3233
label,
3334
tooltip,
3435
action,
35-
layout,
36+
layout: externalLayout,
3637
prefixCls: customizePrefixCls,
3738
className,
3839
...restProps
@@ -43,7 +44,14 @@ const FormItem: CompoundedComponent = ({
4344
const { wrapSSR } = useStyle(prefixCls);
4445
const formItemCls = classNames(className);
4546

46-
const { vertical } = useContext(FormContext);
47+
const {
48+
layout: contextLayout,
49+
// compatible with vertical for version < antd 27.0.0
50+
// ref: https://github.com/ant-design/ant-design/pull/54611
51+
// @ts-ignore
52+
vertical,
53+
} = useContext(FormContext);
54+
const layout = externalLayout || (contextLayout as FormItemLayout);
4755

4856
const typeList = useTooltipTypeList();
4957
// tooltip config
@@ -64,7 +72,7 @@ const FormItem: CompoundedComponent = ({
6472
<AntFormItem
6573
layout={layout}
6674
label={
67-
action && (vertical || layout === 'vertical') ? (
75+
action && (layout === 'vertical' || vertical) ? (
6876
<>
6977
{label}
7078
{action && <span className={`${prefixCls}-item-action`}>{action}</span>}

packages/design/src/form/__tests__/__snapshots__/index.test.tsx.snap

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ exports[`Form > Form hideRequiredMark should be priority over ConfigProvider for
55
class="ant-form ant-form-horizontal ant-form-hide-required-mark"
66
>
77
<div
8-
class="ant-form-item"
8+
class="ant-form-item ant-form-item-horizontal"
99
>
1010
<div
1111
class="ant-row ant-form-item-row"
@@ -44,7 +44,7 @@ exports[`Form > Form hideRequiredMark should be priority over ConfigProvider for
4444
</div>
4545
</div>
4646
<div
47-
class="ant-form-item"
47+
class="ant-form-item ant-form-item-horizontal"
4848
>
4949
<div
5050
class="ant-row ant-form-item-row"
@@ -89,7 +89,7 @@ exports[`Form > requiredMark could be changed 1`] = `
8989
class="ant-form ant-form-horizontal"
9090
>
9191
<div
92-
class="ant-form-item"
92+
class="ant-form-item ant-form-item-horizontal"
9393
>
9494
<div
9595
class="ant-row ant-form-item-row"
@@ -128,7 +128,7 @@ exports[`Form > requiredMark could be changed 1`] = `
128128
</div>
129129
</div>
130130
<div
131-
class="ant-form-item"
131+
class="ant-form-item ant-form-item-horizontal"
132132
>
133133
<div
134134
class="ant-row ant-form-item-row"
@@ -173,7 +173,7 @@ exports[`Form > requiredMark could be changed by ConfigProvider 1`] = `
173173
class="ant-form ant-form-horizontal"
174174
>
175175
<div
176-
class="ant-form-item"
176+
class="ant-form-item ant-form-item-horizontal"
177177
>
178178
<div
179179
class="ant-row ant-form-item-row"
@@ -212,7 +212,7 @@ exports[`Form > requiredMark could be changed by ConfigProvider 1`] = `
212212
</div>
213213
</div>
214214
<div
215-
class="ant-form-item"
215+
class="ant-form-item ant-form-item-horizontal"
216216
>
217217
<div
218218
class="ant-row ant-form-item-row"
@@ -257,7 +257,7 @@ exports[`Form > requiredMark should be optional by default 1`] = `
257257
class="ant-form ant-form-horizontal"
258258
>
259259
<div
260-
class="ant-form-item"
260+
class="ant-form-item ant-form-item-horizontal"
261261
>
262262
<div
263263
class="ant-row ant-form-item-row"
@@ -296,7 +296,7 @@ exports[`Form > requiredMark should be optional by default 1`] = `
296296
</div>
297297
</div>
298298
<div
299-
class="ant-form-item"
299+
class="ant-form-item ant-form-item-horizontal"
300300
>
301301
<div
302302
class="ant-row ant-form-item-row"

packages/design/src/form/__tests__/__snapshots__/item.test.tsx.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ exports[`Form.Item > action should not work by default 1`] = `
55
class="ant-form ant-form-horizontal"
66
>
77
<div
8-
class="ant-form-item"
8+
class="ant-form-item ant-form-item-horizontal"
99
>
1010
<div
1111
class="ant-row ant-form-item-row"
@@ -56,7 +56,7 @@ exports[`Form.Item > action should not work for default layout 1`] = `
5656
class="ant-form ant-form-horizontal"
5757
>
5858
<div
59-
class="ant-form-item"
59+
class="ant-form-item ant-form-item-horizontal"
6060
>
6161
<div
6262
class="ant-row ant-form-item-row"
@@ -107,7 +107,7 @@ exports[`Form.Item > action should not work for horizontal layout 1`] = `
107107
class="ant-form ant-form-horizontal"
108108
>
109109
<div
110-
class="ant-form-item"
110+
class="ant-form-item ant-form-item-horizontal"
111111
>
112112
<div
113113
class="ant-row ant-form-item-row"
@@ -158,7 +158,7 @@ exports[`Form.Item > action should work for vertical layout 1`] = `
158158
class="ant-form ant-form-vertical"
159159
>
160160
<div
161-
class="ant-form-item"
161+
class="ant-form-item ant-form-item-vertical"
162162
>
163163
<div
164164
class="ant-row ant-form-item-row"

packages/design/src/form/__tests__/__snapshots__/switch.test.tsx.snap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ exports[`Form.Item with Switch > dynamic Switch 1`] = `
55
class="ant-form ant-form-horizontal"
66
>
77
<div
8-
class="ant-form-item"
8+
class="ant-form-item ant-form-item-horizontal"
99
>
1010
<div
1111
class="ant-row ant-form-item-row"
@@ -65,7 +65,7 @@ exports[`Form.Item with Switch > nested Switch 1`] = `
6565
class="ant-form ant-form-horizontal"
6666
>
6767
<div
68-
class="ant-form-item"
68+
class="ant-form-item ant-form-item-horizontal"
6969
>
7070
<div
7171
class="ant-row ant-form-item-row"
@@ -133,7 +133,7 @@ exports[`Form.Item with Switch > normal Switch 1`] = `
133133
class="ant-form ant-form-horizontal"
134134
>
135135
<div
136-
class="ant-form-item"
136+
class="ant-form-item ant-form-item-horizontal"
137137
>
138138
<div
139139
class="ant-row ant-form-item-row"
@@ -193,7 +193,7 @@ exports[`Form.Item with Switch > renderProps Switch 1`] = `
193193
class="ant-form ant-form-horizontal"
194194
>
195195
<div
196-
class="ant-form-item"
196+
class="ant-form-item ant-form-item-horizontal"
197197
>
198198
<div
199199
class="ant-row ant-form-item-row"
@@ -236,7 +236,7 @@ exports[`Form.Item with Switch > sub component Switch 1`] = `
236236
class="ant-form ant-form-horizontal"
237237
>
238238
<div
239-
class="ant-form-item"
239+
class="ant-form-item ant-form-item-horizontal"
240240
>
241241
<div
242242
class="ant-row ant-form-item-row"

0 commit comments

Comments
 (0)