Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style(circleprogress): docs 优化,修订 css 变量 #1699

Merged
merged 38 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
49a6aca
feat: uploader taro h5 支持video
xiaoyatong Nov 9, 2023
8297caf
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 13, 2023
9d730d4
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 14, 2023
ecc10ce
fix: delete sth doesnot merge
xiaoyatong Nov 14, 2023
49310f9
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 14, 2023
5b84c0d
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 14, 2023
e633cea
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 14, 2023
bd3aa30
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 15, 2023
6eb249a
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 15, 2023
981162e
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 16, 2023
2369884
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 16, 2023
85f285f
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 17, 2023
f09fec7
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 17, 2023
137b690
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 17, 2023
7ddfca7
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 20, 2023
6f2e558
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 21, 2023
60c4d72
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 21, 2023
3a86c79
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 21, 2023
a927492
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 22, 2023
225acd3
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 22, 2023
0b21faa
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 22, 2023
14cd4e1
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 22, 2023
59fb3db
style: delete dark
xiaoyatong Nov 22, 2023
068f800
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 22, 2023
8f490ea
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 23, 2023
f63d00c
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 23, 2023
53783e1
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 23, 2023
334bb27
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 24, 2023
b5b3129
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 24, 2023
dea6141
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 24, 2023
253eecf
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 27, 2023
ac3c216
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 27, 2023
a856800
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 27, 2023
a391d51
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 29, 2023
9ed5ddf
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 29, 2023
b830fe5
Merge branch 'next' of https://github.com/jdf2e/nutui-react into next
xiaoyatong Nov 29, 2023
03a9872
docs: circleprogress docs
xiaoyatong Nov 29, 2023
b7d7fb9
docs: update button size
oasis-cloud Nov 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 7 additions & 21 deletions src/packages/circleprogress/demo.scss
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
.demo-circleprogress {
min-height: 100vh;
}
.demo__btn {
text-align: center;
width: 100%;
height: 50px;
border-top: 1px solid rgba(234, 240, 251, 1);
padding-top: 6px;
background: rgba(255, 255, 255, 1);
.nut-button {
margin-right: 10px;
}
}
.demo-btn {
.nut-button {
margin-right: 10px;

.demo-btn {
margin-top: -16px;

.nut-button {
margin-right: 10px;
}
}
}
.demo__piece {
display: flex;
justify-content: center;
background: rgba(255, 255, 255, 1);
padding: 10px 0;
}
19 changes: 12 additions & 7 deletions src/packages/circleprogress/demo.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const CircleProgressDemo = () => {

const gradientColor = {
'0%': '#ff404f',
'100%': '#fa2c19',
'100%': '#1988fa',
}

return (
Expand All @@ -90,12 +90,13 @@ const CircleProgressDemo = () => {

<h2>{translated['67eacf7f']}</h2>
<Cell style={{ justifyContent: 'center' }}>
<CircleProgress percent={50} strokeWidth={10} />
<CircleProgress percent={50} strokeWidth={2} />
<CircleProgress percent={60} strokeWidth={10} background="#e5e9f2" />
</Cell>

<h2>{translated['3fee7d50']}</h2>
<Cell style={{ justifyContent: 'center' }}>
<CircleProgress percent={50} color="#fa2c19">
<CircleProgress percent={50} color="#1988fa">
50%
</CircleProgress>
<CircleProgress percent={100} color={gradientColor}>
Expand All @@ -114,7 +115,7 @@ const CircleProgressDemo = () => {
<Cell style={{ justifyContent: 'center' }}>
<CircleProgress percent={50} radius={60}>
<div>3000</div>
<div style={{ fontSize: '12px', color: 'var(--nutui-gray-2)' }}>
<div style={{ fontSize: '12px', color: 'var(--nutui-black-10)' }}>
</div>
</CircleProgress>
Expand All @@ -124,11 +125,15 @@ const CircleProgressDemo = () => {
<Cell style={{ justifyContent: 'center' }}>
<CircleProgress percent={percent}>{percent}%</CircleProgress>
</Cell>
<Cell className="demo__btn" style={{ justifyContent: 'center' }}>
<Button type="primary" onClick={setReduceVal}>
<Cell
className="demo-btn"
radius="0 0 6px 6px"
style={{ justifyContent: 'center' }}
>
<Button type="primary" size="small" onClick={setReduceVal}>
{translated['43c9f2ba']}
</Button>
<Button type="primary" onClick={setAddVal}>
<Button type="primary" size="small" onClick={setAddVal}>
{translated.bce53fe7}
</Button>
</Cell>
Expand Down
18 changes: 11 additions & 7 deletions src/packages/circleprogress/demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ const CircleProgressDemo = () => {
}

const gradientColor = {
'0%': '#FF5E5E',
'100%': '#FFA062',
'0%': 'var(--nutui-color-primary-stop-1)',
'100%': 'var(--nutui-color-primary-stop-2)',
}

return (
<>
<div className="demo">
<div className="demo demo-circleprogress">
<h2>{translated['84aa6bce']}</h2>
<Cell style={{ justifyContent: 'center' }}>
<CircleProgress percent={20} />
Expand Down Expand Up @@ -110,7 +110,7 @@ const CircleProgressDemo = () => {
<Cell style={{ justifyContent: 'center' }}>
<CircleProgress percent={50} radius={60}>
<div>3000</div>
<div style={{ fontSize: '12px', color: 'var(--nutui-gray-2)' }}>
<div style={{ fontSize: '12px', color: 'var(--nutui-black-10)' }}>
</div>
</CircleProgress>
Expand All @@ -120,11 +120,15 @@ const CircleProgressDemo = () => {
<Cell style={{ justifyContent: 'center' }}>
<CircleProgress percent={percent}>{percent}%</CircleProgress>
</Cell>
<Cell className="demo-btn" style={{ justifyContent: 'center' }}>
<Button type="primary" onClick={setReduceVal}>
<Cell
className="demo-btn"
radius="0 0 6px 6px"
style={{ justifyContent: 'center' }}
>
<Button type="primary" size="small" onClick={setReduceVal}>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议对应的 doc 文件中也增加上 size 属性。什么样的 demo 使用 small 尺寸的按钮,规范来自什么地方?

{translated['43c9f2ba']}
</Button>
<Button type="primary" onClick={setAddVal}>
<Button type="primary" size="small" onClick={setAddVal}>
{translated.bce53fe7}
</Button>
</Cell>
Expand Down
4 changes: 2 additions & 2 deletions src/packages/circleprogress/doc.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const App = () => {
<CircleProgress percent={50} radius={60}>
<>
<div>3000</div>
<div style={{ fontSize: '12px', color: 'var(--nutui-gray-2)' }}>步</div>
<div style={{ fontSize: '12px', color: 'var(--nutui-black-10)' }}>步</div>
</>
</CircleProgress>
</>
Expand Down Expand Up @@ -208,5 +208,5 @@ The component provides the following CSS variables, which can be used to customi
| --- | --- | --- |
| \--nutui-circleprogress-primary-color | The color of the filled part of the circular progress bar | `$color-primary` |
| \--nutui-circleprogress-path-color | The color of the circular progress bar track | `#e5e9f2` |
| \--nutui-circleprogress-text-color | The color of the track content area of ​​the circular progress bar | `$title-color` |
| \--nutui-circleprogress-text-color | The color of the track content area of ​​the circular progress bar | `$color-title` |
| \--nutui-circleprogress-text-size | The size of the track content area of ​​the circular progress bar | `$font-size-large` |
4 changes: 2 additions & 2 deletions src/packages/circleprogress/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const App = () => {
<CircleProgress percent={50} radius={60}>
<>
<div>3000</div>
<div style={{ fontSize: '12px', color: 'var(--nutui-gray-2)' }}>步</div>
<div style={{ fontSize: '12px', color: 'var(--nutui-black-10)' }}>步</div>
</>
</CircleProgress>
</>
Expand Down Expand Up @@ -201,5 +201,5 @@ export default App;
| --- | --- | --- |
| \--nutui-circleprogress-primary-color | 环形进度条填充部分的颜色 | `$color-primary` |
| \--nutui-circleprogress-path-color | 环形进度条轨道的颜色 | `#e5e9f2` |
| \--nutui-circleprogress-text-color | 环形进度条轨道内容区的颜色 | `$title-color` |
| \--nutui-circleprogress-text-color | 环形进度条轨道内容区的颜色 | `$color-title` |
| \--nutui-circleprogress-text-size | 环形进度条轨道内容区的大小 | `$font-size-large` |
4 changes: 2 additions & 2 deletions src/packages/circleprogress/doc.taro.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const App = () => {
<>
<CircleProgress percent={50} radius={60}>
<div>3000</div>
<div style={{ fontSize: '12px', color: 'var(--nutui-gray-2)' }}>
<div style={{ fontSize: '12px', color: 'var(--nutui-black-10)' }}>
</div>
</CircleProgress>
Expand Down Expand Up @@ -201,5 +201,5 @@ export default App;
| --- | --- | --- |
| \--nutui-circleprogress-primary-color | 环形进度条填充部分的颜色 | `$color-primary` |
| \--nutui-circleprogress-path-color | 环形进度条轨道的颜色 | `#e5e9f2` |
| \--nutui-circleprogress-text-color | 环形进度条轨道内容区的颜色 | `$title-color` |
| \--nutui-circleprogress-text-color | 环形进度条轨道内容区的颜色 | `$color-title` |
| \--nutui-circleprogress-text-size | 环形进度条轨道内容区的大小 | `$font-size-large` |
4 changes: 2 additions & 2 deletions src/packages/circleprogress/doc.zh-TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const App = () => {
<CircleProgress percent={50} radius={60}>
<>
<div>3000</div>
<div style={{ fontSize: '12px', color: 'var(--nutui-gray-2)' }}>步</div>
<div style={{ fontSize: '12px', color: 'var(--nutui-black-10)' }}>步</div>
</>
</CircleProgress>
</>
Expand Down Expand Up @@ -201,5 +201,5 @@ export default App;
| --- | --- | --- |
| \--nutui-circleprogress-primary-color | 環形進度條填充部分的顏色 | `$color-primary` |
| \--nutui-circleprogress-path-color | 環形進度條軌道的顏色 | `#e5e9f2` |
| \--nutui-circleprogress-text-color | 環形進度條軌道內容區的顏色 | `$title-color` |
| \--nutui-circleprogress-text-color | 環形進度條軌道內容區的顏色 | `$color-title` |
| \--nutui-circleprogress-text-size | 環形進度條軌道內容區的大小 | `$font-size-large` |