Skip to content

Commit c7f7a85

Browse files
authored
Merge branch 'Tencent:main' into rhino_bird_complete
2 parents 73b88a1 + 1688e97 commit c7f7a85

File tree

19 files changed

+748
-156
lines changed

19 files changed

+748
-156
lines changed

.github/ISSUE_TEMPLATE/bug-report.zh-CN.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ body:
66
attributes:
77
value: |
88
# 欢迎你的参与
9-
tdesign-flutter 的 Issue 列表接受 bug 报告或是新功能请求。也可加入官方社区:<img width="80px" src="https://user-images.githubusercontent.com/15634204/157386871-bf84c2ea-a02f-4c1c-b6fd-577450cdbcf7.png" />
9+
tdesign-flutter 的 Issue 列表接受 bug 报告或是新功能请求。也可加入官方社区:<img width="80px" src="https://github.com/Tencent/tdesign-flutter/blob/main/tdesign-component/feedback.png" />
1010
1111
在发布一个 Issue 前,请确保:
12-
- 在 [常见问题](https://tdesign.tencent.com/about/faq)、[更新日志](https://github.com/TDesignOteam/tdesign-flutter/blob/main/CHANGELOG.md) 和 [旧Issue列表](https://github.com/TDesignOteam/tdesign-flutter/issues?q=is%3Aissue) 中搜索过你的问题。(你的问题可能已有人提出,也可能已在最新版本中被修正)
13-
- 如果你发现一个已经关闭的旧 Issue 在最新版本中仍然存在,不要在旧 Issue 下面留言,请建一个新的 issue。
12+
- 在 [更新日志](https://tdesign.tencent.com/flutter/changelog) 和 [Issue列表](https://github.com/Tencent/tdesign-flutter/issues) 中搜索过你的问题。(你的问题可能已有人提出,也可能已在最新版本中被修正)
13+
- 如果你发现一个已经关闭的旧 Issue 在最新版本中仍然存在,不要在旧 Issue 下面留言,请建一个新的 issue。
1414
1515
- type: input
1616
id: version
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: 反馈文档
2+
description: 通过 github 模板进行文档反馈。
3+
title: "[文档名称] 描述问题的标题"
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
# 欢迎你的参与
9+
tdesign-flutter 的 Issue 列表接受 bug 报告或是新功能请求。也可加入官方社区:<img width="80px" src="https://github.com/Tencent/tdesign-flutter/blob/main/tdesign-component/feedback.png" />
10+
11+
在发布一个 Issue 前,请确保:
12+
- 在 [更新日志](https://tdesign.tencent.com/flutter/changelog) 和 [Issue列表](https://github.com/Tencent/tdesign-flutter/issues) 中搜索过你的问题。(你的问题可能已有人提出,也可能已在最新版本中被修正)
13+
- 如果你发现一个已经关闭的旧 Issue 在最新版本中仍然存在,不要在旧 Issue 下面留言,请建一个新的 issue。
14+
15+
- type: textarea
16+
id: docModificationPlan
17+
attributes:
18+
label: 你建议的文案是什么
19+
placeholder: 请填写
20+
validations:
21+
required: true

.github/ISSUE_TEMPLATE/feature-report.zh-CN.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ body:
66
attributes:
77
value: |
88
# 欢迎你的参与
9-
tdesign-flutter 的 Issue 列表接受 bug 报告或是新功能请求。也可加入官方社区:<img width="80px" src="https://user-images.githubusercontent.com/15634204/157386871-bf84c2ea-a02f-4c1c-b6fd-577450cdbcf7.png" />
9+
tdesign-flutter 的 Issue 列表接受 bug 报告或是新功能请求。也可加入官方社区:<img width="80px" src="https://github.com/Tencent/tdesign-flutter/blob/main/tdesign-component/feedback.png" />
1010
1111
在发布一个 Issue 前,请确保:
12-
- 在 [常见问题](https://tdesign.tencent.com/about/faq)、[更新日志](https://github.com/TDesignOteam/tdesign-flutter/blob/main/CHANGELOG.md) 和 [旧Issue列表](https://github.com/TDesignOteam/tdesign-flutter/issues?q=is%3Aissue) 中搜索过你的问题。(你的问题可能已有人提出,也可能已在最新版本中被修正)
12+
- 在 [更新日志](https://tdesign.tencent.com/flutter/changelog) 和 [Issue列表](https://github.com/Tencent/tdesign-flutter/issues) 中搜索过你的问题。(你的问题可能已有人提出,也可能已在最新版本中被修正)
1313
- 如果你发现一个已经关闭的旧 Issue 在最新版本中仍然存在,不要在旧 Issue 下面留言,请建一个新的 issue。
1414
1515
- type: textarea

CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
.
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

CONTRIBUTING.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# CONTRIBUTING
2+
3+
## 目录结构
4+
5+
```text
6+
tdesign-component/
7+
├── demo_tool // API和演示代码
8+
├── examples // 组件使用示例
9+
├── lib // 组件库
10+
└── tests // 组件测试
11+
12+
tdesign-site/ // tdesign flutter站点
13+
```
14+
15+
## 开发规范
16+
17+
- 组件命名规范:以`TD`为前缀,组件名称、`API`名称参考`TDesign`现有组件和`API`命名,可以根据`flutter`原生`Widget`的特点进行修改。组件`API`以满足设计要求和使用为准,可根据`flutter`特点做精简或定制。
18+
- 组件库用到的所有色值、圆角、字体字号等样式属性需全部定义在主题中。
19+
- 代码规范遵循腾讯`Dart`代码规范。
20+
- 对于系统原有组件,如`Text`,`Image`等,应兼容系统原组件功能,只能扩展,不能阉割,以免业务需要使用系统功能时,必须放弃`TDesign`控件。
21+
- 示例页面尽量使用`ExamplePage+ExampleModule+ExampleItem`组合,按照示例稿的布局实现;页面写完后,在`main.dart`中修改`exampleMap`对应组件的`isTodo`属性即可。
22+
- 组件`API`和演示代码,请参考[demo_tool](tdesign-component/demo_tool/README.md)文件。
23+
- 组件内部的固定文案,都应该抽离到`TDResourceDelegate`中统一管理,方便业务进行国际化适配

LICENSE

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
MIT License
2+
3+
Copyright (c) 2023-present TDesign, tdesign@tencent.com
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 92 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,103 @@
44
</a>
55
</p>
66

7-
TDesign Flutter 技术栈组件库,适合在移动端项目中使用。
7+
<p align="center">
8+
<a href="https://github.com/Tencent/tdesign-flutter/blob/mainLICENSE">
9+
<img src="https://img.shields.io/github/license/tencent/tdesign-flutter" alt="License">
10+
</a>
11+
<a href="https://pub.dev/packages/tdesign_flutter/license">
12+
<img src="https://img.shields.io/pub/v/tdesign_flutter" alt="Version">
13+
</a>
14+
<a href="https://pub.dev/packages/tdesign_flutter/score">
15+
<img src="https://img.shields.io/pub/dm/tdesign_flutter" alt="Downloads">
16+
</a>
17+
</p>
18+
19+
English | [简体中文](README_zh_CN.md)
20+
21+
Tencent TDesign UI component library of Flutter, suitable for use in mobile projects.
22+
23+
24+
# 🎉 Features
25+
26+
- Provides Flutter UI component library in TDesign design style
27+
- Support customizing themes according to App design style
28+
- Provides commonly used Icon library and supports customized replacement
29+
- Define color groups according to the TDesign specification, which can be viewed in TDColors to facilitate the adaptation of components to the TDesign specification.
30+
- The color value declaration class can add default colors and view the default display effect of color values in real time.
31+
32+
33+
# 🔨 Usage
34+
- SDK dependency version
35+
```yaml
36+
dart: ">=2.19.0 <4.0.0"
37+
flutter: ">=3.7.0"
38+
```
39+
40+
- Add the dependency in `pubspec.yaml`
41+
42+
```yaml
43+
dependencies:
44+
tdesign_flutter: ^0.0.6
45+
```
46+
47+
- Import at the top of your file:
48+
49+
```dart
50+
import 'package:tdesign_flutter/tdesign_flutter.dart';
51+
```
52+
53+
- You can configure theme styles such as colors, font sizes, font styles, corner radius, and shadows through a json file.
54+
Retrieve theme data using `TDTheme.of(context)` or `TDTheme.defaultData()`. It is recommended
55+
that components use `TDTheme.of(context)` unless the component does not need to follow local themes,
56+
in which case `TDTheme.defaultData()` can be used.
57+
58+
Examples of using colors, fonts, and corner radius:
59+
60+
```dart
61+
TDTheme.of(context).brandNormalColor
62+
TDTheme.defaultData().fontBodyLarge
63+
```
64+
65+
- TDesign's icons do not follow the theme, they are all in ttf format, usage examples:
66+
67+
```dart
68+
Icon(TDIcons.activity)
69+
```
70+
71+
- For more use examples, please refer to [example/lib/page](tdesign-component/example/lib/page)
72+
73+
74+
# TDesign component libraries
75+
76+
TDesign also provides component libraries for other platforms and frameworks.
77+
78+
- component library for Vue 2.x : [tdesign-vue](https://github.com/Tencent/tdesign-vue)
79+
- component library for Vue 3.x : [tdesign-vue-next](https://github.com/Tencent/tdesign-vue-next)
80+
- component library for React : [tdesign-react](https://github.com/Tencent/tdesign-react)
81+
- component library for Vue 3.x Mobile : [tdesign-mobile-vue](https://github.com/Tencent/tdesign-mobile-vue)
82+
- component library for React Mobile : [tdesign-mobile-react](https://github.com/Tencent/tdesign-mobile-react)
83+
- component library for Wechat miniprogram : [tdesign-miniprogram](https://github.com/Tencent/tdesign-miniprogram)
84+
85+
# Acknowledgements
86+
87+
TDesign Flutter depends on the following component libraries. We appreciate the authors for their open-source contributions:
888

9-
# 简介
89+
- [easy_refresh](https://pub-web.flutter-io.cn/packages/easy_refresh)
90+
- [flutter_swiper](https://pub-web.flutter-io.cn/packages/flutter_swiper)
91+
- [flutter_slidable](https://pub-web.flutter-io.cn/packages/flutter_slidable)
92+
- [image_picker](https://pub-web.flutter-io.cn/packages/image_picker)
1093

11-
Flutter 组件库项目在 tdesign-component 文件夹下,相关使用详见[tdesign-component/README_zh.md](./tdesign-component/README_zh.md)
94+
# Contributing
1295

13-
# 其他技术栈实现
96+
Contributing is welcome. Read [guidelines for contributing](CONTRIBUTING.md) before submitting your [Pull Request](https://github.com/Tencent/tdesign-flutter/pulls).
1497

15-
- 桌面端 Vue 3 实现:[web-vue-next](https://github.com/Tencent/tdesign-vue-next)
16-
- 桌面端 React 实现: [web-react](https://github.com/Tencent/tdesign-react)
17-
- 移动端小程序实现: [小程序](https://github.com/Tencent/tdesign-miniprogram)
98+
# Feedback
1899

19-
# 交流反馈
100+
Create your [Github issues](https://github.com/Tencent/tdesign-vue-next/issues) or scan the QR code below to join our user groups
20101

21-
<img src="https://raw.githubusercontent.com/Tencent/tdesign/main/packages/components/src/images/groups/flutter-group.png" width="200" />
102+
<img src="https://raw.githubusercontent.com/Tencent/tdesign/main/packages/components/src/images/groups/vue3-group.png" width="200" />
22103

23-
# 开源协议
104+
# License
24105

25-
TDesign 遵循 [MIT 协议](https://github.com/Tencent/tdesing-flutter/blob/main/tdesign-component/LICENSE)
106+
The MIT License. Please see [the license file](LICENSE) for more information.

0 commit comments

Comments
 (0)