{"name":"@rc-component/steps","version":"0.0.0-alpha.5","keywords":["react","react-component","react-steps"],"license":"MIT","_id":"@rc-component/steps@0.0.0-alpha.5","maintainers":[{"name":"zombiej","email":"smith3816@gmail.com"},{"name":"afc163","email":"afc163@gmail.com"},{"name":"madccc","email":"1075746765@qq.com"},{"name":"peachscript","email":"scdzwyxst@gmail.com"}],"homepage":"http://github.com/react-component/steps","bugs":{"url":"http://github.com/react-component/steps/issues"},"dist":{"shasum":"e1163b7662e2b129a2532d813d1acf5a35ae7f33","tarball":"http://registry-npm.ywwl.com/@rc-component/steps/download/@rc-component/steps-0.0.0-alpha.5.tgz","fileCount":89,"integrity":"sha512-tWitmsnw+wGvSZGpUqGqG83DcuIm308BjYbwm1zuK6O2UswR2QTJgvlo+k/FjIugEIcACkErGXaWVoiLSwFLXg==","signatures":[{"sig":"MEYCIQCd6Fgpatb4FmU2gcSxwwWR6uY1hwg3S/OtjOg559d9TgIhAN5BrPacY4HLI2/KcSQ0FLcQFiCg+QHwZCPKJMOjGVlC","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1690047,"size":497254,"noattachment":false,"key":"/@rc-component/steps/-/@rc-component/steps-0.0.0-alpha.5.tgz"},"main":"./lib/index","types":"./lib/index.d.ts","module":"./es/index","engines":{"node":">=8.x"},"gitHead":"34398921ad98e333e9b9f6dce0b389258a4d564c","scripts":{"lint":"eslint src/ --ext .ts,.tsx,.jsx,.js,.md","test":"rc-test","start":"dumi dev","compile":"father build && lessc assets/index.less assets/index.css","prepare":"husky install && dumi setup","coverage":"rc-test --coverage","gh-pages":"npm run docs:build && npm run docs:deploy","prettier":"prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"","now-build":"npm run docs:build","docs:build":"dumi build","docs:deploy":"gh-pages -d .doc","postpublish":"npm run gh-pages","prepublishOnly":"npm run compile && rc-np"},"_npmUser":{"name":"zombiej","email":"smith3816@gmail.com"},"repository":{"url":" git+ssh://git@github.com/react-component/steps.git","type":"git"},"_npmVersion":"10.8.2","description":"steps ui component for react","directories":{},"lint-staged":{"**/*.{js,jsx,tsx,ts,md,json}":["prettier --write"]},"_nodeVersion":"22.5.1","dependencies":{"classnames":"^2.2.3","@rc-component/util":"^1.2.1"},"_hasShrinkwrap":false,"devDependencies":{"dumi":"^2.0.0","glob":"^10.0.0","less":"^4.1.3","husky":"^8.0.1","react":"^18.0.0","eslint":"^8.55.0","father":"^4","rc-test":"^7.0.9","gh-pages":"^6.1.0","prettier":"^3.1.0","cross-env":"^7.0.0","rc-dialog":"8.x","react-dom":"^18.0.0","typescript":"^5.0.0","@types/jest":"^29.4.0","lint-staged":"^15.2.0","querystring":"^0.2.0","@types/react":"^18.0.28","@umijs/fabric":"^4.0.1","@rc-component/np":"^1.0.0","@types/react-dom":"^18.0.11","@types/classnames":"^2.2.9","eslint-plugin-jest":"^27.6.0","eslint-plugin-unicorn":"^50.0.1","@testing-library/react":"^15.0.6","@testing-library/jest-dom":"^6.4.5","@rc-component/father-plugin":"^2.0.2"},"peerDependencies":{"react":">=16.9.0","react-dom":">=16.9.0"},"_npmOperationalInternal":{"tmp":"tmp/steps_0.0.0-alpha.5_1746781953198_0.732109078125202","host":"s3://npm-registry-packages-npm-production"},"readme":"<div align=\"center\">\n  <h1>@rc-component/steps</h1>\n  <p><sub><a href=\"https://ant.design\"><img alt=\"Ant Design\" height=\"14\" src=\"https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg\" style=\"vertical-align: -0.125em;\" /></a> Ant Design 生态的一部分。</sub></p>\n  <p>🚶 React 步骤条组件，支持状态、图标、进度和多种布局。</p>\n\n  <p>\n    <a href=\"https://npmjs.org/package/@rc-component/steps\"><img alt=\"NPM version\" src=\"https://img.shields.io/npm/v/@rc-component/steps.svg?style=flat-square\"></a>\n    <a href=\"https://npmjs.org/package/@rc-component/steps\"><img alt=\"npm downloads\" src=\"https://img.shields.io/npm/dm/@rc-component/steps.svg?style=flat-square\"></a>\n    <a href=\"https://github.com/react-component/steps/actions/workflows/react-component-ci.yml\"><img alt=\"build status\" src=\"https://github.com/react-component/steps/actions/workflows/react-component-ci.yml/badge.svg\"></a>\n    <a href=\"https://app.codecov.io/gh/react-component/steps\"><img alt=\"Codecov\" src=\"https://img.shields.io/codecov/c/github/react-component/steps/master.svg?style=flat-square\"></a>\n    <a href=\"https://bundlephobia.com/package/@rc-component/steps\"><img alt=\"bundle size\" src=\"https://img.shields.io/bundlephobia/minzip/@rc-component/steps?style=flat-square\"></a>\n    <a href=\"https://github.com/umijs/dumi\"><img alt=\"dumi\" src=\"https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square\"></a>\n  </p>\n</div>\n\n<p align=\"center\"><a href=\"./README.md\">English</a> | 简体中文</p>\n\n\n## 特性\n\n- 从简单的 `items` 数组渲染进度和导航步骤。\n- 支持水平和垂直布局、内联模式、自定义图标和状态控制。\n- 提供语义 `classNames` 和 `styles` 插槽以实现稳定的主题。\n- 当提供 `onChange` 时，保留键盘可访问的步骤更改。\n\n## 安装\n\n```bash\nnpm install @rc-component/steps\n```\n\n## 使用\n\n```tsx pure\nimport Steps from '@rc-component/steps';\nimport '@rc-component/steps/assets/index.css';\n\nexport default () => (\n  <Steps\n    current={1}\n    items={[\n      { title: 'Create', content: 'Create an account' },\n      { title: 'Verify', content: 'Verify email' },\n      { title: 'Done', content: 'Start using the app' },\n    ]}\n  />\n);\n```\n\n在线预览：https://steps.react-component.vercel.app/\n\n## 示例\n\n运行本地 dumi 站点：\n\n```bash\nnpm install\nnpm start\n```\n\n然后打开 `http://localhost:8000`。\n\n## API\n\n### Steps\n\n| 名称 | 类型 | 默认值 | 说明 |\n| --- | --- | --- | --- |\n| `className` | string | - | 附加 className。 |\n| `classNames` | `Partial<Record<SemanticName, string>>` | - | 内部插槽的语义化 className。 |\n| `components` | `{ root?: ComponentType; item?: ComponentType }` | - | 覆盖根元素和项目元素。 |\n| `current` | number | 0 | 当前步骤索引。 |\n| `iconRender` | `(originNode, info) => ReactNode` | - | 自定义步骤图标渲染器。 |\n| `initial` | number | 0 | 初始步索引偏移。 |\n| `itemRender` | `(originNode, info) => ReactNode` | - | 自定义步骤项渲染器。 |\n| `itemWrapperRender` | `(originNode) => ReactNode` | - | 自定义步骤项包装渲染器。 |\n| `items` | StepItem[] | [] | 步骤数据。 |\n| `onChange` | `(current: number) => void` | - | 当可单击步骤发生更改时触发。 |\n| `orientation` | `'horizontal' \\| 'vertical'` | `'horizontal'` | 布局方向。 |\n| `prefixCls` | string | `'rc-steps'` | className 前缀。 |\n| `rootClassName` | string | - | 根 className。 |\n| `status` | `'error' \\| 'process' \\| 'finish' \\| 'wait'` | `'process'` | 当前步骤状态。 |\n| `style` | React.CSSProperties | - | 根样式。 |\n| `styles` | `Partial<Record<SemanticName, React.CSSProperties>>` | - | 内部插槽的语义化样式。 |\n| `titlePlacement` | `'horizontal' \\| 'vertical'` | `'horizontal'` | 水平步骤的标题位置。 |\n\n### StepItem\n\n| 名称 | 类型 | 默认值 | 说明 |\n| --- | --- | --- | --- |\n| `className` | string | - | 项目类别名称。 |\n| `classNames` | `Partial<Record<ItemSemanticName, string>>` | - | 该条目的语义 className。 |\n| `content` | React.ReactNode | - | 步骤内容。 |\n| `description` | React.ReactNode | - | 已弃用。请改用 `content`。 |\n| `disabled` | boolean | false | 禁用步骤单击行为。 |\n| `icon` | React.ReactNode | - | 自定义步骤图标。 |\n| `onClick` | React.MouseEventHandler | - | 项目单击处理程序。 |\n| `status` | Status | - | 条目状态。 |\n| `style` | React.CSSProperties | - | 项目样式。 |\n| `styles` | `Partial<Record<ItemSemanticName, React.CSSProperties>>` | - | 该项目的语义样式。 |\n| `subTitle` | React.ReactNode | - | Subtitle. |\n| `title` | React.ReactNode | - | Title. |\n\n## 本地开发\n\n```bash\nnpm install\nnpm start\nnpm test\nnpm run tsc\nnpm run compile\nnpm run build\n```\n\ndumi 站点默认运行在 `http://localhost:8000`。\n\n## 发布\n\n```bash\nnpm run prepublishOnly\n```\n\n包构建完成后，发布流程由 `@rc-component/np` 通过 `rc-np` 命令处理。\n\n## 许可证\n\n@rc-component/steps 基于 [MIT](./LICENSE) 许可证发布。\n","publish_time":1746781953502,"_cnpm_publish_time":1746781953502,"dist-tags":{"latest":"1.2.3"}}