Skip to content

Commit f41ca1d

Browse files
committed
Merge branch 'develop' into feat/react-19/support
2 parents 330a618 + df5669f commit f41ca1d

File tree

111 files changed

+11446
-3245
lines changed

Some content is hidden

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

111 files changed

+11446
-3245
lines changed

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,31 @@ toc: false
55
spline: explain
66
---
77

8+
## 🌈 0.13.2 `2025-04-25`
9+
### 🚀 Features
10+
- `Icon`: 新增 `logo-miniprogram``logo-cnb``seal``quote` 图标 @taowensheng1997 @uyarn ([#621](https://github.com/Tencent/tdesign-mobile-react/pull/621))
11+
### 🐞 Bug Fixes
12+
- `Icon`: 优化多个文件相关图标的绘制效果,修复 `gesture-right-slip` 的绘制问题@uyarn([#621](https://github.com/Tencent/tdesign-mobile-react/pull/621))
13+
- `Slider`: `marks` 属性不支持 `()=>TNode` 渲染的问题 @anlyyao ([#622](https://github.com/Tencent/tdesign-mobile-react/pull/622))
14+
15+
## 🌈 0.13.1 `2025-04-21`
16+
### 🐞 Bug Fixes
17+
- `SideBar`: 修复组件未导出问题 @anlyyao ([#616](https://github.com/Tencent/tdesign-mobile-react/pull/616))
18+
19+
## 🌈 0.13.0 `2025-04-18`
20+
### 🚀 Features
21+
- `Icon`: 图标库版本更新到 `0.4.4`([#590](https://github.com/Tencent/tdesign-mobile-react/pull/590))
22+
- `Toast`: 新增 `warning` 主题 @betavs ([#589](https://github.com/Tencent/tdesign-mobile-react/pull/589))
23+
- `Fab`: 新增 `draggable``yBounds ``onDragEnd``onDragStart ` 等属性,支持组件拖拽 @novlan1 ([#594](https://github.com/Tencent/tdesign-mobile-react/pull/594))
24+
- `List`: 新增 `List` 组件 @feaswcy ([#463](https://github.com/Tencent/tdesign-mobile-react/pull/463))
25+
- `ActionSheet`: 新增 `ActionSheet` 组件 @TianlunXiong ([#471](https://github.com/Tencent/tdesign-mobile-react/pull/471))
26+
- `Progress`: 新增 `size` 属性,仅在环形进度条有效 @anlyyao ([#609](https://github.com/Tencent/tdesign-mobile-react/pull/609))
27+
- `CollapsePanel`: 优化面板折叠动画 @anlyyao ([#611](https://github.com/Tencent/tdesign-mobile-react/pull/611))
28+
### 🐞 Bug Fixes
29+
- `Textarea`: 修复传入参数类型错误 @RSS1102 ([#591](https://github.com/Tencent/tdesign-mobile-react/pull/591));修复 `iOS` 真机上输入内容重复的问题,并补充 `onCompositionstart``onCompositionend` 属性 @anlyyao ([#601](https://github.com/Tencent/tdesign-mobile-react/pull/601))
30+
### 🚧 Others
31+
- `site`: 站点接入主题生成器 @RylanBot ([#604](https://github.com/Tencent/tdesign-mobile-react/pull/604))
32+
833
## 🌈 0.12.0 `2025-03-12`
934
### 🚨 Breaking Changes
1035
- `Dialog`: 新增 `closeBtn``width``overlayProps` 属性和 `middle``top` 插槽,存在 `DOM` 调整 @epoll-j ([#548](https://github.com/Tencent/tdesign-mobile-react/pull/548))

package.json

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tdesign-mobile-react",
3-
"version": "0.13.0-beta",
3+
"version": "0.13.2",
44
"description": "TDesign Component for Mobile React",
55
"title": "tdesign-mobile-react",
66
"main": "cjs/index.js",
@@ -32,7 +32,7 @@
3232
"site:build": "cd site && vite build",
3333
"site:serve": "cd site && vite preview",
3434
"site:intranet": "cd site && vite build --mode intranet",
35-
"site:preview": "cd site && vite build --mode preview",
35+
"site:preview": "cd site && cross-env NODE_ENV=development vite build --mode preview",
3636
"postsite:preview": "cp _site/index.html _site/404.html",
3737
"lint": "eslint --ext .ts,.tsx ./ --max-warnings 0",
3838
"lint:fix": "eslint --ext .ts,.tsx ./ --max-warnings 0 --fix",
@@ -92,14 +92,15 @@
9292
"@testing-library/react": "^16.3.0",
9393
"@testing-library/user-event": "^14.6.1",
9494
"@types/lodash-es": "^4.17.12",
95-
"@types/node": "^20.14.11",
95+
"@types/node": "^22.14.1",
9696
"@types/react": "^19.1.0",
9797
"@types/react-dom": "^19.1.1",
9898
"@types/react-transition-group": "^4.4.4",
99+
"@types/rimraf": "^4.0.5",
99100
"@types/tinycolor2": "^1.4.6",
100101
"@typescript-eslint/eslint-plugin": "^5.6.0",
101102
"@typescript-eslint/parser": "^5.6.0",
102-
"@vitejs/plugin-react": "^1.1.1",
103+
"@vitejs/plugin-react": "^4.4.1",
103104
"@vitest/coverage-istanbul": "^2.0.3",
104105
"@vitest/coverage-v8": "^2.0.3",
105106
"@vitest/ui": "^2.0.3",
@@ -139,7 +140,7 @@
139140
"react": "^19.1.0",
140141
"react-dom": "^19.1.0",
141142
"react-router-dom": "^6.2.2",
142-
"rimraf": "^3.0.2",
143+
"rimraf": "^6.0.1",
143144
"rollup": "^2.55.0",
144145
"rollup-plugin-analyzer": "^4.0.0",
145146
"rollup-plugin-esbuild": "^4.5.0",
@@ -150,13 +151,13 @@
150151
"rollup-plugin-styles": "^3.14.1",
151152
"rollup-plugin-terser": "^7.0.2",
152153
"rollup-plugin-typescript2": "^0.31.2",
153-
"tdesign-icons-view": "^0.3.5",
154+
"tdesign-icons-view": "^0.3.6",
154155
"tdesign-site-components": "^0.15.6",
155156
"tdesign-theme-generator": "^1.1.0",
156-
"typescript": "5.2.2",
157-
"vite": "^2.7.0",
158-
"vite-plugin-pwa": "^0.11.11",
159-
"vite-plugin-tdoc": "^2.0.0",
157+
"typescript": "^5.8.3",
158+
"vite": "^6.2.3",
159+
"vite-plugin-pwa": "^1.0.0",
160+
"vite-plugin-tdoc": "^2.0.4",
160161
"vitest": "^2.1.9",
161162
"workbox-precaching": "^6.3.0"
162163
},
@@ -170,7 +171,7 @@
170171
"lodash-es": "^4.17.21",
171172
"react-transition-group": "^4.4.2",
172173
"smoothscroll-polyfill": "^0.4.4",
173-
"tdesign-icons-react": "^0.5.0-alpha.1",
174+
"tdesign-icons-react": "^0.5.0",
174175
"tinycolor2": "^1.6.0"
175176
},
176177
"config": {

site/mobile/components/style/index.less

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66

77
#app {
88
min-height: 100vh;
9+
height: 100vh;
910
display: flex;
1011
flex-direction: column;
1112
}
1213

1314
.tdesign-mobile-demo {
1415
flex: 1;
16+
overflow-y: scroll;
1517
}

site/mobile/mobile.config.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ export default {
3535
name: 'grid',
3636
component: () => import('tdesign-mobile-react/grid/_example/index.tsx'),
3737
},
38+
{
39+
title: 'List 列表',
40+
name: 'list',
41+
component: () => import('tdesign-mobile-react/list/_example/index.tsx'),
42+
},
3843
{
3944
title: 'Image 图片',
4045
name: 'image',
@@ -245,7 +250,7 @@ export default {
245250
{
246251
title: 'Fab 悬浮按钮',
247252
name: 'fab',
248-
component: () => import('tdesign-mobile-react/fab/_example/index.jsx'),
253+
component: () => import('tdesign-mobile-react/fab/_example/index.tsx'),
249254
},
250255
{
251256
title: 'NoticeBar 公告栏',
@@ -257,6 +262,11 @@ export default {
257262
name: 'result',
258263
component: () => import('tdesign-mobile-react/result/_example/index.tsx'),
259264
},
265+
{
266+
title: 'ActionSheet 动作面板',
267+
name: 'action-sheet',
268+
component: () => import('tdesign-mobile-react/action-sheet/_example/index.tsx'),
269+
},
260270
{
261271
title: 'Link 链接',
262272
name: 'link',
@@ -297,5 +307,10 @@ export default {
297307
name: 'config-provider',
298308
component: () => import('tdesign-mobile-react/config-provider/_example/index.tsx'),
299309
},
310+
{
311+
title: 'ActionSheet 动作面板',
312+
name: 'action-sheet',
313+
component: () => import('tdesign-mobile-react/action-sheet/_example/index.tsx'),
314+
},
300315
],
301316
};

site/pwaConfig.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
export default {
22
strategies: 'injectManifest',
3-
includeAssets: ['favicon.svg', 'favicon.ico', 'apple-touch-icon.png'],
3+
includeAssets: ['favicon.svg', 'favicon.ico', 'apple-touch-icon.png'],
4+
injectManifest: {
5+
maximumFileSizeToCacheInBytes: 7000000,
6+
},
47
manifest: {
58
name: 'TDesign for Mobile React',
69
short_name: 'TDesign',
@@ -16,7 +19,7 @@ export default {
1619
src: 'pwa-512x512.png',
1720
sizes: '512x512',
1821
type: 'image/png',
19-
}
20-
]
21-
}
22+
},
23+
],
24+
},
2225
};

site/style/mobile/index.less

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33

44
:root,
55
:root[theme-mode='light'] {
6-
--bg-color-demo: #fff;
6+
--bg-color-demo: #f6f6f6;
77
--text-primary: #181818;
88
--text-secondary: #181818;
99
}
1010

1111
:root[theme-mode='dark'] {
1212
--bg-color-demo: #181818;
1313
--text-primary: rgba(255, 255, 255, 0.9);
14-
--text-secondary: rgba(255, 255, 255, .55);
14+
--text-secondary: rgba(255, 255, 255, 0.55);
1515
}
1616

1717
.tdesign-demo-topnav {
@@ -20,12 +20,14 @@
2020
align-items: center;
2121
justify-content: center;
2222
height: 50px;
23-
background-color: var(--bg-color-demo);
23+
background-color: var(--td-bg-color-container);
2424
color: var(--text-primary);
2525
box-shadow: @shadow-level-1;
26+
2627
&-title {
2728
font-size: 18px;
2829
}
30+
2931
&__back {
3032
position: absolute;
3133
left: 16px;

site/vite.config.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,18 @@ const publicPathMap = {
1313
production: 'https://static.tdesign.tencent.com/mobile-react/',
1414
};
1515

16+
// Rollup 4+ 的 tree-shaking 策略调整, 这里是为了让样式在站点构建正常
17+
const disableTreeShakingPlugin = (paths) => ({
18+
name: 'disable-treeshake',
19+
transform(code, id) {
20+
for (const path of paths) {
21+
if (id.includes(path)) {
22+
return { code, map: null, moduleSideEffects: 'no-treeshake' };
23+
}
24+
}
25+
},
26+
});
27+
1628
export default ({ mode }) =>
1729
defineConfig({
1830
base: publicPathMap[mode],
@@ -48,5 +60,11 @@ export default ({ mode }) =>
4860
https: false,
4961
fs: { strict: false },
5062
},
51-
plugins: [react(), tdocPlugin(), VitePWA(pwaConfig), replace({ __DATE__: new Date().toISOString() })],
63+
plugins: [
64+
react(),
65+
tdocPlugin(),
66+
VitePWA(pwaConfig),
67+
disableTreeShakingPlugin(['style/']),
68+
replace({ __DATE__: new Date().toISOString() }),
69+
],
5270
});

site/web/Demo.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import React from 'react';
22
import { Link, useLocation } from 'react-router-dom';
33
import Button from 'tdesign-mobile-react/button';
44

5-
export const jsxDemoFiles = import.meta.globEager('../../src/**/_example/*.jsx');
6-
export const tsxDemoFiles = import.meta.globEager('../../src/**/_example/*.tsx');
5+
export const jsxDemoFiles = import.meta.glob('../../src/**/_example/*.jsx', { eager: true });
6+
export const tsxDemoFiles = import.meta.glob('../../src/**/_example/*.tsx', { eager: true });
77

88
const demoObject = {};
99

site/web/site.config.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -388,12 +388,12 @@ export const docs = [
388388
// path: '/mobile-react/components/image-viewer',
389389
// component: () => import('tdesign-mobile-react/image-viewer/image-viewer.md'),
390390
// },
391-
// {
392-
// title: 'List 列表',
393-
// name: 'list',
394-
// path: '/mobile-react/components/list',
395-
// component: () => import('tdesign-mobile-react/list/list.md'),
396-
// },
391+
{
392+
title: 'List 列表',
393+
name: 'list',
394+
path: '/mobile-react/components/list',
395+
component: () => import('tdesign-mobile-react/list/list.md'),
396+
},
397397
{
398398
title: 'Progress 进度条',
399399
titleEn: 'Progress',
@@ -456,12 +456,12 @@ export const docs = [
456456
titleEn: 'FeedBack',
457457
type: 'component',
458458
children: [
459-
// {
460-
// title: 'ActionSheet 动作面板',
461-
// name: 'action-sheet',
462-
// path: '/mobile-react/components/actionsheet',
463-
// component: () => import('tdesign-mobile-react/action-sheet/action-sheet.md'),
464-
// },
459+
{
460+
title: 'ActionSheet 动作面板',
461+
name: 'action-sheet',
462+
path: '/mobile-react/components/actionsheet',
463+
component: () => import('tdesign-mobile-react/action-sheet/action-sheet.md'),
464+
},
465465
{
466466
title: 'Dialog 对话框',
467467
titleEn: 'Dialog',

0 commit comments

Comments
 (0)