diff --git a/.dumirc.ts b/.dumirc.ts
index ded1b39..2bfd9e4 100644
--- a/.dumirc.ts
+++ b/.dumirc.ts
@@ -1,10 +1,14 @@
import { defineConfig } from 'dumi';
import path from 'path';
+const basePath = process.env.GH_PAGES ? '/steps/' : '/';
+const publicPath = basePath;
+
export default defineConfig({
alias: {
'@rc-component/steps$': path.resolve('src'),
'@rc-component/steps/es': path.resolve('src'),
+ '@rc-component/steps/assets': path.resolve('assets'),
},
mfsu: false,
favicons: ['https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'],
@@ -12,4 +16,7 @@ export default defineConfig({
name: 'Steps',
logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
},
-});
\ No newline at end of file
+ outputPath: 'docs-dist',
+ base: basePath,
+ publicPath,
+});
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 0000000..758659a
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1,2 @@
+github: ant-design
+open_collective: ant-design
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index add01c3..3b730ef 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -1,23 +1,19 @@
version: 2
updates:
-- package-ecosystem: npm
- directory: "/"
- schedule:
- interval: daily
- time: "21:00"
- 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
- - dependency-name: less
- versions:
- - 4.1.0
+ - package-ecosystem: npm
+ directory: '/'
+ schedule:
+ 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
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
deleted file mode 100644
index 5735e2d..0000000
--- a/.github/workflows/main.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-name: ✅ test
-on: [push, pull_request]
-jobs:
- test:
- uses: react-component/rc-test/.github/workflows/test.yml@main
- secrets: inherit
\ No newline at end of file
diff --git a/.github/workflows/react-component-ci.yml b/.github/workflows/react-component-ci.yml
new file mode 100644
index 0000000..1ed6420
--- /dev/null
+++ b/.github/workflows/react-component-ci.yml
@@ -0,0 +1,12 @@
+name: ✅ test
+on:
+ push:
+ branches: [master]
+ pull_request:
+ branches: [master]
+permissions:
+ contents: read
+jobs:
+ test:
+ uses: react-component/rc-test/.github/workflows/test-utoo.yml@main
+ secrets: inherit
diff --git a/.github/workflows/react-doctor.yml b/.github/workflows/react-doctor.yml
new file mode 100644
index 0000000..097eb88
--- /dev/null
+++ b/.github/workflows/react-doctor.yml
@@ -0,0 +1,27 @@
+name: React Doctor
+
+on:
+ pull_request:
+ types: [opened, synchronize, reopened, ready_for_review]
+ push:
+ branches: [master]
+
+permissions:
+ contents: read
+ pull-requests: write
+ issues: write
+ statuses: write
+
+concurrency:
+ group: react-doctor-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ react-doctor:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v7
+ with:
+ fetch-depth: 0
+ persist-credentials: false
+ - uses: millionco/react-doctor@0b4f4f4bd248a154e64eb508a48347f71154b3f3
diff --git a/.github/workflows/surge-preview.yml b/.github/workflows/surge-preview.yml
new file mode 100644
index 0000000..eaff160
--- /dev/null
+++ b/.github/workflows/surge-preview.yml
@@ -0,0 +1,55 @@
+name: Surge Preview
+
+on:
+ pull_request:
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
+ cancel-in-progress: true
+
+permissions:
+ contents: read
+ pull-requests: write
+ checks: write
+ statuses: write
+
+jobs:
+ preview:
+ runs-on: ubuntu-latest
+ concurrency:
+ group: surge-preview-${{ github.event.pull_request.number }}
+ cancel-in-progress: true
+ env:
+ PREVIEW: true
+ steps:
+ - uses: actions/checkout@v7
+ 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: ${{ steps.surge-token.outputs.enabled == 'true' }}
+ run: |
+ npm install
+ npm run build
+ - uses: afc163/surge-preview@bf90a5a86111f6311ca42f0a5a0f80fb0fb03cec
+ if: ${{ steps.surge-token.outputs.enabled == 'true' }}
+ env:
+ SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
+ with:
+ surge_token: ${{ env.SURGE_TOKEN }}
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ dist: docs-dist
+ failOnError: false
+ setCommitStatus: false
+ - name: Skip Surge preview
+ if: ${{ steps.surge-token.outputs.enabled != 'true' }}
+ run: echo "SURGE_TOKEN is not configured; skip Surge preview."
diff --git a/.gitignore b/.gitignore
index 7595468..dc304ef 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
-.iml
+*.iml
*.log
+*.log.*
.idea/
.ipr
.iws
@@ -25,18 +26,24 @@ assets/**/*.css
build
lib
es
-coverage
+/coverage
+yarn.lock
package-lock.json
pnpm-lock.yaml
-yarn.lock
.doc
+docs-dist
+.vercel
+.storybook
+
+# umi
.umi
-.npmrc
+.umi-production
+.umi-test
+.env.local
+.dumi/
-# dumi
+bun.lockb
+bun.lock
+coverage
.dumi/tmp
-.dumi/tmp-test
.dumi/tmp-production
-.env.local
-
-bun.lockb
\ No newline at end of file
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/.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
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 db0a3b2..4459ebf 100644
--- a/README.md
+++ b/README.md
@@ -1,191 +1,127 @@
-# @rc-component/steps
+
+
@rc-component/steps
+
Part of the Ant Design ecosystem.
+
🚶 Structured React steps for progress, navigation, and multi-step workflows.
----
+
+
+
+
+
+
+
+
+
-React steps component.
+English | 简体中文
-[![NPM version][npm-image]][npm-url]
-[![build status][travis-image]][travis-url]
-[![Test coverage][codecov-image]][codecov-url]
-[![npm download][download-image]][download-url]
-[![bundle size][bundlephobia-image]][bundlephobia-url]
-[npm-image]: http://img.shields.io/npm/v/@rc-component/steps.svg?style=flat-square
-[npm-url]: http://npmjs.org/package/@rc-component/steps
-[travis-image]: https://img.shields.io/travis/react-component/steps.svg?style=flat-square
-[travis-url]: https://travis-ci.org/react-component/steps
-[codecov-image]: https://img.shields.io/codecov/c/github/react-component/steps/master.svg?style=flat-square
-[codecov-url]: https://codecov.io/gh/react-component/steps/branch/master
-[download-image]: https://img.shields.io/npm/dm/@rc-component/steps.svg?style=flat-square
-[download-url]: https://npmjs.org/package/@rc-component/steps
-[bundlephobia-url]: https://bundlephobia.com/result?p=@rc-component/steps
-[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/@rc-component/steps
+## Highlights
-## Usage
+- Renders progress and navigation steps from a simple `items` array.
+- Supports horizontal and vertical layouts, inline mode, custom icons, and status control.
+- Provides semantic `classNames` and `styles` slots for stable theming.
+- Keeps keyboard-accessible step changes when `onChange` is provided.
+
+## Install
```bash
npm install @rc-component/steps
```
-
+## Usage
-```jsx | pure
-
-
-
-
-
+```tsx pure
+import Steps from '@rc-component/steps';
+import '@rc-component/steps/assets/index.css';
+
+export default () => (
+
+);
```
-## Example
+Online preview: https://steps.react-component.vercel.app/
+
+## Examples
+
+Run the local dumi site:
+
+```bash
+npm install
+npm start
+```
-https://steps.vercel.app/
+Then open `http://localhost:8000`.
## API
-
-
-
- | name |
- type |
- default |
- description |
-
-
-
-
- | type |
- string |
- default |
- diretypetion of Steps, could be `default` `navigation` `inline` |
-
-
- | direction |
- string |
- horizontal |
- direction of Steps, enum: `horizontal` or `vertical` |
-
-
- | current |
- number |
- 0 |
- index of current step |
-
-
- | initial |
- number |
- 0 |
- index initial |
-
-
- | size |
- string |
- |
- size of Steps, could be `small` |
-
-
- | titlePlacement |
- string |
- |
- placement of step title, could be `vertical` |
-
-
- | status |
- string |
- wait |
- status of current Steps, could be `error` `process` `finish` `wait` |
-
-
- | icons |
- { finish: ReactNode, error: ReactNode } |
- |
- specify the default finish icon and error icon |
-
-
- | itemRender |
- (item: StepProps, stepItem: React.ReactNode) => React.ReactNode |
- |
- custom step item renderer |
-
-
- | onChange |
- (current: number) => void |
- |
- Trigger when Step changed |
-
-
-
-
-### Steps.Step
-
-
-
-
- | name |
- type |
- default |
- description |
-
-
-
-
- | title |
- ReactNode |
- |
- title of step item |
-
-
- | subTitle |
- ReactNode |
- |
- subTitle of step item |
-
-
- | description |
- ReactNode |
- |
- description of step item |
-
-
- | icon |
- ReactNode |
- |
- set icon of step item |
-
-
- | status |
- string |
- |
- status of current Steps, could be `error` `process` `finish` `wait` |
-
-
- | tailContent |
- ReactNode |
- |
- content above tail |
-
-
- | disabled |
- bool |
- false |
- disabled step when onChange exist |
-
-
- | render |
- (stepItem: React.ReactNode) => React.ReactNode |
- |
- custom step item renderer |
-
-
-
+### Steps
+
+| Name | Type | Default | Description |
+| --- | --- | --- | --- |
+| `className` | string | - | Additional class name. |
+| `classNames` | `Partial>` | - | Semantic class names for internal slots. |
+| `components` | `{ root?: ComponentType; item?: ComponentType }` | - | Override root and item elements. |
+| `current` | number | 0 | Current step index. |
+| `iconRender` | `(originNode, info) => ReactNode` | - | Custom step icon renderer. |
+| `initial` | number | 0 | Initial step index offset. |
+| `itemRender` | `(originNode, info) => ReactNode` | - | Custom step item renderer. |
+| `itemWrapperRender` | `(originNode) => ReactNode` | - | Custom step item wrapper renderer. |
+| `items` | StepItem[] | [] | Step data. |
+| `onChange` | `(current: number) => void` | - | Triggered when a clickable step changes. |
+| `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | Layout orientation. |
+| `prefixCls` | string | `'rc-steps'` | Prefix class name. |
+| `rootClassName` | string | - | Root class name. |
+| `status` | `'error' \| 'process' \| 'finish' \| 'wait'` | `'process'` | Current step status. |
+| `style` | React.CSSProperties | - | Root style. |
+| `styles` | `Partial>` | - | Semantic styles for internal slots. |
+| `titlePlacement` | `'horizontal' \| 'vertical'` | `'horizontal'` | Title placement for horizontal steps. |
+
+### StepItem
+
+| Name | Type | Default | Description |
+| --- | --- | --- | --- |
+| `className` | string | - | Item class name. |
+| `classNames` | `Partial>` | - | Semantic class names for this item. |
+| `content` | React.ReactNode | - | Step content. |
+| `description` | React.ReactNode | - | Deprecated. Use `content` instead. |
+| `disabled` | boolean | false | Disable step click behavior. |
+| `icon` | React.ReactNode | - | Custom step icon. |
+| `onClick` | React.MouseEventHandler | - | Item click handler. |
+| `status` | Status | - | Item status. |
+| `style` | React.CSSProperties | - | Item style. |
+| `styles` | `Partial>` | - | Semantic styles for this item. |
+| `subTitle` | React.ReactNode | - | Subtitle. |
+| `title` | React.ReactNode | - | Title. |
## Development
```bash
npm install
npm start
+npm test
+npm run tsc
+npm run compile
+npm run build
+```
+
+The dumi site runs at `http://localhost:8000` by default.
+
+## Release
+
+```bash
+npm run prepublishOnly
```
+The release flow is handled by `@rc-component/np` through the `rc-np` command after the package build.
+
## License
-@rc-component/steps is released under the MIT license.
+@rc-component/steps is released under the [MIT](./LICENSE) license.
diff --git a/README.zh-CN.md b/README.zh-CN.md
new file mode 100644
index 0000000..870451c
--- /dev/null
+++ b/README.zh-CN.md
@@ -0,0 +1,127 @@
+
+
@rc-component/steps
+
Ant Design 生态的一部分。
+
🚶 React 步骤条组件,支持状态、图标、进度和多种布局。
+
+
+
+
+
+
+
+
+
+
+
+English | 简体中文
+
+
+## 特性
+
+- 从简单的 `items` 数组渲染进度和导航步骤。
+- 支持水平和垂直布局、内联模式、自定义图标和状态控制。
+- 提供语义 `classNames` 和 `styles` 插槽以实现稳定的主题。
+- 当提供 `onChange` 时,保留键盘可访问的步骤更改。
+
+## 安装
+
+```bash
+npm install @rc-component/steps
+```
+
+## 使用
+
+```tsx pure
+import Steps from '@rc-component/steps';
+import '@rc-component/steps/assets/index.css';
+
+export default () => (
+
+);
+```
+
+在线预览:https://steps.react-component.vercel.app/
+
+## 示例
+
+运行本地 dumi 站点:
+
+```bash
+npm install
+npm start
+```
+
+然后打开 `http://localhost:8000`。
+
+## API
+
+### Steps
+
+| 名称 | 类型 | 默认值 | 说明 |
+| --- | --- | --- | --- |
+| `className` | string | - | 附加 className。 |
+| `classNames` | `Partial>` | - | 内部插槽的语义化 className。 |
+| `components` | `{ root?: ComponentType; item?: ComponentType }` | - | 覆盖根元素和项目元素。 |
+| `current` | number | 0 | 当前步骤索引。 |
+| `iconRender` | `(originNode, info) => ReactNode` | - | 自定义步骤图标渲染器。 |
+| `initial` | number | 0 | 初始步索引偏移。 |
+| `itemRender` | `(originNode, info) => ReactNode` | - | 自定义步骤项渲染器。 |
+| `itemWrapperRender` | `(originNode) => ReactNode` | - | 自定义步骤项包装渲染器。 |
+| `items` | StepItem[] | [] | 步骤数据。 |
+| `onChange` | `(current: number) => void` | - | 当可单击步骤发生更改时触发。 |
+| `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | 布局方向。 |
+| `prefixCls` | string | `'rc-steps'` | className 前缀。 |
+| `rootClassName` | string | - | 根 className。 |
+| `status` | `'error' \| 'process' \| 'finish' \| 'wait'` | `'process'` | 当前步骤状态。 |
+| `style` | React.CSSProperties | - | 根样式。 |
+| `styles` | `Partial>` | - | 内部插槽的语义化样式。 |
+| `titlePlacement` | `'horizontal' \| 'vertical'` | `'horizontal'` | 水平步骤的标题位置。 |
+
+### StepItem
+
+| 名称 | 类型 | 默认值 | 说明 |
+| --- | --- | --- | --- |
+| `className` | string | - | 项目类别名称。 |
+| `classNames` | `Partial>` | - | 该条目的语义 className。 |
+| `content` | React.ReactNode | - | 步骤内容。 |
+| `description` | React.ReactNode | - | 已弃用。请改用 `content`。 |
+| `disabled` | boolean | false | 禁用步骤单击行为。 |
+| `icon` | React.ReactNode | - | 自定义步骤图标。 |
+| `onClick` | React.MouseEventHandler | - | 项目单击处理程序。 |
+| `status` | Status | - | 条目状态。 |
+| `style` | React.CSSProperties | - | 项目样式。 |
+| `styles` | `Partial>` | - | 该项目的语义样式。 |
+| `subTitle` | React.ReactNode | - | Subtitle. |
+| `title` | React.ReactNode | - | Title. |
+
+## 本地开发
+
+```bash
+npm install
+npm start
+npm test
+npm run tsc
+npm run compile
+npm run build
+```
+
+dumi 站点默认运行在 `http://localhost:8000`。
+
+## 发布
+
+```bash
+npm run prepublishOnly
+```
+
+包构建完成后,发布流程由 `@rc-component/np` 通过 `rc-np` 命令处理。
+
+## 许可证
+
+@rc-component/steps 基于 [MIT](./LICENSE) 许可证发布。
diff --git a/docs/index.md b/docs/index.md
index 8160c50..87842ca 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,6 +1,6 @@
---
hero:
- title: "@rc-component/steps"
+ title: '@rc-component/steps'
description: React Steps Component
---
diff --git a/package.json b/package.json
index 35efc28..f2d25b2 100644
--- a/package.json
+++ b/package.json
@@ -1,19 +1,19 @@
{
"name": "@rc-component/steps",
"version": "1.2.2",
- "description": "steps ui component for react",
+ "description": "Step workflow component for React",
"keywords": [
"react",
"react-component",
"react-steps"
],
- "homepage": "https://github.com/react-component/steps",
+ "homepage": "https://react-component.github.io/steps",
"bugs": {
- "url": "https://github.com/react-component/steps/issues"
+ "url": "https://github.com/react-component/steps/issues"
},
"repository": {
"type": "git",
- "url": " git+ssh://git@github.com/react-component/steps.git"
+ "url": "https://github.com/react-component/steps.git"
},
"license": "MIT",
"maintainers": [
@@ -24,31 +24,26 @@
],
"main": "./lib/index",
"module": "./es/index",
- "types": "./lib/index.d.ts",
+ "types": "./es/index.d.ts",
"files": [
"assets/*.css",
- "es",
- "lib"
+ "lib",
+ "es"
],
"scripts": {
+ "build": "npm run compile && npm run docs:build",
"compile": "father build && lessc assets/index.less assets/index.css",
"coverage": "rc-test --coverage",
"docs:build": "dumi build",
- "docs:deploy": "gh-pages -d .doc",
- "gh-pages": "npm run docs:build && npm run docs:deploy",
+ "docs:deploy": "gh-pages -d docs-dist",
+ "gh-pages": "npm run compile && cross-env GH_PAGES=1 npm run docs:build && npm run docs:deploy",
"lint": "eslint src/ --ext .ts,.tsx,.jsx,.js,.md",
- "prepare": "husky install && dumi setup",
"prepublishOnly": "npm run compile && rc-np",
- "prettier": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
- "postpublish": "npm run gh-pages",
+ "prettier": "prettier --write --ignore-unknown .",
"start": "dumi dev",
"test": "rc-test",
- "now-build": "npm run docs:build"
- },
- "lint-staged": {
- "**/*.{js,jsx,tsx,ts,md,json}": [
- "prettier --write"
- ]
+ "tsc": "tsc --noEmit",
+ "prepare": "husky"
},
"dependencies": {
"@rc-component/util": "^1.11.1",
@@ -56,29 +51,30 @@
},
"devDependencies": {
"@rc-component/father-plugin": "^2.2.0",
- "@rc-component/np": "^1.0.0",
- "@testing-library/jest-dom": "^6.4.5",
- "@testing-library/react": "^15.0.6",
- "@types/jest": "^29.4.0",
- "@types/node": "^24.5.2",
- "@types/react": "^18.0.28",
- "@types/react-dom": "^18.0.11",
+ "@rc-component/np": "^1.0.4",
+ "@testing-library/jest-dom": "^6.9.1",
+ "@testing-library/react": "^15.0.7",
+ "@types/jest": "^29.5.14",
+ "@types/node": "^26.0.1",
+ "@types/react": "^18.3.31",
+ "@types/react-dom": "^18.3.7",
"@umijs/fabric": "^4.0.1",
- "dumi": "^2.0.0",
- "eslint": "^8.55.0",
- "eslint-plugin-jest": "^27.6.0",
- "eslint-plugin-unicorn": "^50.0.1",
- "father": "^4",
- "gh-pages": "^6.1.0",
- "glob": "^10.0.0",
- "husky": "^8.0.1",
- "less": "^4.1.3",
- "lint-staged": "^15.2.0",
- "prettier": "^3.1.0",
- "rc-test": "^7.0.9",
- "react": "^18.0.0",
- "react-dom": "^18.0.0",
- "typescript": "^5.0.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",
+ "husky": "^9.1.7",
+ "less": "^4.6.7",
+ "lint-staged": "^16.4.0",
+ "prettier": "^3.9.0",
+ "rc-test": "^7.1.3",
+ "react": "^18.3.1",
+ "react-dom": "^18.3.1",
+ "typescript": "^5.9.3",
+ "cross-env": "^10.1.0"
},
"peerDependencies": {
"react": ">=16.9.0",
@@ -86,5 +82,12 @@
},
"engines": {
"node": ">=8.x"
+ },
+ "style": "./assets/index.css",
+ "publishConfig": {
+ "access": "public"
+ },
+ "lint-staged": {
+ "*": "prettier --write --ignore-unknown"
}
}
diff --git a/tsconfig.json b/tsconfig.json
index 4f49d93..59cde01 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -3,14 +3,46 @@
"target": "esnext",
"moduleResolution": "node",
"baseUrl": "./",
+ "lib": [
+ "dom",
+ "es2017"
+ ],
"jsx": "preserve",
"declaration": true,
"skipLibCheck": true,
"esModuleInterop": true,
"paths": {
- "@/*": ["src/*"],
- "@@/*": ["dumi/tmp/*"],
- "@rc-component/steps": ["src/index.ts"]
- }
- }
-}
\ No newline at end of file
+ "@/*": [
+ "src/*"
+ ],
+ "@@/*": [
+ ".dumi/tmp/*"
+ ],
+ "@rc-component/steps": [
+ "src/index.ts"
+ ],
+ "@rc-component/steps/es": [
+ "src"
+ ],
+ "@rc-component/steps/es/*": [
+ "src/*"
+ ],
+ "@rc-component/steps/assets/*": [
+ "assets/*"
+ ]
+ },
+ "ignoreDeprecations": "5.0"
+ },
+ "include": [
+ ".fatherrc.ts",
+ ".dumirc.ts",
+ "src",
+ "tests",
+ "docs/examples"
+ ],
+ "exclude": [
+ "docs-dist",
+ "lib",
+ "es"
+ ]
+}
diff --git a/vercel.json b/vercel.json
new file mode 100644
index 0000000..5f9139e
--- /dev/null
+++ b/vercel.json
@@ -0,0 +1,6 @@
+{
+ "framework": "umijs",
+ "installCommand": "npm install",
+ "buildCommand": "npm run build",
+ "outputDirectory": "docs-dist"
+}