📊 Lightweight React line and circle progress indicators with SVG rendering.
diff --git a/README.zh-CN.md b/README.zh-CN.md
index 4614640..775b799 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -1,6 +1,7 @@
@rc-component/progress
Ant Design 生态的一部分。
+
📊 React 进度条组件,支持线型、圆形和自定义进度展示。
From 414ca4063d7f72d8c174b83903ff3ba32314d9f8 Mon Sep 17 00:00:00 2001
From: afc163
Date: Sat, 27 Jun 2026 23:03:32 +0800
Subject: [PATCH 14/34] docs: refine bilingual README branding
---
README.md | 3 +--
README.zh-CN.md | 51 ++++++++++++++++++++++++-------------------------
2 files changed, 26 insertions(+), 28 deletions(-)
diff --git a/README.md b/README.md
index b9aea96..caca3aa 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,6 @@
@rc-component/progress
-
Part of the Ant Design ecosystem.
-

+
Part of the Ant Design ecosystem.
📊 Lightweight React line and circle progress indicators with SVG rendering.
diff --git a/README.zh-CN.md b/README.zh-CN.md
index 775b799..248aef8 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -1,7 +1,6 @@
@rc-component/progress
-
Ant Design 生态的一部分。
-

+
Ant Design 生态的一部分。
📊 React 进度条组件,支持线型、圆形和自定义进度展示。
@@ -19,10 +18,10 @@
## 特性
-- `Line` and `Circle` progress components rendered with SVG.
-- Single value, segmented value, gradient color, and indeterminate loading states.
-- Semantic `classNames` and `styles` slots for root, rail, and track customization.
-- TypeScript definitions for the shared progress props.
+- `Line` 和 `Circle` 使用 SVG 渲染的进度组件。
+- 单值、分段值、渐变颜色和不确定的加载状态。
+- 用于根、导轨和轨道定制的语义 `classNames` 和 `styles` 插槽。
+- 为共享进度属性提供 TypeScript 类型定义。
## 安装
@@ -63,32 +62,32 @@ npm install
npm start
```
-Online preview: https://progress.react-component.vercel.app/
+在线预览:https://progress.react-component.vercel.app/
## API
-`Line` and `Circle` share the same base props.
+`Line` 和 `Circle` 共享相同的基础属性。
| 名称 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
-| `className` | string | - | Additional class name for the root node. |
-| `classNames` | Partial> | - | Semantic class names for internal slots. |
-| `gapDegree` | number | - | Gap degree for circle progress. |
-| `gapPosition` | `'top'` \| `'right'` \| `'bottom'` \| `'left'` | `'bottom'` | Gap position for circle progress. |
-| `id` | string | - | Root element id. |
-| `loading` | boolean | false | Render an indeterminate loading animation. |
-| `onClick` | React.MouseEventHandler | - | Click handler for the root SVG. |
-| `percent` | number \| number[] | 0 | Progress percent. Arrays render multiple tracks. |
-| `prefixCls` | string | `'rc-progress'` | Prefix class name. |
+| `className` | string | - | 根节点的附加className称。 |
+| `classNames` | 部分<记录<'根'\| '铁路' | '轨道',字符串>> | - | 内部插槽的语义化 className。 |
+| `gapDegree` | number | - | 循环进度的差距度。 |
+| `gapPosition` | `'top'` \| `'right'` \| `'bottom'` \| `'left'` | `'bottom'` | 循环进度的间隙位置。 |
+| `id` | string | - | 根元素 ID。 |
+| `loading` | boolean | false | 渲染不确定的加载动画。 |
+| `onClick` | React.MouseEventHandler | - | 单击根 SVG 的处理程序。 |
+| `percent` | number \| number[] | 0 | 进度百分比。数组会渲染多条轨道。 |
+| `prefixCls` | string | `'rc-progress'` | 前缀className。 |
| `railColor` | string | `'#D9D9D9'` | Rail color. |
-| `railWidth` | number | 1 | Rail stroke width. |
-| `steps` | number \| { count: number; gap: number } | - | Render progress as discrete steps. |
-| `strokeColor` | string \| Record \| Array> | `'#2db7f5'` | Track color, gradient object, or per-track colors. |
+| `railWidth` | number | 1 | 导轨行程宽度。 |
+| `steps` | 数字\| { 计数:数量;间隙:数量 } | - | 以离散步骤渲染进度。 |
+| `strokeColor` | 字符串\|记录<字符串,字符串\|布尔值> \|数组<字符串\|记录<字符串,字符串\|布尔值>> | `'#2db7f5'` | 轨道颜色、渐变对象或每条轨道的颜色。 |
| `strokeLinecap` | `'round'` \| `'butt'` \| `'square'` | `'round'` | Stroke line cap. |
-| `strokeWidth` | number | 1 | Track stroke width. |
-| `style` | React.CSSProperties | - | Root style. |
-| `styles` | Partial> | - | Semantic styles for internal slots. |
-| `transition` | string | - | CSS transition for track updates. |
+| `strokeWidth` | number | 1 | 轨道描边宽度。 |
+| `style` | React.CSSProperties | - | 根样式。 |
+| `styles` | 部分<记录<'根'\| '铁路' | 'track',React.CSSProperties>> | - | 内部插槽的语义化样式。 |
+| `transition` | string | - | 用于跟踪更新的 CSS 过渡。 |
## 本地开发
@@ -107,8 +106,8 @@ npm run build
npm run prepublishOnly
```
-The release flow is handled by `@rc-component/np` through the `rc-np` command after the package build.
+包构建完成后,发布流程由 `@rc-component/np` 通过 `rc-np` 命令处理。
## 许可证
-@rc-component/progress is released under the [MIT](./LICENSE.md) license.
+@rc-component/progress 基于 [MIT](./LICENSE.md) 许可证发布。
From 87f1c6f29c30e693f065eecd4332fdf4bd7fba38 Mon Sep 17 00:00:00 2001
From: afc163
Date: Sun, 28 Jun 2026 01:28:42 +0800
Subject: [PATCH 15/34] chore: standardize rc tooling and docs
---
.dumirc.ts | 3 ++-
.github/workflows/surge-preview.yml | 2 +-
README.md | 4 +--
README.zh-CN.md | 4 +--
package.json | 40 ++++++++++++++---------------
tsconfig.json | 31 +++++++++++++++++-----
vercel.json | 2 +-
7 files changed, 53 insertions(+), 33 deletions(-)
diff --git a/.dumirc.ts b/.dumirc.ts
index 870f2d7..bb214c5 100644
--- a/.dumirc.ts
+++ b/.dumirc.ts
@@ -2,9 +2,10 @@
import { defineConfig } from 'dumi';
const basePath = process.env.GH_PAGES ? '/progress/' : '/';
-const publicPath = process.env.GH_PAGES ? '/progress/' : '/';
+const publicPath = basePath;
export default defineConfig({
+ outputPath: 'docs-dist',
favicons: ['https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'],
themeConfig: {
name: '@rc-component/progress',
diff --git a/.github/workflows/surge-preview.yml b/.github/workflows/surge-preview.yml
index b0f5a83..faf6b8b 100644
--- a/.github/workflows/surge-preview.yml
+++ b/.github/workflows/surge-preview.yml
@@ -34,7 +34,7 @@ jobs:
with:
surge_token: ${{ env.SURGE_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
- dist: dist
+ dist: docs-dist
failOnError: false
setCommitStatus: false
- name: Skip Surge preview
diff --git a/README.md b/README.md
index caca3aa..17ff5b7 100644
--- a/README.md
+++ b/README.md
@@ -55,14 +55,14 @@ export default () => (
## Examples
-Run the examples locally:
+Run the local dumi site:
```bash
npm install
npm start
```
-Online preview: https://progress.react-component.vercel.app/
+Then open `http://localhost:8000`.
## API
diff --git a/README.zh-CN.md b/README.zh-CN.md
index 248aef8..cdc2cb3 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -55,14 +55,14 @@ export default () => (
## 示例
-本地运行示例:
+运行本地 dumi 站点:
```bash
npm install
npm start
```
-在线预览:https://progress.react-component.vercel.app/
+然后打开 `http://localhost:8000`。
## API
diff --git a/package.json b/package.json
index aac06b7..95ee013 100644
--- a/package.json
+++ b/package.json
@@ -27,7 +27,7 @@
"start": "dumi dev",
"build": "npm run docs:build",
"docs:build": "dumi build",
- "docs:deploy": "gh-pages -d dist",
+ "docs:deploy": "gh-pages -d docs-dist",
"deploy": "npm run gh-pages",
"compile": "father build",
"prepare": "dumi setup",
@@ -46,26 +46,26 @@
"devDependencies": {
"@rc-component/father-plugin": "^2.2.0",
"@rc-component/np": "^1.0.4",
- "@testing-library/react": "^13.0.0",
- "@types/jest": "^29.4.0",
+ "@testing-library/react": "^15.0.7",
+ "@types/jest": "^29.5.14",
"@types/keyv": "3.1.4",
- "@types/node": "^24.5.2",
- "@types/react": "^18.0.9",
- "@types/react-dom": "^18.0.3",
- "@umijs/fabric": "^3.0.0",
- "cross-env": "^7.0.0",
- "dumi": "^2.0.0",
- "eslint": "^8.57.0",
- "eslint-plugin-jest": "^27.6.0",
- "eslint-plugin-unicorn": "^50.0.1",
- "father": "^4.0.0",
- "gh-pages": "^6.1.0",
- "glob": "^8.0.1",
- "prettier": "^3.1.1",
- "rc-test": "^7.0.15",
- "react": "^18.0.0",
- "react-dom": "^18.0.0",
- "typescript": "^5.0.0"
+ "@types/node": "^26.0.1",
+ "@types/react": "^18.3.31",
+ "@types/react-dom": "^18.3.7",
+ "@umijs/fabric": "^4.0.1",
+ "cross-env": "^10.1.0",
+ "dumi": "^2.4.35",
+ "eslint": "^8.57.1",
+ "eslint-plugin-jest": "^27.9.0",
+ "eslint-plugin-unicorn": "^56.0.1",
+ "father": "^4.6.23",
+ "gh-pages": "^6.3.0",
+ "glob": "^13.0.6",
+ "prettier": "^3.9.0",
+ "rc-test": "^7.1.3",
+ "react": "^18.3.1",
+ "react-dom": "^18.3.1",
+ "typescript": "^5.9.3"
},
"peerDependencies": {
"react": ">=16.9.0",
diff --git a/tsconfig.json b/tsconfig.json
index 90cc5ae..dc3b4fa 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -8,11 +8,30 @@
"skipLibCheck": true,
"esModuleInterop": true,
"paths": {
- "@/*": ["src/*"],
- "@@/*": [".dumi/tmp/*"],
- "@rc-component/progress": ["src/index.ts"]
- }
+ "@/*": [
+ "src/*"
+ ],
+ "@@/*": [
+ ".dumi/tmp/*"
+ ],
+ "@rc-component/progress": [
+ "src/index.ts"
+ ]
+ },
+ "ignoreDeprecations": "5.0"
},
- "include": [".dumirc.ts", "src", "docs", "tests"],
- "exclude": ["node_modules", "lib", "es", "dist", "docs-dist", ".dumi"]
+ "include": [
+ ".dumirc.ts",
+ "src",
+ "docs",
+ "tests"
+ ],
+ "exclude": [
+ "node_modules",
+ "lib",
+ "es",
+ "dist",
+ "docs-dist",
+ ".dumi"
+ ]
}
diff --git a/vercel.json b/vercel.json
index e884e1b..5f9139e 100644
--- a/vercel.json
+++ b/vercel.json
@@ -2,5 +2,5 @@
"framework": "umijs",
"installCommand": "npm install",
"buildCommand": "npm run build",
- "outputDirectory": "dist"
+ "outputDirectory": "docs-dist"
}
From 8eaedd27bbd8fb8255b3b6bf989301845523798d Mon Sep 17 00:00:00 2001
From: afc163
Date: Sun, 28 Jun 2026 02:01:07 +0800
Subject: [PATCH 16/34] chore: address standardization review comments
---
.github/workflows/surge-preview.yml | 16 +++++++++++++---
README.zh-CN.md | 16 ++++++++--------
2 files changed, 21 insertions(+), 11 deletions(-)
diff --git a/.github/workflows/surge-preview.yml b/.github/workflows/surge-preview.yml
index faf6b8b..cb6c8c4 100644
--- a/.github/workflows/surge-preview.yml
+++ b/.github/workflows/surge-preview.yml
@@ -22,13 +22,23 @@ jobs:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
with:
persist-credentials: false
+ - name: Check Surge token
+ id: surge-token
+ env:
+ SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
+ run: |
+ if [ -n "$SURGE_TOKEN" ]; then
+ echo "enabled=true" >> "$GITHUB_OUTPUT"
+ else
+ echo "enabled=false" >> "$GITHUB_OUTPUT"
+ fi
- name: Build preview
- if: ${{ secrets.SURGE_TOKEN != '' }}
+ if: ${{ steps.surge-token.outputs.enabled == 'true' }}
run: |
npm install
npm run build
- uses: afc163/surge-preview@bf90a5a86111f6311ca42f0a5a0f80fb0fb03cec
- if: ${{ secrets.SURGE_TOKEN != '' }}
+ if: ${{ steps.surge-token.outputs.enabled == 'true' }}
env:
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
with:
@@ -38,5 +48,5 @@ jobs:
failOnError: false
setCommitStatus: false
- name: Skip Surge preview
- if: ${{ secrets.SURGE_TOKEN == '' }}
+ if: ${{ steps.surge-token.outputs.enabled != 'true' }}
run: echo "SURGE_TOKEN is not configured; skip Surge preview."
diff --git a/README.zh-CN.md b/README.zh-CN.md
index cdc2cb3..35477c9 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -70,23 +70,23 @@ npm start
| 名称 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
-| `className` | string | - | 根节点的附加className称。 |
-| `classNames` | 部分<记录<'根'\| '铁路' | '轨道',字符串>> | - | 内部插槽的语义化 className。 |
+| `className` | string | - | 根节点的附加 className。 |
+| `classNames` | `Partial>` | - | 内部插槽的语义化 className。 |
| `gapDegree` | number | - | 循环进度的差距度。 |
| `gapPosition` | `'top'` \| `'right'` \| `'bottom'` \| `'left'` | `'bottom'` | 循环进度的间隙位置。 |
| `id` | string | - | 根元素 ID。 |
| `loading` | boolean | false | 渲染不确定的加载动画。 |
| `onClick` | React.MouseEventHandler | - | 单击根 SVG 的处理程序。 |
| `percent` | number \| number[] | 0 | 进度百分比。数组会渲染多条轨道。 |
-| `prefixCls` | string | `'rc-progress'` | 前缀className。 |
-| `railColor` | string | `'#D9D9D9'` | Rail color. |
+| `prefixCls` | string | `'rc-progress'` | 前缀 className。 |
+| `railColor` | string | `'#D9D9D9'` | 导轨颜色。 |
| `railWidth` | number | 1 | 导轨行程宽度。 |
-| `steps` | 数字\| { 计数:数量;间隙:数量 } | - | 以离散步骤渲染进度。 |
-| `strokeColor` | 字符串\|记录<字符串,字符串\|布尔值> \|数组<字符串\|记录<字符串,字符串\|布尔值>> | `'#2db7f5'` | 轨道颜色、渐变对象或每条轨道的颜色。 |
-| `strokeLinecap` | `'round'` \| `'butt'` \| `'square'` | `'round'` | Stroke line cap. |
+| `steps` | number \| { count: number; gap: number } | - | 以离散步骤渲染进度。 |
+| `strokeColor` | string \| Record \| Array> | `'#2db7f5'` | 轨道颜色、渐变对象或每条轨道的颜色。 |
+| `strokeLinecap` | `'round'` \| `'butt'` \| `'square'` | `'round'` | 描边端点样式。 |
| `strokeWidth` | number | 1 | 轨道描边宽度。 |
| `style` | React.CSSProperties | - | 根样式。 |
-| `styles` | 部分<记录<'根'\| '铁路' | 'track',React.CSSProperties>> | - | 内部插槽的语义化样式。 |
+| `styles` | `Partial>` | - | 内部插槽的语义化样式。 |
| `transition` | string | - | 用于跟踪更新的 CSS 过渡。 |
## 本地开发
From 4f07145b8fd59e14b13790e9de25d15de6104f01 Mon Sep 17 00:00:00 2001
From: afc163
Date: Sun, 28 Jun 2026 02:10:34 +0800
Subject: [PATCH 17/34] chore: include father config in type checks
---
tsconfig.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/tsconfig.json b/tsconfig.json
index dc3b4fa..0a8f3a8 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -21,6 +21,7 @@
"ignoreDeprecations": "5.0"
},
"include": [
+ ".fatherrc.ts",
".dumirc.ts",
"src",
"docs",
From f78c7970d5631e0d01bba1d185144207b6afd3b7 Mon Sep 17 00:00:00 2001
From: afc163
Date: Sun, 28 Jun 2026 12:24:20 +0800
Subject: [PATCH 18/34] ci: update GitHub Actions versions
---
.github/workflows/codeql.yml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 56785ea..adb46ee 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -29,15 +29,15 @@ jobs:
persist-credentials: false
- name: Initialize CodeQL
- uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e
+ uses: github/codeql-action/init@a0853c24544627f65ddf259abe73b1d18a591444
with:
languages: ${{ matrix.language }}
queries: +security-and-quality
- name: Autobuild
- uses: github/codeql-action/autobuild@8aad20d150bbac5944a9f9d289da16a4b0d87c1e
+ uses: github/codeql-action/autobuild@a0853c24544627f65ddf259abe73b1d18a591444
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e
+ uses: github/codeql-action/analyze@a0853c24544627f65ddf259abe73b1d18a591444
with:
category: '/language:${{ matrix.language }}'
From 6a9f75a9dd6289ef156c4cf362d84bddc55f57d1 Mon Sep 17 00:00:00 2001
From: afc163
Date: Sun, 28 Jun 2026 12:29:55 +0800
Subject: [PATCH 19/34] ci: use resolvable CodeQL action ref
---
.github/workflows/codeql.yml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index adb46ee..56785ea 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -29,15 +29,15 @@ jobs:
persist-credentials: false
- name: Initialize CodeQL
- uses: github/codeql-action/init@a0853c24544627f65ddf259abe73b1d18a591444
+ uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e
with:
languages: ${{ matrix.language }}
queries: +security-and-quality
- name: Autobuild
- uses: github/codeql-action/autobuild@a0853c24544627f65ddf259abe73b1d18a591444
+ uses: github/codeql-action/autobuild@8aad20d150bbac5944a9f9d289da16a4b0d87c1e
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@a0853c24544627f65ddf259abe73b1d18a591444
+ uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e
with:
category: '/language:${{ matrix.language }}'
From 4ae7cff8e240904defbe059fa683613ddd6eed82 Mon Sep 17 00:00:00 2001
From: afc163
Date: Sun, 28 Jun 2026 13:27:46 +0800
Subject: [PATCH 20/34] docs: add license file
---
LICENSE | 21 +++++++++++++++++++++
README.md | 2 +-
README.zh-CN.md | 2 +-
3 files changed, 23 insertions(+), 2 deletions(-)
create mode 100644 LICENSE
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..bd0a1f7
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019-present react-component
+
+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:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+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.
diff --git a/README.md b/README.md
index 17ff5b7..5a48f10 100644
--- a/README.md
+++ b/README.md
@@ -110,4 +110,4 @@ The release flow is handled by `@rc-component/np` through the `rc-np` command af
## License
-@rc-component/progress is released under the [MIT](./LICENSE.md) license.
+@rc-component/progress is released under the [MIT](./LICENSE) license.
diff --git a/README.zh-CN.md b/README.zh-CN.md
index 35477c9..f850816 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -110,4 +110,4 @@ npm run prepublishOnly
## 许可证
-@rc-component/progress 基于 [MIT](./LICENSE.md) 许可证发布。
+@rc-component/progress 基于 [MIT](./LICENSE) 许可证发布。
From 6a71b5892445cfe28db0dfb426c93dfb6b84d27f Mon Sep 17 00:00:00 2001
From: afc163
Date: Sun, 28 Jun 2026 14:00:52 +0800
Subject: [PATCH 21/34] ci: use actions checkout v7
---
.github/workflows/codeql.yml | 2 +-
.github/workflows/react-doctor.yml | 2 +-
.github/workflows/surge-preview.yml | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 56785ea..1c7e7bf 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -24,7 +24,7 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
+ uses: actions/checkout@v7
with:
persist-credentials: false
diff --git a/.github/workflows/react-doctor.yml b/.github/workflows/react-doctor.yml
index f68281c..097eb88 100644
--- a/.github/workflows/react-doctor.yml
+++ b/.github/workflows/react-doctor.yml
@@ -20,7 +20,7 @@ jobs:
react-doctor:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
+ - uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: false
diff --git a/.github/workflows/surge-preview.yml b/.github/workflows/surge-preview.yml
index cb6c8c4..ebfecd5 100644
--- a/.github/workflows/surge-preview.yml
+++ b/.github/workflows/surge-preview.yml
@@ -19,7 +19,7 @@ jobs:
env:
PREVIEW: true
steps:
- - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
+ - uses: actions/checkout@v7
with:
persist-credentials: false
- name: Check Surge token
From 89b565df0e5051c7129ec7e33ff2bff622cbf7ac Mon Sep 17 00:00:00 2001
From: afc163
Date: Sun, 28 Jun 2026 14:31:44 +0800
Subject: [PATCH 22/34] chore: standardize package metadata
---
package.json | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/package.json b/package.json
index 95ee013..59d99a7 100644
--- a/package.json
+++ b/package.json
@@ -8,13 +8,13 @@
"react-progress",
"progress"
],
- "homepage": "http://github.com/react-component/progress",
+ "homepage": "https://react-component.github.io/progress",
"repository": {
"type": "git",
- "url": "git@github.com:react-component/progress.git"
+ "url": "https://github.com/react-component/progress.git"
},
"bugs": {
- "url": "http://github.com/react-component/progress/issues"
+ "url": "https://github.com/react-component/progress/issues"
},
"license": "MIT",
"main": "./lib/index",
@@ -70,5 +70,8 @@
"peerDependencies": {
"react": ">=16.9.0",
"react-dom": ">=16.9.0"
+ },
+ "publishConfig": {
+ "access": "public"
}
}
From 5a8048b0358122c43fb22da2d508e6b8e673420d Mon Sep 17 00:00:00 2001
From: afc163
Date: Sun, 28 Jun 2026 14:37:59 +0800
Subject: [PATCH 23/34] ci: standardize dependabot updates
---
.github/dependabot.yml | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 4d3949d..3b730ef 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -3,18 +3,17 @@ updates:
- package-ecosystem: npm
directory: '/'
schedule:
- interval: daily
+ interval: weekly
+ day: monday
time: '21:00'
+ timezone: Asia/Shanghai
+ open-pull-requests-limit: 10
+
+ - package-ecosystem: github-actions
+ directory: '/'
+ schedule:
+ interval: weekly
+ day: monday
+ time: '21:00'
+ timezone: Asia/Shanghai
open-pull-requests-limit: 10
- ignore:
- - dependency-name: '@types/react-dom'
- versions:
- - 17.0.0
- - 17.0.1
- - 17.0.2
- - dependency-name: '@types/react'
- versions:
- - 17.0.0
- - 17.0.1
- - 17.0.2
- - 17.0.3
From aa1a4d8315c37995b4832988997377cccc489e72 Mon Sep 17 00:00:00 2001
From: afc163
Date: Sun, 28 Jun 2026 16:27:28 +0800
Subject: [PATCH 24/34] docs: fix Chinese README API names
---
README.zh-CN.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.zh-CN.md b/README.zh-CN.md
index f850816..9fa55f2 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -71,7 +71,7 @@ npm start
| 名称 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| `className` | string | - | 根节点的附加 className。 |
-| `classNames` | `Partial>` | - | 内部插槽的语义化 className。 |
+| `classNames` | Partial> | - | 内部插槽的语义化 className。 |
| `gapDegree` | number | - | 循环进度的差距度。 |
| `gapPosition` | `'top'` \| `'right'` \| `'bottom'` \| `'left'` | `'bottom'` | 循环进度的间隙位置。 |
| `id` | string | - | 根元素 ID。 |
@@ -86,7 +86,7 @@ npm start
| `strokeLinecap` | `'round'` \| `'butt'` \| `'square'` | `'round'` | 描边端点样式。 |
| `strokeWidth` | number | 1 | 轨道描边宽度。 |
| `style` | React.CSSProperties | - | 根样式。 |
-| `styles` | `Partial>` | - | 内部插槽的语义化样式。 |
+| `styles` | Partial> | - | 内部插槽的语义化样式。 |
| `transition` | string | - | 用于跟踪更新的 CSS 过渡。 |
## 本地开发
From fc23f58a948ddb2ead4c9629de8d549d9c2884ed Mon Sep 17 00:00:00 2001
From: afc163
Date: Sun, 28 Jun 2026 17:15:35 +0800
Subject: [PATCH 25/34] chore: refine preview workflow ignores
---
.github/workflows/surge-preview.yml | 3 +++
.prettierignore | 14 ++++++++++++++
2 files changed, 17 insertions(+)
create mode 100644 .prettierignore
diff --git a/.github/workflows/surge-preview.yml b/.github/workflows/surge-preview.yml
index ebfecd5..eaff160 100644
--- a/.github/workflows/surge-preview.yml
+++ b/.github/workflows/surge-preview.yml
@@ -16,6 +16,9 @@ permissions:
jobs:
preview:
runs-on: ubuntu-latest
+ concurrency:
+ group: surge-preview-${{ github.event.pull_request.number }}
+ cancel-in-progress: true
env:
PREVIEW: true
steps:
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 0000000..c466d87
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,14 @@
+node_modules
+coverage
+docs-dist
+dist
+es
+lib
+.dumi/tmp
+.dumi/tmp-production
+.vercel
+package-lock.json
+pnpm-lock.yaml
+yarn.lock
+bun.lockb
+*.log
From 5db958bf3e300888fbbfb2187e4ed8a8b85f303d Mon Sep 17 00:00:00 2001
From: afc163
Date: Sun, 28 Jun 2026 19:38:57 +0800
Subject: [PATCH 26/34] docs: document dumi dev server port
---
README.md | 2 ++
README.zh-CN.md | 2 ++
2 files changed, 4 insertions(+)
diff --git a/README.md b/README.md
index 5a48f10..6f80d6c 100644
--- a/README.md
+++ b/README.md
@@ -100,6 +100,8 @@ npm run compile
npm run build
```
+The dumi site runs at `http://localhost:8000` by default.
+
## Release
```bash
diff --git a/README.zh-CN.md b/README.zh-CN.md
index 9fa55f2..2e6d71e 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -100,6 +100,8 @@ npm run compile
npm run build
```
+dumi 站点默认运行在 `http://localhost:8000`。
+
## 发布
```bash
From d574c191db947fc1eccf3dfd6f895c3c0ddcb777 Mon Sep 17 00:00:00 2001
From: afc163
Date: Sun, 28 Jun 2026 19:58:14 +0800
Subject: [PATCH 27/34] chore: standardize husky configuration
---
.husky/pre-commit | 1 +
package.json | 9 +++++++--
2 files changed, 8 insertions(+), 2 deletions(-)
create mode 100755 .husky/pre-commit
diff --git a/.husky/pre-commit b/.husky/pre-commit
new file mode 100755
index 0000000..2312dc5
--- /dev/null
+++ b/.husky/pre-commit
@@ -0,0 +1 @@
+npx lint-staged
diff --git a/package.json b/package.json
index 59d99a7..e0a7036 100644
--- a/package.json
+++ b/package.json
@@ -30,7 +30,7 @@
"docs:deploy": "gh-pages -d docs-dist",
"deploy": "npm run gh-pages",
"compile": "father build",
- "prepare": "dumi setup",
+ "prepare": "husky && dumi setup",
"gh-pages": "cross-env GH_PAGES=1 npm run docs:build && npm run docs:deploy",
"prepublishOnly": "npm run compile && rc-np",
"lint": "eslint src/ --ext .ts,.tsx,.jsx,.js",
@@ -65,7 +65,9 @@
"rc-test": "^7.1.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
- "typescript": "^5.9.3"
+ "typescript": "^5.9.3",
+ "husky": "^9.1.7",
+ "lint-staged": "^16.4.0"
},
"peerDependencies": {
"react": ">=16.9.0",
@@ -73,5 +75,8 @@
},
"publishConfig": {
"access": "public"
+ },
+ "lint-staged": {
+ "*": "prettier --write --ignore-unknown"
}
}
From 089320424186093017191fc19e123f8d105b4f02 Mon Sep 17 00:00:00 2001
From: afc163
Date: Sun, 28 Jun 2026 20:32:45 +0800
Subject: [PATCH 28/34] chore: standardize package type entry
---
package.json | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package.json b/package.json
index e0a7036..7fb8689 100644
--- a/package.json
+++ b/package.json
@@ -78,5 +78,6 @@
},
"lint-staged": {
"*": "prettier --write --ignore-unknown"
- }
+ },
+ "types": "./es/index.d.ts"
}
From 86b8783c153c647904a37f119a9ab6fbcccffd46 Mon Sep 17 00:00:00 2001
From: afc163
Date: Sun, 28 Jun 2026 21:00:57 +0800
Subject: [PATCH 29/34] docs: normalize readme badges
---
README.md | 12 ++++++------
README.zh-CN.md | 12 ++++++------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/README.md b/README.md
index 6f80d6c..b846f83 100644
--- a/README.md
+++ b/README.md
@@ -4,12 +4,12 @@
📊 Lightweight React line and circle progress indicators with SVG rendering.
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/README.zh-CN.md b/README.zh-CN.md
index 2e6d71e..f8fbfef 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -4,12 +4,12 @@
📊 React 进度条组件,支持线型、圆形和自定义进度展示。
-
-
-
-
-
-
+
+
+
+
+
+
From 6d2bba92e661b8ffc6479ea800710616c05f4b36 Mon Sep 17 00:00:00 2001
From: afc163
Date: Sun, 28 Jun 2026 21:20:38 +0800
Subject: [PATCH 30/34] ci: limit reusable workflow secrets
---
.github/workflows/react-component-ci.yml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/react-component-ci.yml b/.github/workflows/react-component-ci.yml
index 677f8ab..c20cb88 100644
--- a/.github/workflows/react-component-ci.yml
+++ b/.github/workflows/react-component-ci.yml
@@ -6,4 +6,6 @@ permissions:
jobs:
test:
uses: react-component/rc-test/.github/workflows/test-utoo.yml@main
- secrets: inherit
+ secrets:
+
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
From 8bd90238e472d678548c4b2dbebae87930911b19 Mon Sep 17 00:00:00 2001
From: afc163
Date: Sun, 28 Jun 2026 21:29:41 +0800
Subject: [PATCH 31/34] ci: restore reusable workflow compatibility
---
.github/workflows/react-component-ci.yml | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/.github/workflows/react-component-ci.yml b/.github/workflows/react-component-ci.yml
index c20cb88..677f8ab 100644
--- a/.github/workflows/react-component-ci.yml
+++ b/.github/workflows/react-component-ci.yml
@@ -6,6 +6,4 @@ permissions:
jobs:
test:
uses: react-component/rc-test/.github/workflows/test-utoo.yml@main
- secrets:
-
- CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
+ secrets: inherit
From d145a98ec5576dde7448d404471b465357c2245b Mon Sep 17 00:00:00 2001
From: afc163
Date: Sun, 28 Jun 2026 21:52:44 +0800
Subject: [PATCH 32/34] docs: polish zh-CN readme wording
---
README.zh-CN.md | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/README.zh-CN.md b/README.zh-CN.md
index f8fbfef..e7ee689 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -15,7 +15,6 @@
English | 简体中文
-
## 特性
- `Line` 和 `Circle` 使用 SVG 渲染的进度组件。
@@ -72,7 +71,7 @@ npm start
| --- | --- | --- | --- |
| `className` | string | - | 根节点的附加 className。 |
| `classNames` | Partial> | - | 内部插槽的语义化 className。 |
-| `gapDegree` | number | - | 循环进度的差距度。 |
+| `gapDegree` | number | - | 环形进度缺口角度。 |
| `gapPosition` | `'top'` \| `'right'` \| `'bottom'` \| `'left'` | `'bottom'` | 循环进度的间隙位置。 |
| `id` | string | - | 根元素 ID。 |
| `loading` | boolean | false | 渲染不确定的加载动画。 |
From 39c748cdced14915ffb18be76ae4ac0a7f56f302 Mon Sep 17 00:00:00 2001
From: afc163
Date: Mon, 29 Jun 2026 01:00:10 +0800
Subject: [PATCH 33/34] ci: narrow surge preview permissions
---
.github/workflows/surge-preview.yml | 1 -
1 file changed, 1 deletion(-)
diff --git a/.github/workflows/surge-preview.yml b/.github/workflows/surge-preview.yml
index eaff160..4c2f17e 100644
--- a/.github/workflows/surge-preview.yml
+++ b/.github/workflows/surge-preview.yml
@@ -11,7 +11,6 @@ permissions:
contents: read
pull-requests: write
checks: write
- statuses: write
jobs:
preview:
From 0431c52c4128c8ac6593322f2145028753c1db8b Mon Sep 17 00:00:00 2001
From: afc163
Date: Mon, 29 Jun 2026 14:26:01 +0800
Subject: [PATCH 34/34] chore: limit reusable workflow secrets
---
.github/workflows/react-component-ci.yml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/react-component-ci.yml b/.github/workflows/react-component-ci.yml
index 677f8ab..e2b301b 100644
--- a/.github/workflows/react-component-ci.yml
+++ b/.github/workflows/react-component-ci.yml
@@ -6,4 +6,5 @@ permissions:
jobs:
test:
uses: react-component/rc-test/.github/workflows/test-utoo.yml@main
- secrets: inherit
+ secrets:
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
\ No newline at end of file