Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit dd4c832
Author: wū yāng <[email protected]>
Date:   Sun Mar 2 15:19:16 2025 +0800

    chore: change docs file path (Tencent#3403)

commit 071c4b8
Author: wū yāng <[email protected]>
Date:   Sun Mar 2 15:04:50 2025 +0800

    refactor: mono repo move src to packages/components (Tencent#3402)

    * chore: remove old submodule

    * refactor: add new submodule

    * refactor: add new submodule

    * refactore: move src to packages/components

    * refactor: mono repo

    * refactor: site rerun

    * refactor: test rerun

    * refactor: fix build

commit 9a0b6ac
Author: Haixing <[email protected]>
Date:   Fri Feb 28 16:59:07 2025 +0800

    Release: 1.11.1 (Tencent#3393)

    * release/1.11.1

    * chore: changelog's changes

    ---------

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

commit bfc06a6
Author: wū yāng <[email protected]>
Date:   Fri Feb 28 16:25:28 2025 +0800

    fix: fix cjs bundle (Tencent#3392)

commit b15b142
Author: liweijie0812 <[email protected]>
Date:   Wed Feb 26 16:21:35 2025 +0800

    feat(Content): support content api (Tencent#3384)

commit 0cc866b
Author: huangchen1031 <[email protected]>
Date:   Wed Feb 26 16:21:12 2025 +0800

    fix(Table): fix footer render when using virtual scroll (Tencent#3383)

    * fix(table): 修复虚拟滚动下的footer渲染问题

    * chore: update snapshots

    * chore: update snapshots

    * chore: update snapshot

    ---------

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Merge branch 'develop' into feat/drawerPlugin
  • Loading branch information
Wesley-0808 committed Mar 3, 2025
2 parents e565ec7 + dd4c832 commit f0b0df0
Show file tree
Hide file tree
Showing 1,862 changed files with 3,766 additions and 3,690 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ script/test/cypress
_site
temp*
static/
src/_common
packages/common
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ cypress-coverage
instrumented
cy-report
.history
src/**/_example-js/
packages/components/**/_example-js/
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "src/_common"]
path = src/_common
[submodule "packages/common"]
path = packages/common
url = https://github.com/Tencent/tdesign-common.git
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ toc: false
spline: explain
---

## 🌈 1.11.1 `2025-02-28`
### 🚀 Features
- `Layout`: 子组件 `Content` 新增 `content` API @liweijie0812 ([#3384](https://github.com/Tencent/tdesign-react/pull/3384))
### 🐞 Bug Fixes
- `reactRender`: fix `React19` `reactRender` error @HaixingOoO ([#3380](https://github.com/Tencent/tdesign-react/pull/3380))
- `table`: 修复虚拟滚动下的footer渲染问题 @huangchen1031 ([#3383](https://github.com/Tencent/tdesign-react/pull/3383))
- `fix`: 修复`1.11.0` cjs 产物的异常 @uyarn ([#3392](https://github.com/Tencent/tdesign-react/pull/3392))
### 📝 Documentation
- `ConfigProvider`: 增加 `globalConfig` API文档 @liweijie0812 ([#3384](https://github.com/Tencent/tdesign-react/pull/3384))

## 🌈 1.11.0 `2025-02-20`
### 🚀 Features
- `Cascader`: 新增支持在打开菜单时,自动滚动到首个已选项所在节点的能力 @uyarn ([#3357](https://github.com/Tencent/tdesign-react/pull/3357))
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ npm run start

## 子仓库 tdesign-common

TDesign 的项目都会以子仓库的形式引入 `tdesign-common` 公共仓库,对应 `src/\_common` 文件夹,
TDesign 的项目都会以子仓库的形式引入 `tdesign-common` 公共仓库,对应 `packages/common` 文件夹,
公共仓库中包含

- 部分组件的一些框架无关的公共的工具函数
Expand All @@ -101,15 +101,15 @@ TDesign 的项目都会以子仓库的形式引入 `tdesign-common` 公共仓库
- 如开发部分提到的,初次克隆代码后需要初始化子仓库: `git submodule init && git submodule update`
- git submodule update 之后子仓库不指向任何分支,只是一个指向某一个提交的游离状态


### 涉及子仓库的开发

1. Fork 并克隆子仓库 https://github.com/Tencent/tdesign-common
2. 新建分支,并进行开发
3. 提交子仓库的 PR,等待代码合入
4. 如果仅涉及子仓库改动,项目维护方会通过评论触发 CI,自动更新主仓库的子仓库指向;

如果需要配合子仓库改动,需要在步骤 3 完成后,在主仓库的开发过程中,将子仓库的指向改为合并后的主干的 commit id,主仓库代码开发完后正常提交发起PR即可

如果需要配合子仓库改动,需要在步骤 3 完成后,在主仓库的开发过程中,将子仓库的指向改为合并后的主干的 commit id,主仓库代码开发完后正常提交发起 PR 即可

```bash
git submodule update --init --remote
```
Expand Down
6 changes: 3 additions & 3 deletions DEVELOP_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ tdesign-react 包含 web-react 代码和一个子仓库,子仓库指向 [tdesi

## 公共子仓库 tdesign-common

本项目以子仓库的形式引入 tdesign-common 公共仓库,对应 src/\_common 文件夹
本项目以子仓库的形式引入 tdesign-common 公共仓库,对应 packages/common 文件夹
公共仓库中包含

- 一些公共的工具函数
Expand Down Expand Up @@ -50,7 +50,7 @@ UI 开发规范参考子仓库 README [子仓库 README](https://github.com/Tenc

### API 规范

[API](./src/_common/api.md)
[API](./packages/common/api.md)

### 前缀

Expand Down Expand Up @@ -157,7 +157,7 @@ npm run init button

### 组件 Demo 演示配置

为了保证与 vue 等其他仓库演示文档内容统一,目前将公共基础演示 demo 与说明归档在 `src/_common/docs/web/api/[组件].md` 中,其中需要各个技术栈的组件提供文档里面所要求的基础 demo 文件否则会编译警告。
为了保证与 vue 等其他仓库演示文档内容统一,目前将公共基础演示 demo 与说明归档在 `packages/common/docs/web/api/[组件].md` 中,其中需要各个技术栈的组件提供文档里面所要求的基础 demo 文件否则会编译警告。

例如 `tooltip` 组件则需要 `_expample` 文件夹中包含有 `arrow.jsx``noArrow.jsx` 文件

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tdesign-react",
"purename": "tdesign",
"version": "1.11.0",
"version": "1.11.1",
"description": "TDesign Component for React",
"title": "tdesign-react",
"main": "lib/index.js",
Expand Down Expand Up @@ -42,12 +42,12 @@
"site:preview": "npm run build:jsx-demo && cd site && vite build --mode preview",
"postsite:preview": "cp _site/index.html _site/404.html",
"lint": "npm run lint:tsc && eslint --ext .ts,.tsx ./ --max-warnings 0",
"lint:fix": "eslint --ext .ts,.tsx ./src --ignore-pattern src/__tests__ --max-warnings 0 --fix",
"lint:fix": "eslint --ext .ts,.tsx ./packages/components --ignore-pattern packages/components/__tests__ --max-warnings 0 --fix",
"lint:tsc": "tsc -p ./tsconfig.dev.json ",
"generate:usage": "node script/generate-usage/index.js",
"generate:coverage-badge": "npm run test:coverage && node script/generate-coverage.js",
"generate:jsx-demo": "npx babel src/**/_example --extensions '.tsx' --config-file ./babel.config.demo.js --relative --out-dir ../_example-js --out-file-extension=.jsx",
"format:jsx-demo": "npx eslint src/**/_example-js/*.jsx --fix && npx prettier --write src/**/_example-js/*.jsx",
"generate:jsx-demo": "npx babel packages/components/**/_example --extensions '.tsx' --config-file ./babel.config.demo.js --relative --out-dir ../_example-js --out-file-extension=.jsx",
"format:jsx-demo": "npx eslint packages/components/**/_example-js/*.jsx --fix && npx prettier --write packages/components/**/_example-js/*.jsx",
"test": "vitest run && npm run test:snap",
"test:ui": "vitest --ui",
"test:snap": "cross-env NODE_ENV=test-snap vitest run",
Expand Down
1 change: 1 addition & 0 deletions packages/common
Submodule common added at f15c0c
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { ReactElement, ReactNode } from 'react';
import { isFunction } from 'lodash-es';
import { TNode } from '../common';
import log from '../_common/js/log';
import log from '../../common/js/log';

// 解析 TNode 数据结构
export default function parseTNode(
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ name | type | default | description | required
-- | -- | -- | -- | --
className | String | - | 类名 | N
style | Object | - | 样式,Typescript:`React.CSSProperties` | N
children | TNode | - | Typescript:`string \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N
container | String / Function | () => (() => window) | Typescript:`ScrollContainer`[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N
content | TNode | - | Typescript:`string \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N
children | TNode | - | Typescript:`string \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
container | String / Function | () => (() => window) | Typescript:`ScrollContainer`[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
content | TNode | - | Typescript:`string \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
offsetBottom | Number | 0 | When the distance from the bottom of the container reaches the specified distance, the trigger is fixed | N
offsetTop | Number | 0 | When the distance from the top of the container reaches the specified distance, the trigger is fixed | N
zIndex | Number | - | \- | N
Expand Down
6 changes: 3 additions & 3 deletions src/affix/affix.md → packages/components/affix/affix.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
-- | -- | -- | -- | --
className | String | - | 类名 | N
style | Object | - | 样式,TS 类型:`React.CSSProperties` | N
children | TNode | - | 内容,同 content。TS 类型:`string \| TNode`[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N
container | String / Function | () => (() => window) | 指定滚动的容器。数据类型为 String 时,会被当作选择器处理,进行节点查询。示例:'body' 或 () => document.body。TS 类型:`ScrollContainer`[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N
content | TNode | - | 内容。TS 类型:`string \| TNode`[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N
children | TNode | - | 内容,同 content。TS 类型:`string \| TNode`[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
container | String / Function | () => (() => window) | 指定滚动的容器。数据类型为 String 时,会被当作选择器处理,进行节点查询。示例:'body' 或 () => document.body。TS 类型:`ScrollContainer`[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
content | TNode | - | 内容。TS 类型:`string \| TNode`[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
offsetBottom | Number | 0 | 距离容器顶部达到指定距离后触发固定 | N
offsetTop | Number | 0 | 距离容器底部达到指定距离后触发固定 | N
zIndex | Number | - | 固钉定位层级,样式默认为 500 | N
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions packages/components/affix/style/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '../../../common/style/web/components/affix/_index.less';
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ name | type | default | description | required
-- | -- | -- | -- | --
className | String | - | 类名 | N
style | Object | - | 样式,Typescript:`React.CSSProperties` | N
close | TNode | false | Typescript:`string \| boolean \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N
icon | TElement | - | Typescript:`TNode`[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N
close | TNode | false | Typescript:`string \| boolean \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
icon | TElement | - | Typescript:`TNode`[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
maxLine | Number | 0 | \- | N
message | TNode | - | Typescript:`string \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N
operation | TElement | - | Typescript:`TNode`[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N
message | TNode | - | Typescript:`string \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
operation | TElement | - | Typescript:`TNode`[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
theme | String | info | options:success/info/warning/error | N
title | TNode | - | Typescript:`string \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N
title | TNode | - | Typescript:`string \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
onClose | Function | | Typescript:`(context: { e: MouseEvent }) => void`<br/> | N
onClosed | Function | | Typescript:`(context: { e: TransitionEvent }) => void`<br/> | N
10 changes: 5 additions & 5 deletions src/alert/alert.md → packages/components/alert/alert.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
-- | -- | -- | -- | --
className | String | - | 类名 | N
style | Object | - | 样式,TS 类型:`React.CSSProperties` | N
close | TNode | false | 关闭按钮。值为 true 则显示默认关闭按钮;值为 false 则不显示按钮;值类型为 string 则直接显示;值类型为 Function 则可以自定关闭按钮。TS 类型:`string \| boolean \| TNode`[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N
icon | TElement | - | 图标。TS 类型:`TNode`[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N
close | TNode | false | 关闭按钮。值为 true 则显示默认关闭按钮;值为 false 则不显示按钮;值类型为 string 则直接显示;值类型为 Function 则可以自定关闭按钮。TS 类型:`string \| boolean \| TNode`[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
icon | TElement | - | 图标。TS 类型:`TNode`[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
maxLine | Number | 0 | 内容显示最大行数,超出的内容会折叠收起,用户点击后再展开。值为 0 表示不折叠 | N
message | TNode | - | 内容(子元素)。TS 类型:`string \| TNode`[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N
operation | TElement | - | 跟在告警内容后面的操作区。TS 类型:`TNode`[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N
message | TNode | - | 内容(子元素)。TS 类型:`string \| TNode`[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
operation | TElement | - | 跟在告警内容后面的操作区。TS 类型:`TNode`[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
theme | String | info | 组件风格。可选项:success/info/warning/error | N
title | TNode | - | 标题。TS 类型:`string \| TNode`[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N
title | TNode | - | 标题。TS 类型:`string \| TNode`[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
onClose | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>关闭按钮点击时触发 | N
onClosed | Function | | TS 类型:`(context: { e: TransitionEvent }) => void`<br/>告警提示框关闭动画结束后触发 | N
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions packages/components/alert/style/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '../../../common/style/web/components/alert/_index.less';
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ name | type | default | description | required
-- | -- | -- | -- | --
className | String | - | 类名 | N
style | Object | - | 样式,Typescript:`React.CSSProperties` | N
affixProps | Object | - | Typescript:`Omit<AffixProps, 'children'>`[Affix API Documents](./affix?tab=api)[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/anchor/type.ts) | N
affixProps | Object | - | Typescript:`Omit<AffixProps, 'children'>`[Affix API Documents](./affix?tab=api)[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/anchor/type.ts) | N
bounds | Number | 5 | \- | N
container | String / Function | () => window | Typescript:`ScrollContainer`[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N
cursor | TElement | - | Typescript:`TNode`[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N
container | String / Function | () => window | Typescript:`ScrollContainer`[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
cursor | TElement | - | Typescript:`TNode`[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
getCurrentAnchor | Function | - | Custom Highlighted Anchor Points。Typescript:`(activeLink: string) => string` | N
size | String | medium | options: small/medium/large。Typescript:`SizeEnum`[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N
size | String | medium | options: small/medium/large。Typescript:`SizeEnum`[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
targetOffset | Number | 0 | \- | N
onChange | Function | | Typescript:`(currentLink: string, prevLink: string) => void`<br/> | N
onClick | Function | | Typescript:`(link: { href: string; title: string; e: MouseEvent }) => void`<br/> | N
Expand All @@ -25,7 +25,7 @@ className | String | - | 类名 | N
style | Object | - | 样式,Typescript:`React.CSSProperties` | N
href | String | - | required | Y
target | String | _self | options: _self/_blank/_parent/_top | N
title | TNode | '' | Typescript:`string \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N
title | TNode | '' | Typescript:`string \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N

### AnchorTarget Props

Expand Down
Loading

0 comments on commit f0b0df0

Please sign in to comment.