Skip to content

Commit e3774b9

Browse files
authored
Merge pull request #620 from ant-design/main
chore: sync main to feature branch
2 parents fc90723 + 70142f1 commit e3774b9

File tree

121 files changed

+6163
-2704
lines changed

Some content is hidden

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

121 files changed

+6163
-2704
lines changed

.dumi/components/SemanticPreview.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ const SemanticPreview: React.FC<SemanticPreviewProps> = (props) => {
103103
// ======================== Hover =========================
104104
const containerRef = React.useRef<HTMLDivElement>(null);
105105

106-
const timerRef = React.useRef<ReturnType<typeof setTimeout>>();
106+
const timerRef = React.useRef<ReturnType<typeof setTimeout>>(null);
107107

108108
const [positionMotion, setPositionMotion] = React.useState<boolean>(false);
109109
const [hoverSemantic, setHoverSemantic] = React.useState<string | null>(null);

.dumi/theme/builtins/Previewer/CodePreviewer.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ const CodePreviewer: React.FC<AntdPreviewerProps> = (props) => {
137137
const { theme } = useContext<SiteContextProps>(SiteContext);
138138

139139
const { hash, pathname, search } = location;
140-
const docsOnlineUrl = `https://ant.design${pathname}${search}#${asset.id}`;
140+
const docsOnlineUrl = `https://ant-design-x.antgroup.com${pathname}${search}#${asset.id}`;
141141

142142
const [showOnlineUrl, setShowOnlineUrl] = useState<boolean>(false);
143143

.dumi/theme/common/ComponentChangelog/ComponentChangelog.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ const ComponentChangelog: React.FC<Readonly<React.PropsWithChildren>> = (props)
306306
return (
307307
<>
308308
{isValidElement(children) &&
309-
cloneElement(children as React.ReactElement, {
309+
cloneElement(children as React.ReactElement<any>, {
310310
onClick: () => setShow(true),
311311
})}
312312
<Drawer

.dumi/theme/common/PeterCat.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { Assistant } from '@petercatai/assistant';
22
import React from 'react';
33

4+
import '@petercatai/assistant/style';
5+
46
const PeterCat: React.FC = () => {
57
return (
68
<Assistant

.dumi/theme/common/PrevAndNext.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,11 @@ const PrevAndNext: React.FC<{ rtl?: boolean }> = ({ rtl }) => {
141141
return (
142142
<section className={styles.prevNextNav}>
143143
{prev &&
144-
React.cloneElement(prev.label as ReactElement, {
144+
React.cloneElement(prev.label as ReactElement<any>, {
145145
className: classNames(styles.pageNav, styles.prevNav, prev.className),
146146
})}
147147
{next &&
148-
React.cloneElement(next.label as ReactElement, {
148+
React.cloneElement(next.label as ReactElement<any>, {
149149
className: classNames(styles.pageNav, styles.nextNav, next.className),
150150
})}
151151
</section>

.dumi/theme/layouts/DocLayout/index.tsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const DocLayout: React.FC = () => {
3535
const location = useLocation();
3636
const { pathname, search, hash } = location;
3737
const [locale, lang] = useLocale(locales);
38-
const timerRef = useRef<ReturnType<typeof setTimeout>>();
38+
const timerRef = useRef<ReturnType<typeof setTimeout>>(null);
3939
const { direction } = useContext(SiteContext);
4040
const { loading } = useSiteData();
4141

@@ -52,7 +52,11 @@ const DocLayout: React.FC = () => {
5252
timerRef.current = setTimeout(() => {
5353
nprogressHiddenStyle?.remove();
5454
}, 0);
55-
return () => clearTimeout(timerRef.current);
55+
return () => {
56+
if (timerRef.current) {
57+
clearTimeout(timerRef.current);
58+
}
59+
};
5660
}, []);
5761

5862
// handle hash change or visit page hash from Link component, and jump after async chunk loaded

.dumi/theme/layouts/GlobalLayout.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ import type { ThemeName } from '../common/ThemeSwitch';
2323
import type { SiteContextProps } from '../slots/SiteContext';
2424
import SiteContext from '../slots/SiteContext';
2525

26+
import '@ant-design/v5-patch-for-react-19';
27+
2628
const ThemeSwitch = React.lazy(() => import('../common/ThemeSwitch'));
2729

2830
type Entries<T> = { [K in keyof T]: [K, T[K]] }[keyof T][];

.dumi/theme/plugin.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { createHash } from 'crypto';
22
import fs from 'fs';
33
import path from 'path';
44
import createEmotionServer from '@emotion/server/create-instance';
5-
import chalk from 'chalk';
65
import type { IApi, IRoute } from 'dumi';
76
import ReactTechStack from 'dumi/dist/techStacks/react';
87
import sylvanas from 'sylvanas';
@@ -126,9 +125,9 @@ class AntdReactTechStack extends ReactTechStack {
126125

127126
const resolve = (p: string): string => require.resolve(p);
128127

129-
const RoutesPlugin = (api: IApi) => {
128+
const RoutesPlugin = async (api: IApi) => {
130129
// const ssrCssFileName = `ssr-${Date.now()}.css`;
131-
130+
const chalk = await import('chalk').then((m) => m.default);
132131
const writeCSSFile = (key: string, hashKey: string, cssString: string) => {
133132
const fileName = `style-${key}.${getHash(hashKey)}.css`;
134133

.dumi/theme/slots/Footer/index.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -243,12 +243,12 @@ const Footer: React.FC = () => {
243243
col2.items.push({
244244
icon: <UsergroupAddOutlined />,
245245
title: <FormattedMessage id="app.footer.work_with_us" />,
246-
url: getLink('/docs/resources', {
246+
url: `https://ant.design${getLink('/docs/resources', {
247247
cn: '加入我们',
248248
en: 'JoinUs',
249-
}),
250-
LinkComponent: Link,
251-
} as unknown as (typeof col2)['items'][number]);
249+
})}`,
250+
openExternal: true,
251+
});
252252
}
253253

254254
const col3 = {

.dumi/theme/slots/Header/Actions.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ const HeaderActions: React.FC<HeaderActionsProps> = (props) => {
113113
onChange={handleVersionChange}
114114
dropdownStyle={getDropdownStyle}
115115
popupMatchSelectWidth={false}
116-
getPopupContainer={(trigger) => trigger.parentNode}
117116
options={versionOptions}
118117
/>
119118
</Button>,

.github/PULL_REQUEST_TEMPLATE.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<!--
2+
First of all, thank you for your contribution! 😄
3+
For requesting to pull a new feature or bugfix, please send it from a feature/bugfix branch based on the `master` branch.
4+
Before submitting your pull request, please make sure the checklist below is confirmed.
5+
Your pull requests will be merged after one of the collaborators approve.
6+
Thank you!
7+
-->
8+
9+
[中文版模板 / Chinese template](https://github.com/ant-design/x/blob/master/.github/PULL_REQUEST_TEMPLATE_CN.md?plain=1)
10+
11+
### 🤔 This is a ...
12+
13+
- [ ] 🆕 New feature
14+
- [ ] 🐞 Bug fix
15+
- [ ] 📝 Site / documentation improvement
16+
- [ ] 📽️ Demo improvement
17+
- [ ] 💄 Component style improvement
18+
- [ ] 🤖 TypeScript definition improvement
19+
- [ ] 📦 Bundle size optimization
20+
- [ ] ⚡️ Performance optimization
21+
- [ ] ⭐️ Feature enhancement
22+
- [ ] 🌐 Internationalization
23+
- [ ] 🛠 Refactoring
24+
- [ ] 🎨 Code style optimization
25+
- [ ] ✅ Test Case
26+
- [ ] 🔀 Branch merge
27+
- [ ] ⏩ Workflow
28+
- [ ] ⌨️ Accessibility improvement
29+
- [ ] ❓ Other (about what?)
30+
31+
### 🔗 Related Issues
32+
33+
> - Describe the source of related requirements, such as links to relevant issue discussions.
34+
> - For example: close #xxxx, fix #xxxx
35+
36+
### 💡 Background and Solution
37+
38+
> - The specific problem to be addressed.
39+
> - List the final API implementation and usage if needed.
40+
> - If there are UI/interaction changes, consider providing screenshots or GIFs.
41+
42+
### 📝 Change Log
43+
44+
> - Read [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) like a cat tracks a laser pointer.
45+
> - Describe the impact of the changes on developers, not the solution approach.
46+
> - Reference: https://x.ant.design/changelog
47+
48+
| Language | Changelog |
49+
| ---------- | --------- |
50+
| 🇺🇸 English | |
51+
| 🇨🇳 Chinese | |

.github/PULL_REQUEST_TEMPLATE_CN.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<!--
2+
首先,感谢你的贡献!😄
3+
4+
新特性请提交至 feature 分支,其余可提交至 master 分支。
5+
在维护者审核通过后会合并。
6+
请确保填写以下 pull request 的信息,谢谢!~
7+
-->
8+
9+
[English Template / 英文模板](https://github.com/ant-design/x/blob/master/.github/PULL_REQUEST_TEMPLATE.md?plain=1)
10+
11+
### 🤔 这个变动的性质是?
12+
13+
- [ ] 🆕 新特性提交
14+
- [ ] 🐞 Bug 修复
15+
- [ ] 📝 站点、文档改进
16+
- [ ] 📽️ 演示代码改进
17+
- [ ] 💄 组件样式/交互改进
18+
- [ ] 🤖 TypeScript 定义更新
19+
- [ ] 📦 包体积优化
20+
- [ ] ⚡️ 性能优化
21+
- [ ] ⭐️ 功能增强
22+
- [ ] 🌐 国际化改进
23+
- [ ] 🛠 重构
24+
- [ ] 🎨 代码风格优化
25+
- [ ] ✅ 测试用例
26+
- [ ] 🔀 分支合并
27+
- [ ] ⏩ 工作流程
28+
- [ ] ⌨️ 无障碍改进
29+
- [ ] ❓ 其他改动(是关于什么的改动?)
30+
31+
### 🔗 相关 Issue
32+
33+
> 1. 描述相关需求的来源,如相关的 issue 讨论链接。
34+
> 2. 例如 close #xxxx、 fix #xxxx
35+
36+
### 💡 需求背景和解决方案
37+
38+
> 1. 要解决的具体问题。
39+
> 2. 列出最终的 API 实现和用法。
40+
> 3. 涉及UI/交互变动建议提供截图或 GIF。
41+
42+
### 📝 更新日志
43+
44+
> - 郑重地阅读 [如何维护更新日志](https://keepachangelog.com/zh-CN/1.1.0/)
45+
> - 描述改动对开发者有哪些影响,而非解决方式
46+
> - 可参考:https://x.ant.design/changelog-cn
47+
48+
| 语言 | 更新描述 |
49+
| ------- | -------- |
50+
| 🇺🇸 英文 | |
51+
| 🇨🇳 中文 | |

.github/dependabot.yml

+11-27
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,19 @@
55

66
version: 2
77
updates:
8-
- package-ecosystem: "npm"
9-
directory: "/"
8+
- package-ecosystem: npm
9+
directory: /
1010
schedule:
11-
interval: "daily"
12-
groups:
13-
rc-component-patch:
14-
dependency-type: "production"
15-
patterns:
16-
- "rc-*"
17-
- "@rc-component*"
18-
update-types: ["patch"]
19-
dependencies:
20-
dependency-type: "production"
21-
exclude-patterns:
22-
- "rc-*"
23-
- "@rc-component*"
24-
update-types: ["major", "minor"]
25-
dev-dependencies:
26-
dependency-type: "development"
27-
update-types: ["major"]
11+
interval: daily
2812
ignore:
2913
- dependency-name: "@ant-design/cssinjs"
30-
- dependency-name: "dayjs"
31-
versions: ["1.x"]
32-
- package-ecosystem: "github-actions"
33-
directory: "/"
14+
- dependency-name: dayjs
15+
versions: [1.x]
16+
- package-ecosystem: github-actions
17+
directory: /
3418
schedule:
35-
interval: "daily"
19+
interval: daily
3620
labels:
37-
- "github-actions"
38-
- "dependencies"
39-
- "skip-verify-files"
21+
- github-actions
22+
- dependencies
23+
- skip-verify-files

.github/workflows/dependabot-bun.yml

-28
This file was deleted.

.github/workflows/preview-deploy.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
steps:
6363
# We need get PR id first
6464
- name: download pr artifact
65-
uses: dawidd6/action-download-artifact@v7
65+
uses: dawidd6/action-download-artifact@v9
6666
with:
6767
workflow: ${{ github.event.workflow_run.workflow_id }}
6868
run_id: ${{ github.event.workflow_run.id }}
@@ -82,7 +82,7 @@ jobs:
8282
# Download site artifact
8383
- name: download site artifact
8484
if: ${{ fromJSON(needs.upstream-workflow-summary.outputs.build-success) }}
85-
uses: dawidd6/action-download-artifact@v7
85+
uses: dawidd6/action-download-artifact@v9
8686
with:
8787
workflow: ${{ github.event.workflow_run.workflow_id }}
8888
run_id: ${{ github.event.workflow_run.id }}

.github/workflows/release-x.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Tweet
13-
uses: nearform-actions/github-action-notify-twitter@v1
13+
uses: nearform-actions/github-action-notify-twitter@master
1414
with:
1515
message: |
1616
🤖 Ant Design X just released @ant-design/x@${{ github.event.release.tag_name }} ✨🎊✨ Check out the full release note: ${{ github.event.release.html_url }}
1717
twitter-app-key: ${{ secrets.TWITTER_API_KEY }}
18-
twitter-app-secret: ${{ secrets.TWITTER_API_SECRET_KEY }}
18+
twitter-app-secret: ${{ secrets.TWITTER_API_SECRET }}
1919
twitter-access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
2020
twitter-access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ config/base.yaml
3535
/coverage
3636
yarn.lock
3737
package-lock.json
38+
bun.lock
39+
bun.lockb
3840
pnpm-lock.yaml
3941
bun.lockb
4042
.pnpm-debug.log
@@ -76,4 +78,4 @@ __image_snapshots__/
7678
.node
7779

7880
.env
79-
examples/
81+
examples/

CHANGELOG.en-US.md

+24
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,30 @@ tag: vVERSION
1616

1717
---
1818

19+
## 1.0.6
20+
21+
`2025-03-14`
22+
23+
- 🆕 Extended `Sender` file pasting can handle multiple files. [#505](https://github.com/ant-design/x/pull/500) by [@ztkuaikuai](https://github.com/ztkuaikuai)
24+
- 🆕 Extended `BubbleList` role definition function.[#485](https://github.com/ant-design/x/pull/500) by [@chenluda](https://github.com/chenluda)
25+
- 🐛 Fixed `Attachments` multi file horizontal scrollbar display .[#556](https://github.com/ant-design/x/pull/556) by [@onefeng123 ](https://github.com/onefeng123)
26+
- 🐛 Fixed `Attachments` onRemove non effective issue.[#555](https://github.com/ant-design/x/pull/555) by [@edison-tianhe ](https://github.com/edison-tianhe)
27+
- 🐛 Fixed `Sender` the issue of actions lacking `SpeechButton`.[#549](https://github.com/ant-design/x/pull/549) by [@zombieJ ](https://github.com/zombieJ)
28+
- 🐛 Fixed `Attachments`the issue of file initialization display.[#524](https://github.com/ant-design/x/pull/524) by [@ztkuaikuai ](https://github.com/ztkuaikuai)
29+
- 🐛 Fixed `Conversations`scroll bar issue.[#485](https://github.com/ant-design/x/pull/485) by [@LofiSu](https://github.com/LofiSu)
30+
- 📖 Improved`Bubble` `typing` reduces unnecessary rendering.[#477](https://github.com/ant-design/x/pull/477) by [@kxcy001123](https://github.com/kxcy001123)
31+
- 📦 Improved Chat Design X construct [#578](https://github.com/ant-design/x/pull/578)[#584](https://github.com/ant-design/x/pull/584) by [@kimteayon](https://github.com/kimteayon)[#578](https://github.com/ant-design/x/pull/578) by [@kimteayon](https://github.com/kimteayon)[#587](https://github.com/ant-design/x/pull/587) by [@afc163](https://github.com/afc163)
32+
- 📖 Enhance the official website to improve user experience.[#484](https://github.com/ant-design/x/pull/484) by [@ztkuaikuai](https://github.com/ztkuaikuai)[#495](https://github.com/ant-design/x/pull/495) by [@ztkuaikuai](https://github.com/ztkuaikuai)[#522](https://github.com/ant-design/x/pull/522) by [@liangchaofei](https://github.com/liangchaofei)[#537](https://github.com/ant-design/x/pull/537) by [@wzc520pyfm](https://github.com/wzc520pyfm)[#553](https://github.com/ant-design/x/pull/553) by [@PeachScript](https://github.com/PeachScript)[#578](https://github.com/ant-design/x/pull/578) by [@kimteayon](https://github.com/kimteayon)[#585](https://github.com/ant-design/x/pull/585) by [@MaricoHan](https://github.com/MaricoHan)
33+
34+
## 1.0.5
35+
36+
`2025-01-13`
37+
38+
- 🐛 Fix `Attachment` remove icon style. [#460](https://github.com/ant-design/x/pull/460) by [@Rain120](https://github.com/Rain120)
39+
- 🛠 Refactor `BubbleProps` to support `ContentType` type argument. [#403](https://github.com/ant-design/x/pull/403) by [@YumoImer](https://github.com/YumoImer)
40+
- 🛠 Dev and site support React 19. [#432](https://github.com/ant-design/x/pull/432) by [@YumoImer](https://github.com/YumoImer)
41+
- 📖 Enhance the official website to improve user experience. [#456](https://github.com/ant-design/x/pull/456), [#446](https://github.com/ant-design/x/pull/446), [#448](https://github.com/ant-design/x/pull/448), [#444](https://github.com/ant-design/x/pull/444), [#414](https://github.com/ant-design/x/pull/414), [#406](https://github.com/ant-design/x/pull/406), [#404](https://github.com/ant-design/x/pull/404) by [@wzc520pyfm](https://github.com/wzc520pyfm), [@YumoImer](https://github.com/YumoImer), [@Rain120](https://github.com/Rain120), [@afc163](https://github.com/afc163)
42+
1943
## 1.0.4
2044

2145
`2024-12-25`

0 commit comments

Comments
 (0)