@manohub/icon 0.8.2 → 0.9.0
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.
- package/README.md +9 -3
- package/dist/glyphs.d.ts +3 -0
- package/dist/glyphs.js +13 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -87,7 +87,12 @@ pnpm --filter @manohub/icon type-check # tsc --noEmit -p tsconfig.json
|
|
|
87
87
|
- ✅ `edit` / `delete` / `preview` / `notification` —— 要「编辑 / 删除 / 预览 / 通知」时直接想到它;
|
|
88
88
|
- ❌ `pencil` / `trash` / `eye` / `bell` —— 说的是「画的是什么」,用它得先知道「编辑图标画的是一支铅笔」;
|
|
89
89
|
- **符号族例外**:`plus` / `minus` / `check` / `close` / `info` / `alert` / `more` 保留符号名 ——
|
|
90
|
-
符号本身就是语义的最小载体(`+` 就是「加」),改叫 `add` / `subtract`
|
|
90
|
+
符号本身就是语义的最小载体(`+` 就是「加」),改叫 `add` / `subtract` 反而啰嗦;带圈族
|
|
91
|
+
(`plus-circle` / `close-circle` / `info-circle` / `check-circle` / `alert-circle`)同理。
|
|
92
|
+
- **语义符号分两族**:裸符号(`info` / `check` / `alert` / `close`)给**自带圆形色底**的容器用
|
|
93
|
+
(`Toast` 的 18px 圆底);带圈字形(`info-circle` / `check-circle` / `alert-circle` / `close-circle`)
|
|
94
|
+
给**没有色底**的光图标位用(`Notice` / `Notification` / `Dialog` 的语义图标)。挑错族要么与色底叠成
|
|
95
|
+
双圈,要么显得孤零零。
|
|
91
96
|
- **一处只承担一个语义**:`grid-dots` 曾同时当「宫格入口」(我的技能)与「拖拽手柄」(列表排序),
|
|
92
97
|
0.7.0 拆成 `apps`(9 点宫格)与 `drag-handle`(6 点手柄)两个字形。
|
|
93
98
|
- **线性路径数据取自 [lucide](https://lucide.dev)(ISC License)**,与既有 `file-text` / `chevron-down` / `folder` 同源,线重与 24 视口口径一致;自绘图标(设计稿原始路径,如 `page-title` / `favorite` / `settings`)在条目上方注明出处。
|
|
@@ -111,8 +116,9 @@ pnpm --filter @manohub/icon type-check # tsc --noEmit -p tsconfig.json
|
|
|
111
116
|
| `grid-dots` | `apps` + `drag-handle` | 原来一名两用,拆成「宫格入口」与「拖拽手柄」两个字形 |
|
|
112
117
|
| `sparkles` | `ai` | 用途是「AI 场景」,`sparkles` 说的是「画的是一片星光」 |
|
|
113
118
|
|
|
114
|
-
|
|
115
|
-
以及符号族(`plus` / `minus` / `check` / `close` / `info` / `alert` / `more`
|
|
119
|
+
**没改的**:其余本来就是用途名(`folder` / `file-code` / `settings` / `filter` / `chevron-*` / `search` …),
|
|
120
|
+
以及符号族(`plus` / `minus` / `check` / `close` / `info` / `alert` / `more` 与带圈族 `plus-circle` /
|
|
121
|
+
`close-circle` / `info-circle` / `check-circle` / `alert-circle`)—— 见上方判据。
|
|
116
122
|
|
|
117
123
|
> ⚠️ **`@manohub/base-ui` 里另有一份图标副本**(旧 66 个,含 `bell` / `heart` / `grid-dots` / `wrench`),
|
|
118
124
|
> 本包改名**不影响它**。portal 目前两处混用(`AppNavbar` 走本包、`ConsoleSidebar` 等走 base-ui),
|
package/dist/glyphs.d.ts
CHANGED
|
@@ -69,6 +69,9 @@ export declare const ICON_GLYPHS: {
|
|
|
69
69
|
readonly minus: "<path d=\"M5 12h14\"/>";
|
|
70
70
|
readonly 'plus-circle': "<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M8 12h8\"/><path d=\"M12 8v8\"/>";
|
|
71
71
|
readonly 'close-circle': "<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"m15 9-6 6\"/><path d=\"m9 9 6 6\"/>";
|
|
72
|
+
readonly 'info-circle': "<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 16v-4\"/><path d=\"M12 8h.01\"/>";
|
|
73
|
+
readonly 'check-circle': "<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"m16 9-5.5 5.5L8 12\"/>";
|
|
74
|
+
readonly 'alert-circle': "<circle cx=\"12\" cy=\"12\" r=\"10\"/><line x1=\"12\" x2=\"12\" y1=\"8\" y2=\"12\"/><line x1=\"12\" x2=\"12.01\" y1=\"16\" y2=\"16\"/>";
|
|
72
75
|
readonly menu: "<line x1=\"4\" x2=\"20\" y1=\"12\" y2=\"12\"/><line x1=\"4\" x2=\"20\" y1=\"6\" y2=\"6\"/><line x1=\"4\" x2=\"20\" y1=\"18\" y2=\"18\"/>";
|
|
73
76
|
readonly list: "<line x1=\"8\" x2=\"21\" y1=\"6\" y2=\"6\"/><line x1=\"8\" x2=\"21\" y1=\"12\" y2=\"12\"/><line x1=\"8\" x2=\"21\" y1=\"18\" y2=\"18\"/><line x1=\"3\" x2=\"3.01\" y1=\"6\" y2=\"6\"/><line x1=\"3\" x2=\"3.01\" y1=\"12\" y2=\"12\"/><line x1=\"3\" x2=\"3.01\" y1=\"18\" y2=\"18\"/>";
|
|
74
77
|
readonly table: "<path d=\"M12 3v18\"/><rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\"/><path d=\"M3 9h18\"/><path d=\"M3 15h18\"/>";
|
package/dist/glyphs.js
CHANGED
|
@@ -25,8 +25,14 @@ export const ICON_GLYPHS = {
|
|
|
25
25
|
loading: '<circle cx="12" cy="12" r="10" stroke-opacity="0.25"/><path d="M12 2a10 10 0 0 1 10 10"/>',
|
|
26
26
|
close: '<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',
|
|
27
27
|
/*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
28
|
+
* 状态符号有**两族**,挑哪族看容器有没有那一圈色底:
|
|
29
|
+
* - **裸字形**(`info` / `alert` / `check` / `close`):给**自带圆形色底**的容器用(`Toast` 的 18px 圆底)——
|
|
30
|
+
* 容器自己就是那一圈,字形再自带一圈会叠成双圈。裸符号按 24 视口撑满(上下 5–19),
|
|
31
|
+
* 缩到 12px 才不显小;
|
|
32
|
+
* - **带圈字形**(`info-circle` / `check-circle` / `alert-circle` / `close-circle`):给**没有色底**的
|
|
33
|
+
* 光图标用(`Notice` / `Notification` / `Dialog` 的语义图标)—— 缺了那一圈,裸符号看上去只是一个
|
|
34
|
+
* 孤零零的勾 / 感叹号,撑不住「状态」那点分量。
|
|
35
|
+
* 两族路径都取自 lucide(ISC),线重与 24 视口口径一致。
|
|
30
36
|
*/
|
|
31
37
|
info: '<path d="M12 10v9"/><path d="M12 5h.01"/>',
|
|
32
38
|
alert: '<path d="M12 5v9"/><path d="M12 19h.01"/>',
|
|
@@ -79,6 +85,11 @@ export const ICON_GLYPHS = {
|
|
|
79
85
|
minus: '<path d="M5 12h14"/>',
|
|
80
86
|
'plus-circle': '<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>',
|
|
81
87
|
'close-circle': '<circle cx="12" cy="12" r="10"/><path d="m15 9-6 6"/><path d="m9 9 6 6"/>',
|
|
88
|
+
/* 语义四件套的**带圈**版(路径取自 lucide 的 `info` / `circle-check` / `circle-alert` / `circle-x`):
|
|
89
|
+
与上面两个 `-circle` 同族,给没有圆形色底的语义图标用(见文件头「两族」)。 */
|
|
90
|
+
'info-circle': '<circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/>',
|
|
91
|
+
'check-circle': '<circle cx="12" cy="12" r="10"/><path d="m16 9-5.5 5.5L8 12"/>',
|
|
92
|
+
'alert-circle': '<circle cx="12" cy="12" r="10"/><line x1="12" x2="12" y1="8" y2="12"/><line x1="12" x2="12.01" y1="16" y2="16"/>',
|
|
82
93
|
// ===== 导航 / 表单 / 身份 =====
|
|
83
94
|
menu: '<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',
|
|
84
95
|
list: '<line x1="8" x2="21" y1="6" y2="6"/><line x1="8" x2="21" y1="12" y2="12"/><line x1="8" x2="21" y1="18" y2="18"/><line x1="3" x2="3.01" y1="6" y2="6"/><line x1="3" x2="3.01" y1="12" y2="12"/><line x1="3" x2="3.01" y1="18" y2="18"/>',
|