@qw-ui/icons-react 0.3.0-next.0 → 0.3.0-next.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +57 -0
  2. package/package.json +6 -2
package/README.md ADDED
@@ -0,0 +1,57 @@
1
+ # @qw-ui/icons-react
2
+
3
+ > L1 · 按需 React 图标组件 — tree-shakeable ESM,每个图标一个具名 export。
4
+
5
+ **层级 L1 · 图标资产(React)**。把 [@qw-ui/icons](../icons/README.md) 的图标源 codegen 成每个图标一个 forwardRef React 组件,具名导出、tree-shakeable——业务包只打进真正 import 的图标。与 [@qw-ui/icons-vue](../icons-vue/README.md) 对称。
6
+
7
+ ## sprite vs 按需组件
8
+
9
+ 图标多、走 CDN 一次加载 → 用 [@qw-ui/icons](../icons/README.md) 的 sprite;业务包想 tree-shaking、只带用到的图标 → 用本包。
10
+
11
+ ## 安装
12
+
13
+ ```bash
14
+ pnpm add @qw-ui/icons-react
15
+ ```
16
+
17
+ peer 依赖(宿主提供):`react`(>=18)。内部依赖 [@qw-ui/icons](../icons/README.md)。
18
+
19
+ ## 最小示例
20
+
21
+ ```tsx
22
+ import { Add, AddUser } from "@qw-ui/icons-react";
23
+
24
+ export function Toolbar() {
25
+ return (
26
+ <>
27
+ <Add width={20} height={20} />
28
+ <AddUser aria-label="添加成员" />
29
+ </>
30
+ );
31
+ }
32
+ ```
33
+
34
+ 图标名为 **PascalCase**(kebab-case 图标名转换而来:`add` → `Add`、`add-user` → `AddUser`),每个组件透传标准 SVG props。
35
+
36
+ ## 关联包
37
+
38
+ | 包 | 关系 |
39
+ |---|---|
40
+ | [@qw-ui/icons](../icons/README.md) | 图标源与命名清单(本包由其 codegen) |
41
+ | [@qw-ui/icons-vue](../icons-vue/README.md) | 对称的 Vue 版本 |
42
+ | [@qw-ui/react](../react/README.md) | 组件库主体,`Icon` 组件也可按名渲染 sprite |
43
+
44
+ ## 版本通道
45
+
46
+ | 通道 | 安装 | 说明 |
47
+ |---|---|---|
48
+ | `latest`(稳定) | `pnpm add @qw-ui/icons-react` | `main` 通道,Release PR review 后发布 |
49
+ | `next`(预发布) | `pnpm add @qw-ui/icons-react@next` | `release/next` 通道,高频自增 `x.y.z-next.N` |
50
+
51
+ 8 个公开包 `fixed` 锁步同版本号。npm 发布固定走 `registry.npmjs.org`;内网装依赖走 `registry.anpm.alibaba-inc.com`(tnpm 代理),发布 registry 不要指向内网。流程详见 [development-workflow.md](../../docs/development-workflow.md)。
52
+
53
+ ## 仓库 & License
54
+
55
+ - 主仓库:<http://gitlab.alibaba-inc.com/qianwen/qw-ui>
56
+ - 问题反馈:<http://gitlab.alibaba-inc.com/qianwen/qw-ui/issues>
57
+ - License:MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qw-ui/icons-react",
3
- "version": "0.3.0-next.0",
3
+ "version": "0.3.0-next.11",
4
4
  "private": false,
5
5
  "description": "L1 · 按需 React 图标组件 — tree-shakeable ESM,每个图标一个具名 export。",
6
6
  "type": "module",
@@ -18,7 +18,11 @@
18
18
  "react": ">=18"
19
19
  },
20
20
  "dependencies": {
21
- "@qw-ui/icons": "0.3.0-next.0"
21
+ "@qw-ui/icons": "0.3.0-next.11"
22
+ },
23
+ "publishConfig": {
24
+ "access": "public",
25
+ "registry": "https://registry.npmjs.org/"
22
26
  },
23
27
  "devDependencies": {
24
28
  "@types/react": "^19.2.17",