@manohub/icon 0.4.1 → 0.4.3
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 +52 -5
- package/dist/glyphs.d.ts +110 -0
- package/dist/glyphs.js +129 -0
- package/dist/icon.d.ts +70 -0
- package/dist/icon.js +63 -0
- package/dist/index.d.ts +12 -7
- package/dist/index.js +15 -8
- package/package.json +9 -8
- package/dist/composables/use-icon-content.d.ts +0 -84
- package/dist/composables/use-icon-content.js +0 -332
- package/dist/icon.components.d.ts +0 -37
- package/dist/icon.components.js +0 -36
- package/dist/icon.props.d.ts +0 -20
- package/dist/icon.props.js +0 -15
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# @manohub/icon
|
|
2
2
|
|
|
3
|
-
AIHub
|
|
3
|
+
AIHub 图标包:**图标表**(名字 → SVG 片段字符串)+ **纯字符串渲染器** + **Vue `<Icon>` 组件**。
|
|
4
|
+
TS 源码、**不含 JSX**,`tsc` 一个命令直出 `dist`(不引 vite、不引 vue-tsc);任何仓库、任何 UI 栈都可消费。
|
|
4
5
|
|
|
5
6
|
## 为什么单独成包
|
|
6
7
|
|
|
@@ -12,13 +13,32 @@ AIHub 图标包:内置 SVG 图标内容表 + `<Icon>` 组件。**零运行时
|
|
|
12
13
|
|
|
13
14
|
抽出后依赖方向变为:`@manohub/ui` 与 `@manohub/app-kit` **都依赖** `@manohub/icon`,图标成为两侧共享的底座,不再有"骨架层依赖组件库"的倒挂。
|
|
14
15
|
|
|
15
|
-
##
|
|
16
|
+
## 两个入口
|
|
17
|
+
|
|
18
|
+
| 入口 | 内容 | 是否引 `vue` |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| `@manohub/icon` | `Icon` 组件 + 图标表 + 字符串渲染器 | 是(组件那半边) |
|
|
21
|
+
| `@manohub/icon/glyphs` | 图标表 + `renderIconSvg()` + `IconNameList` | **否** |
|
|
22
|
+
|
|
23
|
+
### 纯 JS 用法(不装 Vue、不打包、静态页也能用)
|
|
24
|
+
|
|
25
|
+
```js
|
|
26
|
+
import { renderIconSvg, ICON_GLYPHS } from '@manohub/icon/glyphs'
|
|
27
|
+
|
|
28
|
+
el.innerHTML = renderIconSvg('refresh', { size: 18, class: 'text-primary' })
|
|
29
|
+
// 或者只要片段,自己包一层容器:
|
|
30
|
+
el.innerHTML = `<svg viewBox="0 0 24 24" width="18" height="18">${ICON_GLYPHS.refresh}</svg>`
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
`renderIconSvg` 产出的属性(`viewBox` / `data-slot` / `fill` / `stroke` / `stroke-width` / 圆头端点 / 基底内联样式)与 `<Icon>` 组件**逐字一致**,两版可以互相替换。
|
|
34
|
+
|
|
35
|
+
### Vue 组件用法
|
|
16
36
|
|
|
17
37
|
```tsx
|
|
18
38
|
import { Icon, IconNameList, type IconName } from '@manohub/icon'
|
|
19
39
|
|
|
20
40
|
<Icon name="page-title" size={26} />
|
|
21
|
-
<Icon name="
|
|
41
|
+
<Icon name="refresh" size={16} class="text-primary" />
|
|
22
42
|
```
|
|
23
43
|
|
|
24
44
|
- `name`:图标名(`IconName` 联合类型,取自内容表键名;运行时清单见 `IconNameList`)
|
|
@@ -27,18 +47,45 @@ import { Icon, IconNameList, type IconName } from '@manohub/icon'
|
|
|
27
47
|
- `style`:附加内联样式,会与基底样式合并(同键以消费方传入的为准)
|
|
28
48
|
- 图标为 24×24 viewBox 的 SVG 片段,`stroke` 继承 `currentColor`(随文字颜色)
|
|
29
49
|
|
|
50
|
+
## 交付形态:TS 源码 + `tsc` 直出 dist
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pnpm --filter @manohub/icon build # node ../../scripts/clean-dist.mjs && tsc -p tsconfig.build.json
|
|
54
|
+
pnpm --filter @manohub/icon type-check # tsc --noEmit -p tsconfig.json
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
- `exports` 指向 `dist`(产物分发,与 `app-ui` / `app-kit` 一致),消费方无需任何别名或 `paths` 映射。
|
|
58
|
+
- **不需要 vite、也不需要 vue-tsc**:源码里没有 JSX(图标数据是字符串,组件用 `h()` + `innerHTML` 渲染),
|
|
59
|
+
没有 CSS、没有第三方运行时依赖,所以纯 `tsc` 就能同时产出 `dist/*.js` 与 `dist/*.d.ts`。
|
|
60
|
+
- **类型是编译产出的**(`dist/*.d.ts`),不是手写声明 —— 新增图标时类型自动跟着内容表走,不会漂。
|
|
61
|
+
- 内部 `content` 以 `innerHTML` 注入:数据是包内静态常量、不含任何外部输入,无注入面;
|
|
62
|
+
代价是片段必须自带合法闭合(表里的串按此约定生成,SSR 与浏览器解析结果一致)。
|
|
63
|
+
|
|
30
64
|
## 依赖与行为约定
|
|
31
65
|
|
|
32
66
|
- **零运行时依赖 + 零 CSS 依赖**:不引入 `clsx` / `tailwind-merge`,也不依赖任何 CSS 框架;类名直接透传,无需任何合并工具。
|
|
33
67
|
- **基底样式为内联 style**:`{ display: 'inline-block', flexShrink: '0' }`。
|
|
34
68
|
原先是 Tailwind 工具类 `inline-block shrink-0` —— 在 Tailwind 仓(如 portal)生效,在非 Tailwind 仓(如 app-kit 各子应用)是**死类**,图标会丢掉 `flex-shrink: 0`、在 flex 行内被长文本压扁;改内联 style 后两种栈取值一致。
|
|
35
69
|
**代价**:内联 style 优先级高于 class,**无法再用 class 覆盖 `display` / `flex-shrink`**(需要覆盖时请传 `style` —— Vue 会把回退的 style 与基底对象合并,同键以后者为准)。
|
|
70
|
+
- **未知图标名渲染成空图标,不抛错**:消费方可能把业务侧来的字符串透传给 `icon`(如头像的图标档),
|
|
71
|
+
抛错会把整棵组件树带崩;拼写错误由 `IconName` 类型在编译期拦住。
|
|
36
72
|
- 本包只含图标,不含任何 CSS 文件(`sideEffects: false`),不引入样式副作用。
|
|
37
73
|
- 与 `aihub-ui` 仓的 `@aihub/ui`(自带 `renderIcon` / `ICON_NAMES`)**是两套独立图标资产**。
|
|
38
74
|
本包随 `frontend-infra` 独立分发,不绑定任何单一消费仓。
|
|
39
75
|
|
|
40
76
|
## 维护
|
|
41
77
|
|
|
42
|
-
图标内容表在 `src/
|
|
78
|
+
图标内容表在 `src/glyphs.ts`:新增图标 = 在 `ICON_GLYPHS` 里加一条 `name: '<path …/>'`,
|
|
79
|
+
`IconName` / `IconNameList` 与类型声明都由键自动推导,**无需改别处**;改完重新 `build` 即可。
|
|
80
|
+
|
|
81
|
+
约定:片段内不写容器属性(`viewBox`/`width`/`stroke` 由渲染方统一给);线性图标继承 `currentColor`;实心图标显式 `fill="currentColor" stroke="none"`。
|
|
82
|
+
|
|
83
|
+
### 命名与用法约定
|
|
43
84
|
|
|
44
|
-
|
|
85
|
+
- **一律 kebab-case**:动作类用业务动词(`edit` / `delete` / `copy` / `refresh` / `upload`),方位类用 `-left` / `-right` / `-up` / `-down` 后缀。
|
|
86
|
+
- **线性路径数据取自 [lucide](https://lucide.dev)(ISC License)**,与既有 `file-text` / `chevron-down` / `folder` 同源,线重与 24 视口口径一致;自绘图标(设计稿原始路径,如 `page-title` / `heart` / `settings`)在条目上方注明出处。
|
|
87
|
+
- **方位只有一个族:`chevron-*`**(四个方向齐备)。翻页、展开收起、下拉 caret、表头升降序一律用它;**禁止再用 `transform: rotate()` 把别的图标转成方位**——旋转是补丁,时间一长没人知道原字形是什么。
|
|
88
|
+
- **`back` 是"返回"语义**(↩ 曲线箭头,实心填充族),只用于返回上一级 / 面包屑。它**不响应 `stroke-width`**(线重烘在路径几何里),与描边族并排时粗细对不上,别塞进描边图标的位置。
|
|
89
|
+
- **判据一句话**:这个箭头要能四向切换吗?要 → `chevron-*`;不要且含"回退"含义 → `back`。
|
|
90
|
+
- **实心 / 空心配对用 `-filled` 后缀**(沿 `heart` / `heart-filled`),不写 `-solid` / `-fill`。
|
|
91
|
+
- **新增前先查 `IconNameList` 是否已有同义项**(例如"查找"已由 `search` 覆盖,不要再造 `lookup`;"删除"用 `delete`,不要并存 `trash`)。
|
package/dist/glyphs.d.ts
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 图标资产:**纯数据(SVG 片段字符串)+ 纯字符串渲染器**。
|
|
3
|
+
*
|
|
4
|
+
* 本文件是「不需要 JSX」的那一半:
|
|
5
|
+
* - 零框架、零依赖、零 JSX —— 表就是对象,值就是字符串,任何栈(Vue / React / 原生 HTML / 静态页)
|
|
6
|
+
* 拿 `ICON_GLYPHS[name]` 直接 `innerHTML` 即可用;`renderIconSvg` 另外给出完整 `<svg>` 串。
|
|
7
|
+
* - Vue 组件版见 `./icon.ts`(用 `h()` + `innerHTML` 渲染,同样不经过任何 JSX 编译)。
|
|
8
|
+
*
|
|
9
|
+
* 约定:片段内不写容器属性(`viewBox` / `width` / `stroke` 由渲染方统一给);
|
|
10
|
+
* 线性图标继承 `currentColor`;实心图标显式 `fill="currentColor" stroke="none"`。
|
|
11
|
+
* 名一律 kebab-case,线性路径数据取自 lucide(ISC License),自绘图标在条目上方注明出处。
|
|
12
|
+
*/
|
|
13
|
+
export declare const ICON_GLYPHS: {
|
|
14
|
+
readonly loading: "<circle cx=\"12\" cy=\"12\" r=\"10\" stroke-opacity=\"0.25\"/><path d=\"M12 2a10 10 0 0 1 10 10\"/>";
|
|
15
|
+
readonly close: "<path d=\"M18 6 6 18\"/><path d=\"m6 6 12 12\"/>";
|
|
16
|
+
readonly success: "<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"m9 12 2 2 4-4\"/>";
|
|
17
|
+
readonly error: "<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"m15 9-6 6\"/><path d=\"m9 9 6 6\"/>";
|
|
18
|
+
readonly info: "<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 16v-4\"/><path d=\"M12 8h.01\"/>";
|
|
19
|
+
readonly warning: "<path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 20h16a2 2 0 0 0 1.73-2Z\"/><path d=\"M12 9v4\"/><path d=\"M12 17h.01\"/>";
|
|
20
|
+
readonly 'chevron-left': "<path d=\"m15 18-6-6 6-6\"/>";
|
|
21
|
+
readonly 'chevron-right': "<path d=\"m9 18 6-6-6-6\"/>";
|
|
22
|
+
readonly 'chevron-down': "<path d=\"m6 9 6 6 6-6\"/>";
|
|
23
|
+
readonly 'chevron-up': "<path d=\"m6 15 6-6 6 6\"/>";
|
|
24
|
+
readonly check: "<path d=\"M20 6 9 17l-5-5\"/>";
|
|
25
|
+
readonly search: "<circle cx=\"11\" cy=\"11\" r=\"8\"/><path d=\"m21 21-4.3-4.3\"/>";
|
|
26
|
+
readonly user: "<g fill=\"currentColor\" stroke=\"none\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M12 1.5C14.8995 1.5 17.25 3.85051 17.25 6.75C17.25 9.6495 14.8995 12 12 12C9.1005 12 6.75 9.6495 6.75 6.75C6.75 3.85051 9.1005 1.5 12 1.5ZM21.75 19.125C21.75 15.75 17.385 12.777 12 12.777C6.615 12.777 2.25 15.75 2.25 19.125C2.25 22.179 5.823 22.47 10.4925 22.497H13.5075C18.177 22.47 21.75 22.179 21.75 19.125ZM4.5 19.125C4.5 17.1915 7.7775 15.027 12 15.027C16.2225 15.027 19.5 17.1915 19.5 19.125C19.5 19.8443 18.2145 20.2005 13.1625 20.2455L12 20.25L10.8825 20.247C5.817 20.2103 4.5 19.8443 4.5 19.125ZM9 6.75C9 5.09315 10.3431 3.75 12 3.75C13.6569 3.75 15 5.09315 15 6.75C15 8.40685 13.6569 9.75 12 9.75C10.3431 9.75 9 8.40685 9 6.75Z\"/></g>";
|
|
27
|
+
readonly download: "<g fill=\"currentColor\" stroke=\"none\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M11.25 13.5H7.6875L12 18L16.3125 13.5H12.75V3H11.25V13.5ZM19.5 12H21V21H3V12H4.5V19.5H19.5V12Z\"/></g>";
|
|
28
|
+
readonly back: "<g fill=\"currentColor\" stroke=\"none\" transform=\"translate(2.74, 3.76) scale(1.2)\"><path d=\"M3.83177095,5.24594871 C4.0602244,5.47440869 4.08306498,5.83061605 3.90029598,6.08462021 L3.83175782,6.16518753 C3.5779134,6.41902469 3.16635617,6.41901881 2.912519,6.1651744 L0.190377671,3.44295529 L0.178511775,3.43077648 C0.161302612,3.41264792 0.145127956,3.39352776 0.130082378,3.37351059 L0.190377671,3.44295529 C0.161590153,3.41416695 0.136092993,3.3833986 0.113868819,3.35110255 C0.0995917417,3.33017175 0.0864982717,3.30852919 0.0746766273,3.28611188 C0.0292654095,3.20019745 0.00466816878,3.10620964 0.000603695422,3.01164047 C0.000208243732,3.00233175 3.64474909e-06,2.99286099 3.64474909e-06,2.98334245 C0.000336250747,2.95470912 0.00150386353,2.93496788 0.00356302865,2.91530936 L3.64474909e-06,2.98334245 C3.64474909e-06,2.9464507 0.00307705756,2.91027678 0.00898180791,2.87506278 C0.0119100067,2.85795575 0.0155561728,2.84055358 0.0199163976,2.82330214 C0.0240526844,2.80675154 0.028784588,2.79075497 0.0341019515,2.77502817 C0.0390005997,2.76052929 0.044550606,2.74581013 0.0506490237,2.73127431 C0.0582569033,2.71333431 0.0663820399,2.69623276 0.0752112443,2.67956138 C0.0807509514,2.6688148 0.0871507675,2.65749932 0.0939137641,2.64634913 C0.106428764,2.62605334 0.119478658,2.60699193 0.133478633,2.58869609 C0.139794115,2.58023299 0.14642202,2.57200602 0.153278251,2.56391211 L0.226982285,2.48983163 L2.94912362,0.156500961 C3.22168212,-0.0771272852 3.63202755,-0.0455680793 3.8656558,0.22699042 C4.09928404,0.49954892 4.06772484,0.909894354 3.79516634,1.1435226 L2.407,2.333 L9.59202675,2.33334245 C12.6180843,2.33334245 15.1778244,4.79506422 15.2957606,7.81911854 C15.4203498,11.0138765 12.7903966,13.744442 9.59202675,13.744442 L2.98271209,13.744442 C2.623727,13.744442 2.33271209,13.4534271 2.33271209,13.094442 C2.33271209,12.7354569 2.623727,12.444442 2.98271209,12.444442 L9.59202675,12.444442 C12.0529831,12.444442 14.0925682,10.3268299 13.9967481,7.86977833 C13.9060235,5.54347019 11.9198402,3.63334245 9.59202675,3.63334245 L2.219,3.633 L3.83177095,5.24594871 Z\"/></g>";
|
|
29
|
+
readonly link: "<g fill=\"currentColor\" stroke=\"none\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M20.5145 7.26396C21.1283 7.89005 21.6132 8.60958 21.9555 9.40247H21.9555C22.3163 10.2379 22.4992 11.1113 22.4992 11.9994C22.4992 12.8876 22.3162 13.7614 21.9554 14.5968C21.613 15.3897 21.1282 16.1082 20.5144 16.7348C19.9038 17.3577 19.203 17.8491 18.4316 18.1974C17.6239 18.562 16.7846 18.7448 15.9372 18.7448H13.5C13.0862 18.7448 12.7507 18.4093 12.7507 17.9955C12.7507 17.5817 13.0862 17.2462 13.5 17.2462H15.9372C16.5704 17.2462 17.2023 17.108 17.815 16.8314C18.4077 16.5638 18.9711 16.1692 19.4443 15.6866C19.9286 15.1925 20.3106 14.6261 20.5797 14.003C20.8589 13.3563 21.0006 12.6823 21.0006 11.9995C21.0006 11.3168 20.8591 10.6427 20.5797 9.99596C20.3106 9.37282 19.9286 8.80625 19.4443 8.31221C18.9711 7.82944 18.4077 7.43253 17.815 7.16499C17.2023 6.88835 16.5706 6.7475 15.9372 6.7475H13.5C13.0862 6.7475 12.7507 6.41202 12.7507 5.9982C12.7507 5.58437 13.0862 5.2489 13.5 5.2489H15.9374C16.7847 5.2489 17.624 5.43457 18.4317 5.79921C19.203 6.1478 19.9038 6.641 20.5145 7.26396ZM8.06274 17.2465H10.5C10.7677 17.2465 11.0151 17.3893 11.1489 17.6211C11.2828 17.853 11.2828 18.1386 11.1489 18.3704C11.0151 18.6023 10.7677 18.7451 10.5 18.7451H8.06274C7.21531 18.7451 6.3761 18.5623 5.56838 18.1976C4.79707 17.8494 4.09627 17.359 3.48558 16.736C2.87182 16.1099 2.38695 15.3904 2.04457 14.5975C1.6838 13.762 1.50082 12.888 1.50082 11.9999C1.50082 11.1117 1.6838 10.2376 2.04455 9.40221C2.38695 8.60975 2.87175 7.89007 3.48558 7.26354C4.0962 6.64055 4.79698 6.1478 5.56838 5.79957C6.3761 5.43483 7.2154 5.24923 8.06274 5.24923H10.5002C10.9141 5.24923 11.2495 5.5847 11.2495 5.99853C11.2495 6.41235 10.9141 6.74782 10.5002 6.74782H8.06299C7.42985 6.74782 6.79791 6.88871 6.18525 7.16532C5.59259 7.43288 5.02913 7.83021 4.55593 8.31282C4.07166 8.80683 3.68963 9.37327 3.42057 9.99633C3.14114 10.6431 2.99942 11.3171 2.99942 11.9995C2.99942 12.6819 3.14091 13.356 3.42031 14.0027C3.68937 14.6259 4.07138 15.1918 4.55569 15.6858C5.02887 16.1685 5.59233 16.5641 6.185 16.8316C6.79765 17.1083 7.42943 17.2465 8.06274 17.2465Z\"/><path d=\"M6.70139 11.9931C6.70139 12.4069 7.03686 12.7424 7.45068 12.7424H16.5523C16.9662 12.7424 17.3016 12.4069 17.3016 11.9931C17.3016 11.5792 16.9662 11.2438 16.5523 11.2438H7.45068C7.25196 11.2438 7.06137 11.3227 6.92085 11.4632C6.78033 11.6038 6.70139 11.7943 6.70139 11.9931H6.70139Z\"/></g>";
|
|
30
|
+
readonly folder: "<path d=\"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z\"/>";
|
|
31
|
+
readonly 'folder-open': "<path d=\"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2\"/>";
|
|
32
|
+
readonly file: "<path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\"/>";
|
|
33
|
+
readonly 'file-code': "<path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\"/><path d=\"M14 2v4a2 2 0 0 0 2 2h4\"/><path d=\"m10 13-2 2 2 2\"/><path d=\"m14 17 2-2-2-2\"/>";
|
|
34
|
+
readonly 'file-json': "<path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\"/><path d=\"M14 2v4a2 2 0 0 0 2 2h4\"/><path d=\"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1\"/><path d=\"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1\"/>";
|
|
35
|
+
readonly 'file-text': "<path d=\"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z\"/><path d=\"M14 2v4a2 2 0 0 0 2 2h4\"/><path d=\"M16 13H8\"/><path d=\"M16 17H8\"/><path d=\"M10 9H8\"/>";
|
|
36
|
+
readonly terminal: "<path d=\"m4 17 6-6-6-6\"/><path d=\"M12 19h8\"/>";
|
|
37
|
+
readonly shield: "<path d=\"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\"/>";
|
|
38
|
+
readonly wrench: "<path d=\"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z\"/>";
|
|
39
|
+
readonly plus: "<path d=\"M5 12h14\"/><path d=\"M12 5v14\"/>";
|
|
40
|
+
readonly bell: "<path d=\"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9\"/><path d=\"M10.3 21a1.94 1.94 0 0 0 3.4 0\"/>";
|
|
41
|
+
readonly settings: "<g fill=\"currentColor\" stroke=\"none\" transform=\"translate(-1.116, -1.116) scale(1.2)\"><path d=\"M10.9311387,2.9311394 C11.2993286,2.9311394 11.5978054,3.22961623 11.5978054,3.59780607 L11.5978054,4.9311394 L11.5945745,4.96740231 C12.2087247,5.03495729 12.7949718,5.19520204 13.3390221,5.43384298 L13.3531294,5.40561682 L14.0197961,4.24561682 C14.2032591,3.9263911 14.6107689,3.81633371 14.9299953,3.99979561 C15.2492204,4.18325983 15.3592777,4.5907696 15.1758147,4.90999532 L14.509148,6.06999532 L14.4892657,6.09953088 C14.9748702,6.45774086 15.4045373,6.88740795 15.7627472,7.3730124 L15.7922828,7.3531301 L16.9522828,6.68646344 C17.2715085,6.50300038 17.6790183,6.61305776 17.8624813,6.93228348 C18.0459444,7.2515092 17.935887,7.65901897 17.6166613,7.84248203 L16.4566613,8.5091487 L16.4284351,8.52325605 C16.6666901,9.06642649 16.8268023,9.65165731 16.8945473,10.2647242 L18.2644721,10.2644727 C18.5991901,10.2644727 18.8762941,10.5111478 18.9239103,10.8326243 L18.9311387,10.9311394 C18.9311387,11.2993292 18.6326619,11.5978061 18.2644721,11.5978061 L16.8945473,11.5975546 C16.8268023,12.2106215 16.6666901,12.7958523 16.4284351,13.3390227 L16.4566613,13.3531301 L17.6166613,14.0197968 C17.935887,14.2032598 18.0459444,14.6107696 17.8624825,14.929996 C17.6790183,15.249221 17.2715085,15.3592784 16.9522828,15.1758154 L15.7922828,14.5091487 L15.7627472,14.4892664 C15.4045373,14.9748709 14.9748702,15.4045379 14.4892657,15.7627479 L14.509148,15.7922835 L15.1758147,16.9522835 C15.3592777,17.2715092 15.2492204,17.679019 14.9299946,17.862482 C14.6107689,18.0459451 14.2032591,17.9358877 14.0197961,17.616662 L13.3531294,16.456662 L13.3390221,16.4284358 C12.7949718,16.6670768 12.2087247,16.8273215 11.5945745,16.8948765 L11.5972767,16.912803 L11.5978054,18.2644727 C11.5978054,18.6326626 11.2993286,18.9311394 10.9311387,18.9311394 C10.5629489,18.9311394 10.2644721,18.6326626 10.2644721,18.2644727 L10.2644721,16.9311394 L10.2677029,16.8948765 C9.65506132,16.8274875 9.07018597,16.6678635 8.52726537,16.430193 L7.84187867,17.6177085 C7.67456866,17.9076111 7.32240952,18.0243122 7.02017438,17.9048619 L6.93123633,17.8618794 C6.61237459,17.6777844 6.50302443,17.2701299 6.68706544,16.951237 L7.37201261,15.7620108 C6.88681791,15.4039485 6.4574945,14.9745378 6.0995302,14.4892664 L6.06999464,14.5091487 L4.90999464,15.1758154 C4.59076892,15.3592784 4.18325915,15.249221 3.99979609,14.9299953 C3.81633303,14.6107696 3.92639042,14.2032598 4.24561614,14.0197968 L5.40561614,13.3531301 L5.4338423,13.3390227 C5.19520136,12.7949725 5.03495661,12.2087254 4.96740163,11.5945752 L4.93113872,11.5978061 L3.59780539,11.5978061 C3.22961555,11.5978061 2.93113872,11.2993292 2.93113872,10.9311394 C2.93113872,10.5629496 3.22961555,10.2644727 3.59780539,10.2644727 L4.93113872,10.2644727 L4.96740163,10.2677036 C5.03495661,9.6535534 5.19520136,9.06730634 5.4338423,8.52325605 L5.40561614,8.5091487 L4.24561614,7.84248203 C3.92639042,7.65901897 3.81633303,7.2515092 3.99979493,6.93228281 C4.18325915,6.61305776 4.59076892,6.50300038 4.90999464,6.68646344 L6.06999464,7.3531301 L6.0995302,7.3730124 C6.45774018,6.88740795 6.88740727,6.45774086 7.37301172,6.09953088 L6.68706544,4.91104178 C6.51975543,4.62113918 6.59489174,4.25783525 6.84952455,4.05590315 L6.93123634,4.00039945 C7.2501292,3.81635844 7.65783766,3.92567748 7.84187867,4.24457035 L8.52726537,5.43208579 C9.07018597,5.19441535 9.65506132,5.03479135 10.2677029,4.96740231 L10.2650007,4.94947584 L10.2644721,3.59780607 C10.2644721,3.22961623 10.5629489,2.9311394 10.9311387,2.9311394 Z M15.5505649,11.5976747 L11.3148054,11.5978061 L9.19922144,15.2658633 C9.73472422,15.480013 10.3191754,15.5978061 10.9311387,15.5978061 C13.2821655,15.5978061 15.227135,13.8592682 15.5505649,11.5976747 Z M6.26447205,10.9311394 C6.26447205,12.4184152 6.96022013,13.7431903 8.04400004,14.5977485 L10.1608054,10.9308061 L8.04400004,7.26453032 C6.96022013,8.11908851 6.26447205,9.44386362 6.26447205,10.9311394 Z M10.9311387,6.26447273 C10.3191754,6.26447273 9.73472422,6.3822658 9.19922144,6.59641552 L11.3148054,10.2638061 L15.5505649,10.2646041 C15.227135,8.00301062 13.2821655,6.26447273 10.9311387,6.26447273 Z\"/></g>";
|
|
42
|
+
readonly logout: "<path d=\"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4\"/><path d=\"m16 17 5-5-5-5\"/><path d=\"M21 12H9\"/>";
|
|
43
|
+
readonly home: "<path d=\"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8\"/><path d=\"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z\"/>";
|
|
44
|
+
readonly workbench: "<rect x=\"3\" y=\"3\" width=\"7\" height=\"7\" rx=\"1\"/><rect x=\"14\" y=\"3\" width=\"7\" height=\"7\" rx=\"1\"/><rect x=\"14\" y=\"14\" width=\"7\" height=\"7\" rx=\"1\"/><rect x=\"3\" y=\"14\" width=\"7\" height=\"7\" rx=\"1\"/>";
|
|
45
|
+
readonly 'grid-dots': "<g fill=\"currentColor\" stroke=\"none\"><circle cx=\"5\" cy=\"5\" r=\"1.5\"/><circle cx=\"12\" cy=\"5\" r=\"1.5\"/><circle cx=\"19\" cy=\"5\" r=\"1.5\"/><circle cx=\"5\" cy=\"12\" r=\"1.5\"/><circle cx=\"12\" cy=\"12\" r=\"1.5\"/><circle cx=\"19\" cy=\"12\" r=\"1.5\"/><circle cx=\"5\" cy=\"19\" r=\"1.5\"/><circle cx=\"12\" cy=\"19\" r=\"1.5\"/><circle cx=\"19\" cy=\"19\" r=\"1.5\"/></g>";
|
|
46
|
+
readonly heart: "<g fill=\"currentColor\" stroke=\"none\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M12.0409 5.54069C13.1383 4.44662 14.682 3.87338 16.2685 4.02409C18.2956 4.21669 20.0315 5.55741 20.7294 7.47037C21.4272 9.38357 20.9627 11.5281 19.5272 12.9889L12.4872 19.9489C12.1756 20.257 11.6739 20.257 11.3622 19.9489L4.31436 12.9801C2.88709 11.5275 2.42223 9.38356 3.12002 7.47037C3.81793 5.55742 5.55377 4.21666 7.58096 4.02409C9.16741 3.87341 10.7111 4.44659 11.8085 5.54069L11.9247 5.66178L12.0409 5.54069ZM16.1171 5.61686C14.7042 5.48264 13.34 6.17249 12.6112 7.3903C12.3007 7.90932 11.5487 7.90932 11.2382 7.3903C10.5094 6.17249 9.14517 5.48271 7.73232 5.61686C6.31932 5.75109 5.10929 6.68575 4.62295 8.0192C4.13664 9.35264 4.46057 10.847 5.44717 11.8512L11.9247 18.2546L18.3944 11.859C19.3305 10.9062 19.672 9.52611 19.3036 8.25553L19.2265 8.0192C18.7401 6.68576 17.5301 5.75109 16.1171 5.61686Z\"/></g>";
|
|
47
|
+
readonly 'page-title': "<g transform=\"scale(0.9230769)\" stroke=\"none\"><rect width=\"26\" height=\"26\" rx=\"4\" fill=\"currentColor\"/><path fill=\"#fff\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.78947 6C6.35346 6 6 6.35346 6 6.78947V19.2105C6 19.6465 6.35346 20 6.78947 20H15.8182H16.2045C16.1524 20 16.1016 19.9947 16.0525 19.9846C15.9758 19.9948 15.8976 20 15.8182 20C14.814 20 14 19.1605 14 18.125C14 17.0895 14.814 16.25 15.8182 16.25C15.9428 16.25 16.0645 16.2629 16.1821 16.2876L16.1818 16.25C16.1818 15.0074 17.1587 14 18.3636 14C18.4543 14 18.5438 14.0057 18.6316 14.0168V6.78947C18.6316 6.35346 18.2781 6 17.8421 6H6.78947ZM15.8684 8.72222H8.76316V9.88889H15.8684V8.72222ZM8.76316 11.4444H12.7105V12.6111H8.76316V11.4444Z\"/><g opacity=\"0.8\"><mask id=\"ak-icon-page-title-cut\" maskUnits=\"userSpaceOnUse\" x=\"12\" y=\"12\" width=\"12\" height=\"10\" fill=\"black\"><rect fill=\"white\" x=\"12\" y=\"12\" width=\"12\" height=\"10\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M16.0525 19.9846C15.9758 19.9948 15.8976 20 15.8182 20C14.814 20 14 19.1605 14 18.125C14 17.0895 14.814 16.25 15.8182 16.25C15.9428 16.25 16.0645 16.2629 16.1821 16.2876L16.1818 16.25C16.1818 15.0074 17.1587 14 18.3636 14C19.5686 14 20.5455 15.0074 20.5455 16.25L20.5452 16.2874C21.3752 16.4611 22 17.2178 22 18.125C22 19.1605 21.186 20 20.1818 20C20.1772 20 20.1726 20 20.1681 19.9999C20.1651 20 20.1621 20 20.1591 20H16.2045C16.1524 20 16.1016 19.9947 16.0525 19.9846Z\"/></mask><path fill=\"#fff\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M16.0525 19.9846C15.9758 19.9948 15.8976 20 15.8182 20C14.814 20 14 19.1605 14 18.125C14 17.0895 14.814 16.25 15.8182 16.25C15.9428 16.25 16.0645 16.2629 16.1821 16.2876L16.1818 16.25C16.1818 15.0074 17.1587 14 18.3636 14C19.5686 14 20.5455 15.0074 20.5455 16.25L20.5452 16.2874C21.3752 16.4611 22 17.2178 22 18.125C22 19.1605 21.186 20 20.1818 20C20.1772 20 20.1726 20 20.1681 19.9999C20.1651 20 20.1621 20 20.1591 20H16.2045C16.1524 20 16.1016 19.9947 16.0525 19.9846Z\"/><path fill=\"currentColor\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" mask=\"url(#ak-icon-page-title-cut)\" d=\"M16.0525 19.9846C15.9758 19.9948 15.8976 20 15.8182 20C14.814 20 14 19.1605 14 18.125C14 17.0895 14.814 16.25 15.8182 16.25C15.9428 16.25 16.0645 16.2629 16.1821 16.2876L16.1818 16.25C16.1818 15.0074 17.1587 14 18.3636 14C19.5686 14 20.5455 15.0074 20.5455 16.25L20.5452 16.2874C21.3752 16.4611 22 17.2178 22 18.125C22 19.1605 21.186 20 20.1818 20C20.1772 20 20.1726 20 20.1681 19.9999C20.1651 20 20.1621 20 20.1591 20H16.2045C16.1524 20 16.1016 19.9947 16.0525 19.9846Z\"/></g></g>";
|
|
48
|
+
readonly 'heart-filled': "<g fill=\"currentColor\" stroke=\"none\"><path d=\"M12.0409 5.54069C13.1383 4.44662 14.682 3.87338 16.2685 4.02409C18.2956 4.21669 20.0315 5.55741 20.7294 7.47037C21.4272 9.38357 20.9627 11.5281 19.5272 12.9889L12.4872 19.9489C12.1756 20.257 11.6739 20.257 11.3622 19.9489L4.31436 12.9801C2.88709 11.5275 2.42223 9.38356 3.12002 7.47037C3.81793 5.55742 5.55377 4.21666 7.58096 4.02409C9.16741 3.87341 10.7111 4.44659 11.8085 5.54069L11.9247 5.66178L12.0409 5.54069Z\"/></g>";
|
|
49
|
+
readonly edit: "<path d=\"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z\"/><path d=\"m15 5 4 4\"/>";
|
|
50
|
+
readonly delete: "<path d=\"M3 6h18\"/><path d=\"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6\"/><path d=\"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2\"/><line x1=\"10\" x2=\"10\" y1=\"11\" y2=\"17\"/><line x1=\"14\" x2=\"14\" y1=\"11\" y2=\"17\"/>";
|
|
51
|
+
readonly copy: "<rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\"/><path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"/>";
|
|
52
|
+
readonly refresh: "<path d=\"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8\"/><path d=\"M21 3v5h-5\"/><path d=\"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16\"/><path d=\"M8 16H3v5\"/>";
|
|
53
|
+
readonly upload: "<path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\"/><polyline points=\"17 8 12 3 7 8\"/><line x1=\"12\" x2=\"12\" y1=\"3\" y2=\"15\"/>";
|
|
54
|
+
readonly save: "<path d=\"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z\"/><path d=\"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7\"/><path d=\"M7 3v4a1 1 0 0 0 1 1h7\"/>";
|
|
55
|
+
readonly filter: "<polygon points=\"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3\"/>";
|
|
56
|
+
readonly more: "<circle cx=\"12\" cy=\"12\" r=\"1\"/><circle cx=\"19\" cy=\"12\" r=\"1\"/><circle cx=\"5\" cy=\"12\" r=\"1\"/>";
|
|
57
|
+
readonly eye: "<path d=\"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/>";
|
|
58
|
+
readonly 'external-link': "<path d=\"M15 3h6v6\"/><path d=\"M10 14 21 3\"/><path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"/>";
|
|
59
|
+
readonly minus: "<path d=\"M5 12h14\"/>";
|
|
60
|
+
readonly 'plus-circle': "<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M8 12h8\"/><path d=\"M12 8v8\"/>";
|
|
61
|
+
readonly 'close-circle': "<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"m15 9-6 6\"/><path d=\"m9 9 6 6\"/>";
|
|
62
|
+
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\"/>";
|
|
63
|
+
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\"/>";
|
|
64
|
+
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\"/>";
|
|
65
|
+
readonly calendar: "<path d=\"M8 2v4\"/><path d=\"M16 2v4\"/><rect width=\"18\" height=\"18\" x=\"3\" y=\"4\" rx=\"2\"/><path d=\"M3 10h18\"/>";
|
|
66
|
+
readonly clock: "<circle cx=\"12\" cy=\"12\" r=\"10\"/><polyline points=\"12 6 12 12 16 14\"/>";
|
|
67
|
+
readonly help: "<circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3\"/><path d=\"M12 17h.01\"/>";
|
|
68
|
+
readonly lock: "<rect width=\"18\" height=\"11\" x=\"3\" y=\"11\" rx=\"2\" ry=\"2\"/><path d=\"M7 11V7a5 5 0 0 1 10 0v4\"/>";
|
|
69
|
+
readonly unlock: "<rect width=\"18\" height=\"11\" x=\"3\" y=\"11\" rx=\"2\" ry=\"2\"/><path d=\"M7 11V7a5 5 0 0 1 9.9-1\"/>";
|
|
70
|
+
readonly key: "<path d=\"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4\"/><path d=\"m21 2-9.6 9.6\"/><circle cx=\"7.5\" cy=\"15.5\" r=\"5.5\"/>";
|
|
71
|
+
readonly users: "<path d=\"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2\"/><circle cx=\"9\" cy=\"7\" r=\"4\"/><path d=\"M22 21v-2a4 4 0 0 0-3-3.87\"/><path d=\"M16 3.13a4 4 0 0 1 0 7.75\"/>";
|
|
72
|
+
readonly image: "<rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" ry=\"2\"/><circle cx=\"9\" cy=\"9\" r=\"2\"/><path d=\"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21\"/>";
|
|
73
|
+
readonly archive: "<rect width=\"20\" height=\"5\" x=\"2\" y=\"3\" rx=\"1\"/><path d=\"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8\"/><path d=\"M10 12h4\"/>";
|
|
74
|
+
readonly package: "<path d=\"m7.5 4.27 9 5.15\"/><path d=\"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z\"/><path d=\"m3.3 7 8.7 5 8.7-5\"/><path d=\"M12 22V12\"/>";
|
|
75
|
+
readonly plug: "<path d=\"M12 22v-5\"/><path d=\"M9 8V2\"/><path d=\"M15 8V2\"/><path d=\"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z\"/>";
|
|
76
|
+
readonly branch: "<line x1=\"6\" x2=\"6\" y1=\"3\" y2=\"15\"/><circle cx=\"18\" cy=\"6\" r=\"3\"/><circle cx=\"6\" cy=\"18\" r=\"3\"/><path d=\"M18 9a9 9 0 0 1-9 9\"/>";
|
|
77
|
+
readonly tag: "<path d=\"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z\"/><circle cx=\"7.5\" cy=\"7.5\" r=\".5\" fill=\"currentColor\"/>";
|
|
78
|
+
readonly sparkles: "<path d=\"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z\"/><path d=\"M20 3v4\"/><path d=\"M22 5h-4\"/><path d=\"M4 17v2\"/><path d=\"M5 18H3\"/>";
|
|
79
|
+
readonly 'shield-check': "<path d=\"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\"/><path d=\"m9 12 2 2 4-4\"/>";
|
|
80
|
+
readonly 'shield-alert': "<path d=\"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\"/><path d=\"M12 8v4\"/><path d=\"M12 16h.01\"/>";
|
|
81
|
+
readonly history: "<path d=\"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\"/><path d=\"M3 3v5h5\"/><path d=\"M12 7v5l4 2\"/>";
|
|
82
|
+
};
|
|
83
|
+
export type IconName = keyof typeof ICON_GLYPHS;
|
|
84
|
+
export declare const IconNameList: IconName[];
|
|
85
|
+
/** 渲染完整 `<svg>` 串的选项 */
|
|
86
|
+
export interface IconRenderOptions {
|
|
87
|
+
/** 宽高(px),默认 16 */
|
|
88
|
+
size?: number | string;
|
|
89
|
+
/** 附加类名 */
|
|
90
|
+
class?: string;
|
|
91
|
+
/** 追加内联样式(分号分隔),与基底样式合并 */
|
|
92
|
+
style?: string;
|
|
93
|
+
/** 描边宽度,默认 2 */
|
|
94
|
+
strokeWidth?: number;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* 图标 → 完整 `<svg>` 字符串(不引入 Vue)。
|
|
98
|
+
*
|
|
99
|
+
* 给非组件场景用:静态页 / 模板串拼接 / 任何框架的 `innerHTML`。
|
|
100
|
+
* 属性与 `<Icon>` 组件逐字对齐,两版产物可直接对照。
|
|
101
|
+
*/
|
|
102
|
+
export declare function renderIconSvg(name: IconName, options?: IconRenderOptions): string;
|
|
103
|
+
/**
|
|
104
|
+
* 取单个图标的片段串。
|
|
105
|
+
*
|
|
106
|
+
* 未知名字返回空串(**与旧版行为一致**:渲染成空图标而不抛错)——
|
|
107
|
+
* 消费方可能把业务侧来的字符串透传给 `icon`(如头像的图标档),抛错会把整棵组件树带崩。
|
|
108
|
+
* 拼写错误由 `IconName` 类型在编译期拦住,运行期不再二次设防。
|
|
109
|
+
*/
|
|
110
|
+
export declare function getIconGlyph(name: IconName): string;
|
package/dist/glyphs.js
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 图标资产:**纯数据(SVG 片段字符串)+ 纯字符串渲染器**。
|
|
3
|
+
*
|
|
4
|
+
* 本文件是「不需要 JSX」的那一半:
|
|
5
|
+
* - 零框架、零依赖、零 JSX —— 表就是对象,值就是字符串,任何栈(Vue / React / 原生 HTML / 静态页)
|
|
6
|
+
* 拿 `ICON_GLYPHS[name]` 直接 `innerHTML` 即可用;`renderIconSvg` 另外给出完整 `<svg>` 串。
|
|
7
|
+
* - Vue 组件版见 `./icon.ts`(用 `h()` + `innerHTML` 渲染,同样不经过任何 JSX 编译)。
|
|
8
|
+
*
|
|
9
|
+
* 约定:片段内不写容器属性(`viewBox` / `width` / `stroke` 由渲染方统一给);
|
|
10
|
+
* 线性图标继承 `currentColor`;实心图标显式 `fill="currentColor" stroke="none"`。
|
|
11
|
+
* 名一律 kebab-case,线性路径数据取自 lucide(ISC License),自绘图标在条目上方注明出处。
|
|
12
|
+
*/
|
|
13
|
+
export const ICON_GLYPHS = {
|
|
14
|
+
loading: '<circle cx="12" cy="12" r="10" stroke-opacity="0.25"/><path d="M12 2a10 10 0 0 1 10 10"/>',
|
|
15
|
+
close: '<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',
|
|
16
|
+
success: '<circle cx="12" cy="12" r="10"/><path d="m9 12 2 2 4-4"/>',
|
|
17
|
+
error: '<circle cx="12" cy="12" r="10"/><path d="m15 9-6 6"/><path d="m9 9 6 6"/>',
|
|
18
|
+
info: '<circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/>',
|
|
19
|
+
warning: '<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 20h16a2 2 0 0 0 1.73-2Z"/><path d="M12 9v4"/><path d="M12 17h.01"/>',
|
|
20
|
+
'chevron-left': '<path d="m15 18-6-6 6-6"/>',
|
|
21
|
+
'chevron-right': '<path d="m9 18 6-6-6-6"/>',
|
|
22
|
+
'chevron-down': '<path d="m6 9 6 6 6-6"/>',
|
|
23
|
+
'chevron-up': '<path d="m6 15 6-6 6 6"/>',
|
|
24
|
+
check: '<path d="M20 6 9 17l-5-5"/>',
|
|
25
|
+
search: '<circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>',
|
|
26
|
+
user: '<g fill="currentColor" stroke="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 1.5C14.8995 1.5 17.25 3.85051 17.25 6.75C17.25 9.6495 14.8995 12 12 12C9.1005 12 6.75 9.6495 6.75 6.75C6.75 3.85051 9.1005 1.5 12 1.5ZM21.75 19.125C21.75 15.75 17.385 12.777 12 12.777C6.615 12.777 2.25 15.75 2.25 19.125C2.25 22.179 5.823 22.47 10.4925 22.497H13.5075C18.177 22.47 21.75 22.179 21.75 19.125ZM4.5 19.125C4.5 17.1915 7.7775 15.027 12 15.027C16.2225 15.027 19.5 17.1915 19.5 19.125C19.5 19.8443 18.2145 20.2005 13.1625 20.2455L12 20.25L10.8825 20.247C5.817 20.2103 4.5 19.8443 4.5 19.125ZM9 6.75C9 5.09315 10.3431 3.75 12 3.75C13.6569 3.75 15 5.09315 15 6.75C15 8.40685 13.6569 9.75 12 9.75C10.3431 9.75 9 8.40685 9 6.75Z"/></g>',
|
|
27
|
+
download: '<g fill="currentColor" stroke="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.25 13.5H7.6875L12 18L16.3125 13.5H12.75V3H11.25V13.5ZM19.5 12H21V21H3V12H4.5V19.5H19.5V12Z"/></g>',
|
|
28
|
+
back: '<g fill="currentColor" stroke="none" transform="translate(2.74, 3.76) scale(1.2)"><path d="M3.83177095,5.24594871 C4.0602244,5.47440869 4.08306498,5.83061605 3.90029598,6.08462021 L3.83175782,6.16518753 C3.5779134,6.41902469 3.16635617,6.41901881 2.912519,6.1651744 L0.190377671,3.44295529 L0.178511775,3.43077648 C0.161302612,3.41264792 0.145127956,3.39352776 0.130082378,3.37351059 L0.190377671,3.44295529 C0.161590153,3.41416695 0.136092993,3.3833986 0.113868819,3.35110255 C0.0995917417,3.33017175 0.0864982717,3.30852919 0.0746766273,3.28611188 C0.0292654095,3.20019745 0.00466816878,3.10620964 0.000603695422,3.01164047 C0.000208243732,3.00233175 3.64474909e-06,2.99286099 3.64474909e-06,2.98334245 C0.000336250747,2.95470912 0.00150386353,2.93496788 0.00356302865,2.91530936 L3.64474909e-06,2.98334245 C3.64474909e-06,2.9464507 0.00307705756,2.91027678 0.00898180791,2.87506278 C0.0119100067,2.85795575 0.0155561728,2.84055358 0.0199163976,2.82330214 C0.0240526844,2.80675154 0.028784588,2.79075497 0.0341019515,2.77502817 C0.0390005997,2.76052929 0.044550606,2.74581013 0.0506490237,2.73127431 C0.0582569033,2.71333431 0.0663820399,2.69623276 0.0752112443,2.67956138 C0.0807509514,2.6688148 0.0871507675,2.65749932 0.0939137641,2.64634913 C0.106428764,2.62605334 0.119478658,2.60699193 0.133478633,2.58869609 C0.139794115,2.58023299 0.14642202,2.57200602 0.153278251,2.56391211 L0.226982285,2.48983163 L2.94912362,0.156500961 C3.22168212,-0.0771272852 3.63202755,-0.0455680793 3.8656558,0.22699042 C4.09928404,0.49954892 4.06772484,0.909894354 3.79516634,1.1435226 L2.407,2.333 L9.59202675,2.33334245 C12.6180843,2.33334245 15.1778244,4.79506422 15.2957606,7.81911854 C15.4203498,11.0138765 12.7903966,13.744442 9.59202675,13.744442 L2.98271209,13.744442 C2.623727,13.744442 2.33271209,13.4534271 2.33271209,13.094442 C2.33271209,12.7354569 2.623727,12.444442 2.98271209,12.444442 L9.59202675,12.444442 C12.0529831,12.444442 14.0925682,10.3268299 13.9967481,7.86977833 C13.9060235,5.54347019 11.9198402,3.63334245 9.59202675,3.63334245 L2.219,3.633 L3.83177095,5.24594871 Z"/></g>',
|
|
29
|
+
link: '<g fill="currentColor" stroke="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M20.5145 7.26396C21.1283 7.89005 21.6132 8.60958 21.9555 9.40247H21.9555C22.3163 10.2379 22.4992 11.1113 22.4992 11.9994C22.4992 12.8876 22.3162 13.7614 21.9554 14.5968C21.613 15.3897 21.1282 16.1082 20.5144 16.7348C19.9038 17.3577 19.203 17.8491 18.4316 18.1974C17.6239 18.562 16.7846 18.7448 15.9372 18.7448H13.5C13.0862 18.7448 12.7507 18.4093 12.7507 17.9955C12.7507 17.5817 13.0862 17.2462 13.5 17.2462H15.9372C16.5704 17.2462 17.2023 17.108 17.815 16.8314C18.4077 16.5638 18.9711 16.1692 19.4443 15.6866C19.9286 15.1925 20.3106 14.6261 20.5797 14.003C20.8589 13.3563 21.0006 12.6823 21.0006 11.9995C21.0006 11.3168 20.8591 10.6427 20.5797 9.99596C20.3106 9.37282 19.9286 8.80625 19.4443 8.31221C18.9711 7.82944 18.4077 7.43253 17.815 7.16499C17.2023 6.88835 16.5706 6.7475 15.9372 6.7475H13.5C13.0862 6.7475 12.7507 6.41202 12.7507 5.9982C12.7507 5.58437 13.0862 5.2489 13.5 5.2489H15.9374C16.7847 5.2489 17.624 5.43457 18.4317 5.79921C19.203 6.1478 19.9038 6.641 20.5145 7.26396ZM8.06274 17.2465H10.5C10.7677 17.2465 11.0151 17.3893 11.1489 17.6211C11.2828 17.853 11.2828 18.1386 11.1489 18.3704C11.0151 18.6023 10.7677 18.7451 10.5 18.7451H8.06274C7.21531 18.7451 6.3761 18.5623 5.56838 18.1976C4.79707 17.8494 4.09627 17.359 3.48558 16.736C2.87182 16.1099 2.38695 15.3904 2.04457 14.5975C1.6838 13.762 1.50082 12.888 1.50082 11.9999C1.50082 11.1117 1.6838 10.2376 2.04455 9.40221C2.38695 8.60975 2.87175 7.89007 3.48558 7.26354C4.0962 6.64055 4.79698 6.1478 5.56838 5.79957C6.3761 5.43483 7.2154 5.24923 8.06274 5.24923H10.5002C10.9141 5.24923 11.2495 5.5847 11.2495 5.99853C11.2495 6.41235 10.9141 6.74782 10.5002 6.74782H8.06299C7.42985 6.74782 6.79791 6.88871 6.18525 7.16532C5.59259 7.43288 5.02913 7.83021 4.55593 8.31282C4.07166 8.80683 3.68963 9.37327 3.42057 9.99633C3.14114 10.6431 2.99942 11.3171 2.99942 11.9995C2.99942 12.6819 3.14091 13.356 3.42031 14.0027C3.68937 14.6259 4.07138 15.1918 4.55569 15.6858C5.02887 16.1685 5.59233 16.5641 6.185 16.8316C6.79765 17.1083 7.42943 17.2465 8.06274 17.2465Z"/><path d="M6.70139 11.9931C6.70139 12.4069 7.03686 12.7424 7.45068 12.7424H16.5523C16.9662 12.7424 17.3016 12.4069 17.3016 11.9931C17.3016 11.5792 16.9662 11.2438 16.5523 11.2438H7.45068C7.25196 11.2438 7.06137 11.3227 6.92085 11.4632C6.78033 11.6038 6.70139 11.7943 6.70139 11.9931H6.70139Z"/></g>',
|
|
30
|
+
folder: '<path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/>',
|
|
31
|
+
'folder-open': '<path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"/>',
|
|
32
|
+
file: '<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/>',
|
|
33
|
+
'file-code': '<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/><path d="m10 13-2 2 2 2"/><path d="m14 17 2-2-2-2"/>',
|
|
34
|
+
'file-json': '<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/><path d="M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1"/><path d="M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1"/>',
|
|
35
|
+
'file-text': '<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/><path d="M16 13H8"/><path d="M16 17H8"/><path d="M10 9H8"/>',
|
|
36
|
+
terminal: '<path d="m4 17 6-6-6-6"/><path d="M12 19h8"/>',
|
|
37
|
+
shield: '<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/>',
|
|
38
|
+
wrench: '<path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/>',
|
|
39
|
+
plus: '<path d="M5 12h14"/><path d="M12 5v14"/>',
|
|
40
|
+
bell: '<path d="M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"/><path d="M10.3 21a1.94 1.94 0 0 0 3.4 0"/>',
|
|
41
|
+
settings: '<g fill="currentColor" stroke="none" transform="translate(-1.116, -1.116) scale(1.2)"><path d="M10.9311387,2.9311394 C11.2993286,2.9311394 11.5978054,3.22961623 11.5978054,3.59780607 L11.5978054,4.9311394 L11.5945745,4.96740231 C12.2087247,5.03495729 12.7949718,5.19520204 13.3390221,5.43384298 L13.3531294,5.40561682 L14.0197961,4.24561682 C14.2032591,3.9263911 14.6107689,3.81633371 14.9299953,3.99979561 C15.2492204,4.18325983 15.3592777,4.5907696 15.1758147,4.90999532 L14.509148,6.06999532 L14.4892657,6.09953088 C14.9748702,6.45774086 15.4045373,6.88740795 15.7627472,7.3730124 L15.7922828,7.3531301 L16.9522828,6.68646344 C17.2715085,6.50300038 17.6790183,6.61305776 17.8624813,6.93228348 C18.0459444,7.2515092 17.935887,7.65901897 17.6166613,7.84248203 L16.4566613,8.5091487 L16.4284351,8.52325605 C16.6666901,9.06642649 16.8268023,9.65165731 16.8945473,10.2647242 L18.2644721,10.2644727 C18.5991901,10.2644727 18.8762941,10.5111478 18.9239103,10.8326243 L18.9311387,10.9311394 C18.9311387,11.2993292 18.6326619,11.5978061 18.2644721,11.5978061 L16.8945473,11.5975546 C16.8268023,12.2106215 16.6666901,12.7958523 16.4284351,13.3390227 L16.4566613,13.3531301 L17.6166613,14.0197968 C17.935887,14.2032598 18.0459444,14.6107696 17.8624825,14.929996 C17.6790183,15.249221 17.2715085,15.3592784 16.9522828,15.1758154 L15.7922828,14.5091487 L15.7627472,14.4892664 C15.4045373,14.9748709 14.9748702,15.4045379 14.4892657,15.7627479 L14.509148,15.7922835 L15.1758147,16.9522835 C15.3592777,17.2715092 15.2492204,17.679019 14.9299946,17.862482 C14.6107689,18.0459451 14.2032591,17.9358877 14.0197961,17.616662 L13.3531294,16.456662 L13.3390221,16.4284358 C12.7949718,16.6670768 12.2087247,16.8273215 11.5945745,16.8948765 L11.5972767,16.912803 L11.5978054,18.2644727 C11.5978054,18.6326626 11.2993286,18.9311394 10.9311387,18.9311394 C10.5629489,18.9311394 10.2644721,18.6326626 10.2644721,18.2644727 L10.2644721,16.9311394 L10.2677029,16.8948765 C9.65506132,16.8274875 9.07018597,16.6678635 8.52726537,16.430193 L7.84187867,17.6177085 C7.67456866,17.9076111 7.32240952,18.0243122 7.02017438,17.9048619 L6.93123633,17.8618794 C6.61237459,17.6777844 6.50302443,17.2701299 6.68706544,16.951237 L7.37201261,15.7620108 C6.88681791,15.4039485 6.4574945,14.9745378 6.0995302,14.4892664 L6.06999464,14.5091487 L4.90999464,15.1758154 C4.59076892,15.3592784 4.18325915,15.249221 3.99979609,14.9299953 C3.81633303,14.6107696 3.92639042,14.2032598 4.24561614,14.0197968 L5.40561614,13.3531301 L5.4338423,13.3390227 C5.19520136,12.7949725 5.03495661,12.2087254 4.96740163,11.5945752 L4.93113872,11.5978061 L3.59780539,11.5978061 C3.22961555,11.5978061 2.93113872,11.2993292 2.93113872,10.9311394 C2.93113872,10.5629496 3.22961555,10.2644727 3.59780539,10.2644727 L4.93113872,10.2644727 L4.96740163,10.2677036 C5.03495661,9.6535534 5.19520136,9.06730634 5.4338423,8.52325605 L5.40561614,8.5091487 L4.24561614,7.84248203 C3.92639042,7.65901897 3.81633303,7.2515092 3.99979493,6.93228281 C4.18325915,6.61305776 4.59076892,6.50300038 4.90999464,6.68646344 L6.06999464,7.3531301 L6.0995302,7.3730124 C6.45774018,6.88740795 6.88740727,6.45774086 7.37301172,6.09953088 L6.68706544,4.91104178 C6.51975543,4.62113918 6.59489174,4.25783525 6.84952455,4.05590315 L6.93123634,4.00039945 C7.2501292,3.81635844 7.65783766,3.92567748 7.84187867,4.24457035 L8.52726537,5.43208579 C9.07018597,5.19441535 9.65506132,5.03479135 10.2677029,4.96740231 L10.2650007,4.94947584 L10.2644721,3.59780607 C10.2644721,3.22961623 10.5629489,2.9311394 10.9311387,2.9311394 Z M15.5505649,11.5976747 L11.3148054,11.5978061 L9.19922144,15.2658633 C9.73472422,15.480013 10.3191754,15.5978061 10.9311387,15.5978061 C13.2821655,15.5978061 15.227135,13.8592682 15.5505649,11.5976747 Z M6.26447205,10.9311394 C6.26447205,12.4184152 6.96022013,13.7431903 8.04400004,14.5977485 L10.1608054,10.9308061 L8.04400004,7.26453032 C6.96022013,8.11908851 6.26447205,9.44386362 6.26447205,10.9311394 Z M10.9311387,6.26447273 C10.3191754,6.26447273 9.73472422,6.3822658 9.19922144,6.59641552 L11.3148054,10.2638061 L15.5505649,10.2646041 C15.227135,8.00301062 13.2821655,6.26447273 10.9311387,6.26447273 Z"/></g>',
|
|
42
|
+
logout: '<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><path d="m16 17 5-5-5-5"/><path d="M21 12H9"/>',
|
|
43
|
+
home: '<path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"/><path d="M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>',
|
|
44
|
+
workbench: '<rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/>',
|
|
45
|
+
'grid-dots': '<g fill="currentColor" stroke="none"><circle cx="5" cy="5" r="1.5"/><circle cx="12" cy="5" r="1.5"/><circle cx="19" cy="5" r="1.5"/><circle cx="5" cy="12" r="1.5"/><circle cx="12" cy="12" r="1.5"/><circle cx="19" cy="12" r="1.5"/><circle cx="5" cy="19" r="1.5"/><circle cx="12" cy="19" r="1.5"/><circle cx="19" cy="19" r="1.5"/></g>',
|
|
46
|
+
heart: '<g fill="currentColor" stroke="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.0409 5.54069C13.1383 4.44662 14.682 3.87338 16.2685 4.02409C18.2956 4.21669 20.0315 5.55741 20.7294 7.47037C21.4272 9.38357 20.9627 11.5281 19.5272 12.9889L12.4872 19.9489C12.1756 20.257 11.6739 20.257 11.3622 19.9489L4.31436 12.9801C2.88709 11.5275 2.42223 9.38356 3.12002 7.47037C3.81793 5.55742 5.55377 4.21666 7.58096 4.02409C9.16741 3.87341 10.7111 4.44659 11.8085 5.54069L11.9247 5.66178L12.0409 5.54069ZM16.1171 5.61686C14.7042 5.48264 13.34 6.17249 12.6112 7.3903C12.3007 7.90932 11.5487 7.90932 11.2382 7.3903C10.5094 6.17249 9.14517 5.48271 7.73232 5.61686C6.31932 5.75109 5.10929 6.68575 4.62295 8.0192C4.13664 9.35264 4.46057 10.847 5.44717 11.8512L11.9247 18.2546L18.3944 11.859C19.3305 10.9062 19.672 9.52611 19.3036 8.25553L19.2265 8.0192C18.7401 6.68576 17.5301 5.75109 16.1171 5.61686Z"/></g>',
|
|
47
|
+
// 页头图标(MH后台-0911 node 0:3904 完整还原):蓝色圆角底 + 白色文档/云朵图形。
|
|
48
|
+
// 底与切割线用 currentColor(随使用处 color 换色,不写死主色);图形恒白(彩底上白图形永远成立);
|
|
49
|
+
// 切割线 mask 还原图形分隔;26 坐标缩放至 24 viewBox。
|
|
50
|
+
'page-title': '<g transform="scale(0.9230769)" stroke="none"><rect width="26" height="26" rx="4" fill="currentColor"/><path fill="#fff" fill-rule="evenodd" clip-rule="evenodd" d="M6.78947 6C6.35346 6 6 6.35346 6 6.78947V19.2105C6 19.6465 6.35346 20 6.78947 20H15.8182H16.2045C16.1524 20 16.1016 19.9947 16.0525 19.9846C15.9758 19.9948 15.8976 20 15.8182 20C14.814 20 14 19.1605 14 18.125C14 17.0895 14.814 16.25 15.8182 16.25C15.9428 16.25 16.0645 16.2629 16.1821 16.2876L16.1818 16.25C16.1818 15.0074 17.1587 14 18.3636 14C18.4543 14 18.5438 14.0057 18.6316 14.0168V6.78947C18.6316 6.35346 18.2781 6 17.8421 6H6.78947ZM15.8684 8.72222H8.76316V9.88889H15.8684V8.72222ZM8.76316 11.4444H12.7105V12.6111H8.76316V11.4444Z"/><g opacity="0.8"><mask id="ak-icon-page-title-cut" maskUnits="userSpaceOnUse" x="12" y="12" width="12" height="10" fill="black"><rect fill="white" x="12" y="12" width="12" height="10"/><path fill-rule="evenodd" clip-rule="evenodd" d="M16.0525 19.9846C15.9758 19.9948 15.8976 20 15.8182 20C14.814 20 14 19.1605 14 18.125C14 17.0895 14.814 16.25 15.8182 16.25C15.9428 16.25 16.0645 16.2629 16.1821 16.2876L16.1818 16.25C16.1818 15.0074 17.1587 14 18.3636 14C19.5686 14 20.5455 15.0074 20.5455 16.25L20.5452 16.2874C21.3752 16.4611 22 17.2178 22 18.125C22 19.1605 21.186 20 20.1818 20C20.1772 20 20.1726 20 20.1681 19.9999C20.1651 20 20.1621 20 20.1591 20H16.2045C16.1524 20 16.1016 19.9947 16.0525 19.9846Z"/></mask><path fill="#fff" fill-rule="evenodd" clip-rule="evenodd" d="M16.0525 19.9846C15.9758 19.9948 15.8976 20 15.8182 20C14.814 20 14 19.1605 14 18.125C14 17.0895 14.814 16.25 15.8182 16.25C15.9428 16.25 16.0645 16.2629 16.1821 16.2876L16.1818 16.25C16.1818 15.0074 17.1587 14 18.3636 14C19.5686 14 20.5455 15.0074 20.5455 16.25L20.5452 16.2874C21.3752 16.4611 22 17.2178 22 18.125C22 19.1605 21.186 20 20.1818 20C20.1772 20 20.1726 20 20.1681 19.9999C20.1651 20 20.1621 20 20.1591 20H16.2045C16.1524 20 16.1016 19.9947 16.0525 19.9846Z"/><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" mask="url(#ak-icon-page-title-cut)" d="M16.0525 19.9846C15.9758 19.9948 15.8976 20 15.8182 20C14.814 20 14 19.1605 14 18.125C14 17.0895 14.814 16.25 15.8182 16.25C15.9428 16.25 16.0645 16.2629 16.1821 16.2876L16.1818 16.25C16.1818 15.0074 17.1587 14 18.3636 14C19.5686 14 20.5455 15.0074 20.5455 16.25L20.5452 16.2874C21.3752 16.4611 22 17.2178 22 18.125C22 19.1605 21.186 20 20.1818 20C20.1772 20 20.1726 20 20.1681 19.9999C20.1651 20 20.1621 20 20.1591 20H16.2045C16.1524 20 16.1016 19.9947 16.0525 19.9846Z"/></g></g>',
|
|
51
|
+
'heart-filled': '<g fill="currentColor" stroke="none"><path d="M12.0409 5.54069C13.1383 4.44662 14.682 3.87338 16.2685 4.02409C18.2956 4.21669 20.0315 5.55741 20.7294 7.47037C21.4272 9.38357 20.9627 11.5281 19.5272 12.9889L12.4872 19.9489C12.1756 20.257 11.6739 20.257 11.3622 19.9489L4.31436 12.9801C2.88709 11.5275 2.42223 9.38356 3.12002 7.47037C3.81793 5.55742 5.55377 4.21666 7.58096 4.02409C9.16741 3.87341 10.7111 4.44659 11.8085 5.54069L11.9247 5.66178L12.0409 5.54069Z"/></g>',
|
|
52
|
+
// ===== 操作(编辑 / 内容) =====
|
|
53
|
+
edit: '<path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"/><path d="m15 5 4 4"/>',
|
|
54
|
+
delete: '<path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/><line x1="10" x2="10" y1="11" y2="17"/><line x1="14" x2="14" y1="11" y2="17"/>',
|
|
55
|
+
copy: '<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',
|
|
56
|
+
refresh: '<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M8 16H3v5"/>',
|
|
57
|
+
upload: '<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="17 8 12 3 7 8"/><line x1="12" x2="12" y1="3" y2="15"/>',
|
|
58
|
+
save: '<path d="M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"/><path d="M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7"/><path d="M7 3v4a1 1 0 0 0 1 1h7"/>',
|
|
59
|
+
filter: '<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"/>',
|
|
60
|
+
more: '<circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/>',
|
|
61
|
+
eye: '<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',
|
|
62
|
+
'external-link': '<path d="M15 3h6v6"/><path d="M10 14 21 3"/><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>',
|
|
63
|
+
minus: '<path d="M5 12h14"/>',
|
|
64
|
+
'plus-circle': '<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>',
|
|
65
|
+
'close-circle': '<circle cx="12" cy="12" r="10"/><path d="m15 9-6 6"/><path d="m9 9 6 6"/>',
|
|
66
|
+
// ===== 导航 / 表单 / 身份 =====
|
|
67
|
+
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"/>',
|
|
68
|
+
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"/>',
|
|
69
|
+
table: '<path d="M12 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M3 9h18"/><path d="M3 15h18"/>',
|
|
70
|
+
calendar: '<path d="M8 2v4"/><path d="M16 2v4"/><rect width="18" height="18" x="3" y="4" rx="2"/><path d="M3 10h18"/>',
|
|
71
|
+
clock: '<circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/>',
|
|
72
|
+
help: '<circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><path d="M12 17h.01"/>',
|
|
73
|
+
lock: '<rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>',
|
|
74
|
+
unlock: '<rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 9.9-1"/>',
|
|
75
|
+
key: '<path d="m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4"/><path d="m21 2-9.6 9.6"/><circle cx="7.5" cy="15.5" r="5.5"/>',
|
|
76
|
+
users: '<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/>',
|
|
77
|
+
// ===== 文件 / 资源 =====
|
|
78
|
+
image: '<rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/>',
|
|
79
|
+
archive: '<rect width="20" height="5" x="2" y="3" rx="1"/><path d="M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8"/><path d="M10 12h4"/>',
|
|
80
|
+
package: '<path d="m7.5 4.27 9 5.15"/><path d="M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z"/><path d="m3.3 7 8.7 5 8.7-5"/><path d="M12 22V12"/>',
|
|
81
|
+
plug: '<path d="M12 22v-5"/><path d="M9 8V2"/><path d="M15 8V2"/><path d="M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z"/>',
|
|
82
|
+
branch: '<line x1="6" x2="6" y1="3" y2="15"/><circle cx="18" cy="6" r="3"/><circle cx="6" cy="18" r="3"/><path d="M18 9a9 9 0 0 1-9 9"/>',
|
|
83
|
+
tag: '<path d="M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z"/><circle cx="7.5" cy="7.5" r=".5" fill="currentColor"/>',
|
|
84
|
+
// ===== 状态 / 业务 =====
|
|
85
|
+
sparkles: '<path d="M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"/><path d="M20 3v4"/><path d="M22 5h-4"/><path d="M4 17v2"/><path d="M5 18H3"/>',
|
|
86
|
+
'shield-check': '<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/><path d="m9 12 2 2 4-4"/>',
|
|
87
|
+
'shield-alert': '<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/><path d="M12 8v4"/><path d="M12 16h.01"/>',
|
|
88
|
+
history: '<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/><path d="M12 7v5l4 2"/>',
|
|
89
|
+
};
|
|
90
|
+
export const IconNameList = Object.keys(ICON_GLYPHS);
|
|
91
|
+
/** 基底内联样式:不依赖任何 CSS 框架,两种栈取值一致 */
|
|
92
|
+
const BASE_STYLE = 'display:inline-block;flex-shrink:0';
|
|
93
|
+
/**
|
|
94
|
+
* 图标 → 完整 `<svg>` 字符串(不引入 Vue)。
|
|
95
|
+
*
|
|
96
|
+
* 给非组件场景用:静态页 / 模板串拼接 / 任何框架的 `innerHTML`。
|
|
97
|
+
* 属性与 `<Icon>` 组件逐字对齐,两版产物可直接对照。
|
|
98
|
+
*/
|
|
99
|
+
export function renderIconSvg(name, options = {}) {
|
|
100
|
+
const size = options.size ?? 16;
|
|
101
|
+
const style = options.style ? BASE_STYLE + ';' + options.style : BASE_STYLE;
|
|
102
|
+
const attrs = [
|
|
103
|
+
'viewBox="0 0 24 24"',
|
|
104
|
+
'data-slot="icon"',
|
|
105
|
+
'width="' + size + '"',
|
|
106
|
+
'height="' + size + '"',
|
|
107
|
+
'fill="none"',
|
|
108
|
+
'stroke="currentColor"',
|
|
109
|
+
'stroke-width="' + (options.strokeWidth ?? 2) + '"',
|
|
110
|
+
'stroke-linecap="round"',
|
|
111
|
+
'stroke-linejoin="round"',
|
|
112
|
+
'aria-hidden="true"',
|
|
113
|
+
'style="' + style + '"',
|
|
114
|
+
options.class ? 'class="' + options.class + '"' : '',
|
|
115
|
+
]
|
|
116
|
+
.filter(Boolean)
|
|
117
|
+
.join(' ');
|
|
118
|
+
return '<svg ' + attrs + '>' + ICON_GLYPHS[name] + '</svg>';
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* 取单个图标的片段串。
|
|
122
|
+
*
|
|
123
|
+
* 未知名字返回空串(**与旧版行为一致**:渲染成空图标而不抛错)——
|
|
124
|
+
* 消费方可能把业务侧来的字符串透传给 `icon`(如头像的图标档),抛错会把整棵组件树带崩。
|
|
125
|
+
* 拼写错误由 `IconName` 类型在编译期拦住,运行期不再二次设防。
|
|
126
|
+
*/
|
|
127
|
+
export function getIconGlyph(name) {
|
|
128
|
+
return ICON_GLYPHS[name] ?? '';
|
|
129
|
+
}
|
package/dist/icon.d.ts
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { type ExtractPropTypes, type PropType } from 'vue';
|
|
2
|
+
import { type IconName } from './glyphs.js';
|
|
3
|
+
/** Icon 组件的 props 定义 */
|
|
4
|
+
export declare const iconProps: {
|
|
5
|
+
readonly name: {
|
|
6
|
+
readonly type: PropType<IconName>;
|
|
7
|
+
readonly required: true;
|
|
8
|
+
};
|
|
9
|
+
/** 尺寸(px),同时设置 width 与 height,默认 16 */
|
|
10
|
+
readonly size: {
|
|
11
|
+
readonly type: PropType<number | string>;
|
|
12
|
+
readonly default: 16;
|
|
13
|
+
};
|
|
14
|
+
readonly class: {
|
|
15
|
+
readonly type: StringConstructor;
|
|
16
|
+
readonly default: undefined;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
/** Icon 组件 props 类型(由 iconProps 经 ExtractPropTypes 解析推导) */
|
|
20
|
+
export type IconProps = ExtractPropTypes<typeof iconProps>;
|
|
21
|
+
/**
|
|
22
|
+
* Icon 组件(原生 SVG):
|
|
23
|
+
* - name 指定内置图标(片段串取自 `./glyphs.ts`,**本文件不含任何 JSX**)
|
|
24
|
+
* - size 控制尺寸(默认 16px,同时设置 width/height),也可经 class / style 覆盖
|
|
25
|
+
* - stroke 继承 currentColor,随文字颜色
|
|
26
|
+
* - 基底样式为内联 style(`display:inline-block` + `flex-shrink:0`),不含任何 CSS 框架类名
|
|
27
|
+
*
|
|
28
|
+
* ## 为什么走 `innerHTML` 而不是 JSX / vnode 子节点
|
|
29
|
+
*
|
|
30
|
+
* 图标数据是**字符串**(`ICON_GLYPHS`)—— 这是本包"不需要 JSX 编译"的根:
|
|
31
|
+
* 同一份数据既能给本组件用,也能给任意非 Vue 场景(静态页、别的框架、模板串)直接 `innerHTML`。
|
|
32
|
+
* 代价是内容以 `innerHTML` 注入(数据是包内静态常量,不含任何外部输入,无注入面);
|
|
33
|
+
* 且**片段必须自带合法闭合**(表里的串已按此约定生成,SSR 与浏览器解析结果一致)。
|
|
34
|
+
*
|
|
35
|
+
* 未知图标名按旧版行为处理:渲染成空图标,不抛错(消费方可能透传业务侧字符串)。
|
|
36
|
+
*/
|
|
37
|
+
export declare const Icon: import("vue").DefineComponent<ExtractPropTypes<{
|
|
38
|
+
readonly name: {
|
|
39
|
+
readonly type: PropType<IconName>;
|
|
40
|
+
readonly required: true;
|
|
41
|
+
};
|
|
42
|
+
/** 尺寸(px),同时设置 width 与 height,默认 16 */
|
|
43
|
+
readonly size: {
|
|
44
|
+
readonly type: PropType<number | string>;
|
|
45
|
+
readonly default: 16;
|
|
46
|
+
};
|
|
47
|
+
readonly class: {
|
|
48
|
+
readonly type: StringConstructor;
|
|
49
|
+
readonly default: undefined;
|
|
50
|
+
};
|
|
51
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
52
|
+
[key: string]: any;
|
|
53
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
|
|
54
|
+
readonly name: {
|
|
55
|
+
readonly type: PropType<IconName>;
|
|
56
|
+
readonly required: true;
|
|
57
|
+
};
|
|
58
|
+
/** 尺寸(px),同时设置 width 与 height,默认 16 */
|
|
59
|
+
readonly size: {
|
|
60
|
+
readonly type: PropType<number | string>;
|
|
61
|
+
readonly default: 16;
|
|
62
|
+
};
|
|
63
|
+
readonly class: {
|
|
64
|
+
readonly type: StringConstructor;
|
|
65
|
+
readonly default: undefined;
|
|
66
|
+
};
|
|
67
|
+
}>> & Readonly<{}>, {
|
|
68
|
+
readonly size: string | number;
|
|
69
|
+
readonly class: string;
|
|
70
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
package/dist/icon.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { defineComponent, h } from 'vue';
|
|
2
|
+
import { getIconGlyph } from './glyphs.js';
|
|
3
|
+
/**
|
|
4
|
+
* 内建基底样式(内联 style,**不依赖任何 CSS 框架**)。
|
|
5
|
+
*
|
|
6
|
+
* 代价:内联 style 优先级高于 class,消费方**无法再用 class 覆盖 `display` / `flex-shrink`**
|
|
7
|
+
* (需要覆盖时传 `style`,Vue 会把 attrs 回退的 style 与本对象合并、同键以后者为准)。
|
|
8
|
+
*/
|
|
9
|
+
const BASE_STYLE = { display: 'inline-block', flexShrink: '0' };
|
|
10
|
+
/** `<svg>` 容器属性:与 `renderIconSvg`(纯字符串版)逐字对齐,两版产物可直接对照 */
|
|
11
|
+
const SVG_ATTRS = {
|
|
12
|
+
viewBox: '0 0 24 24',
|
|
13
|
+
'data-slot': 'icon',
|
|
14
|
+
fill: 'none',
|
|
15
|
+
stroke: 'currentColor',
|
|
16
|
+
'stroke-width': 2,
|
|
17
|
+
'stroke-linecap': 'round',
|
|
18
|
+
'stroke-linejoin': 'round',
|
|
19
|
+
'aria-hidden': 'true',
|
|
20
|
+
};
|
|
21
|
+
/** Icon 组件的 props 定义 */
|
|
22
|
+
export const iconProps = {
|
|
23
|
+
name: {
|
|
24
|
+
type: String,
|
|
25
|
+
required: true,
|
|
26
|
+
},
|
|
27
|
+
/** 尺寸(px),同时设置 width 与 height,默认 16 */
|
|
28
|
+
size: {
|
|
29
|
+
type: [Number, String],
|
|
30
|
+
default: 16,
|
|
31
|
+
},
|
|
32
|
+
class: { type: String, default: undefined },
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Icon 组件(原生 SVG):
|
|
36
|
+
* - name 指定内置图标(片段串取自 `./glyphs.ts`,**本文件不含任何 JSX**)
|
|
37
|
+
* - size 控制尺寸(默认 16px,同时设置 width/height),也可经 class / style 覆盖
|
|
38
|
+
* - stroke 继承 currentColor,随文字颜色
|
|
39
|
+
* - 基底样式为内联 style(`display:inline-block` + `flex-shrink:0`),不含任何 CSS 框架类名
|
|
40
|
+
*
|
|
41
|
+
* ## 为什么走 `innerHTML` 而不是 JSX / vnode 子节点
|
|
42
|
+
*
|
|
43
|
+
* 图标数据是**字符串**(`ICON_GLYPHS`)—— 这是本包"不需要 JSX 编译"的根:
|
|
44
|
+
* 同一份数据既能给本组件用,也能给任意非 Vue 场景(静态页、别的框架、模板串)直接 `innerHTML`。
|
|
45
|
+
* 代价是内容以 `innerHTML` 注入(数据是包内静态常量,不含任何外部输入,无注入面);
|
|
46
|
+
* 且**片段必须自带合法闭合**(表里的串已按此约定生成,SSR 与浏览器解析结果一致)。
|
|
47
|
+
*
|
|
48
|
+
* 未知图标名按旧版行为处理:渲染成空图标,不抛错(消费方可能透传业务侧字符串)。
|
|
49
|
+
*/
|
|
50
|
+
export const Icon = defineComponent({
|
|
51
|
+
name: 'AIcon',
|
|
52
|
+
props: iconProps,
|
|
53
|
+
setup(props) {
|
|
54
|
+
return () => h('svg', {
|
|
55
|
+
...SVG_ATTRS,
|
|
56
|
+
width: props.size,
|
|
57
|
+
height: props.size,
|
|
58
|
+
style: BASE_STYLE,
|
|
59
|
+
class: props.class,
|
|
60
|
+
innerHTML: getIconGlyph(props.name),
|
|
61
|
+
});
|
|
62
|
+
},
|
|
63
|
+
});
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @manohub/icon
|
|
2
|
+
* @manohub/icon 对外导出面(**Vue 组件版**入口)。
|
|
3
3
|
*
|
|
4
|
-
* 交付:内置 SVG
|
|
5
|
-
*
|
|
4
|
+
* 交付:内置 SVG 图标表(`ICON_GLYPHS` / `IconName` / `IconNameList`)+ `<Icon>` 组件
|
|
5
|
+
* + 纯字符串渲染器(`renderIconSvg`)。零运行时依赖(仅 peer `vue`),不含任何 CSS。
|
|
6
|
+
*
|
|
7
|
+
* 源码是 TS 但**不含 JSX**(图标数据是字符串、组件用 `h()` 渲染),故 `tsc` 一个命令
|
|
8
|
+
* 就能产出 `dist/*.js` 与 `dist/*.d.ts` —— 不需要 vite,也不需要 JSX 编译插件,
|
|
9
|
+
* 消费方拿到的产物与普通 JS 包无异。
|
|
10
|
+
*
|
|
11
|
+
* 不用 Vue 的场景走子路径入口 `@manohub/icon/glyphs`:同一份图标数据 + `renderIconSvg()`,
|
|
12
|
+
* 该入口**不引用 `vue`**(静态页 / 别的框架 / 任何 `innerHTML` 处都能直接用)。
|
|
6
13
|
*/
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export * from './icon.components';
|
|
10
|
-
export * from './icon.props';
|
|
14
|
+
export * from './glyphs.js';
|
|
15
|
+
export * from './icon.js';
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @manohub/icon 对外导出面(**Vue 组件版**入口)。
|
|
3
|
+
*
|
|
4
|
+
* 交付:内置 SVG 图标表(`ICON_GLYPHS` / `IconName` / `IconNameList`)+ `<Icon>` 组件
|
|
5
|
+
* + 纯字符串渲染器(`renderIconSvg`)。零运行时依赖(仅 peer `vue`),不含任何 CSS。
|
|
6
|
+
*
|
|
7
|
+
* 源码是 TS 但**不含 JSX**(图标数据是字符串、组件用 `h()` 渲染),故 `tsc` 一个命令
|
|
8
|
+
* 就能产出 `dist/*.js` 与 `dist/*.d.ts` —— 不需要 vite,也不需要 JSX 编译插件,
|
|
9
|
+
* 消费方拿到的产物与普通 JS 包无异。
|
|
10
|
+
*
|
|
11
|
+
* 不用 Vue 的场景走子路径入口 `@manohub/icon/glyphs`:同一份图标数据 + `renderIconSvg()`,
|
|
12
|
+
* 该入口**不引用 `vue`**(静态页 / 别的框架 / 任何 `innerHTML` 处都能直接用)。
|
|
13
|
+
*/
|
|
14
|
+
export * from './glyphs.js';
|
|
15
|
+
export * from './icon.js';
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manohub/icon",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
|
-
"description": "AIHub 图标包:内置 SVG 图标内容表 + <Icon> 组件。零运行时依赖(仅 peer vue),供任意 UI
|
|
6
|
+
"description": "AIHub 图标包:内置 SVG 图标内容表 + 纯字符串渲染器 + <Icon> 组件。零运行时依赖(仅 peer vue),供任意 UI 栈消费",
|
|
7
7
|
"license": "UNLICENSED",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
@@ -23,23 +23,24 @@
|
|
|
23
23
|
".": {
|
|
24
24
|
"types": "./dist/index.d.ts",
|
|
25
25
|
"import": "./dist/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./glyphs": {
|
|
28
|
+
"types": "./dist/glyphs.d.ts",
|
|
29
|
+
"import": "./dist/glyphs.js"
|
|
26
30
|
}
|
|
27
31
|
},
|
|
28
32
|
"main": "./dist/index.js",
|
|
29
33
|
"module": "./dist/index.js",
|
|
30
34
|
"types": "./dist/index.d.ts",
|
|
31
35
|
"scripts": {
|
|
32
|
-
"build": "node ../../scripts/clean-dist.mjs &&
|
|
33
|
-
"type-check": "
|
|
36
|
+
"build": "node ../../scripts/clean-dist.mjs && tsc -p tsconfig.build.json",
|
|
37
|
+
"type-check": "tsc --noEmit -p tsconfig.json"
|
|
34
38
|
},
|
|
35
39
|
"peerDependencies": {
|
|
36
40
|
"vue": "^3.5.0"
|
|
37
41
|
},
|
|
38
42
|
"devDependencies": {
|
|
39
|
-
"@vitejs/plugin-vue-jsx": "catalog:",
|
|
40
43
|
"typescript": "catalog:",
|
|
41
|
-
"
|
|
42
|
-
"vue": "catalog:",
|
|
43
|
-
"vue-tsc": "catalog:"
|
|
44
|
+
"vue": "catalog:"
|
|
44
45
|
}
|
|
45
46
|
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 内置图标 SVG 内容组合式函数
|
|
3
|
-
* 每个图标是 24x24 viewBox 内的 SVG 片段,stroke 继承 currentColor
|
|
4
|
-
*/
|
|
5
|
-
declare const IconMap: {
|
|
6
|
-
loading: () => import("vue/jsx-runtime").JSX.Element;
|
|
7
|
-
close: () => import("vue/jsx-runtime").JSX.Element;
|
|
8
|
-
success: () => import("vue/jsx-runtime").JSX.Element;
|
|
9
|
-
error: () => import("vue/jsx-runtime").JSX.Element;
|
|
10
|
-
info: () => import("vue/jsx-runtime").JSX.Element;
|
|
11
|
-
warning: () => import("vue/jsx-runtime").JSX.Element;
|
|
12
|
-
'chevron-left': () => import("vue/jsx-runtime").JSX.Element;
|
|
13
|
-
'chevron-right': () => import("vue/jsx-runtime").JSX.Element;
|
|
14
|
-
'chevron-down': () => import("vue/jsx-runtime").JSX.Element;
|
|
15
|
-
'chevron-up': () => import("vue/jsx-runtime").JSX.Element;
|
|
16
|
-
check: () => import("vue/jsx-runtime").JSX.Element;
|
|
17
|
-
search: () => import("vue/jsx-runtime").JSX.Element;
|
|
18
|
-
user: () => import("vue/jsx-runtime").JSX.Element;
|
|
19
|
-
download: () => import("vue/jsx-runtime").JSX.Element;
|
|
20
|
-
back: () => import("vue/jsx-runtime").JSX.Element;
|
|
21
|
-
link: () => import("vue/jsx-runtime").JSX.Element;
|
|
22
|
-
folder: () => import("vue/jsx-runtime").JSX.Element;
|
|
23
|
-
'folder-open': () => import("vue/jsx-runtime").JSX.Element;
|
|
24
|
-
file: () => import("vue/jsx-runtime").JSX.Element;
|
|
25
|
-
'file-code': () => import("vue/jsx-runtime").JSX.Element;
|
|
26
|
-
'file-json': () => import("vue/jsx-runtime").JSX.Element;
|
|
27
|
-
'file-text': () => import("vue/jsx-runtime").JSX.Element;
|
|
28
|
-
terminal: () => import("vue/jsx-runtime").JSX.Element;
|
|
29
|
-
shield: () => import("vue/jsx-runtime").JSX.Element;
|
|
30
|
-
wrench: () => import("vue/jsx-runtime").JSX.Element;
|
|
31
|
-
plus: () => import("vue/jsx-runtime").JSX.Element;
|
|
32
|
-
bell: () => import("vue/jsx-runtime").JSX.Element;
|
|
33
|
-
settings: () => import("vue/jsx-runtime").JSX.Element;
|
|
34
|
-
logout: () => import("vue/jsx-runtime").JSX.Element;
|
|
35
|
-
home: () => import("vue/jsx-runtime").JSX.Element;
|
|
36
|
-
workbench: () => import("vue/jsx-runtime").JSX.Element;
|
|
37
|
-
'grid-dots': () => import("vue/jsx-runtime").JSX.Element;
|
|
38
|
-
heart: () => import("vue/jsx-runtime").JSX.Element;
|
|
39
|
-
'page-title': () => import("vue/jsx-runtime").JSX.Element;
|
|
40
|
-
'heart-filled': () => import("vue/jsx-runtime").JSX.Element;
|
|
41
|
-
};
|
|
42
|
-
export type IconName = keyof typeof IconMap;
|
|
43
|
-
export declare const IconNameList: IconName[];
|
|
44
|
-
export declare const useIconContent: () => {
|
|
45
|
-
IconMap: {
|
|
46
|
-
loading: () => import("vue/jsx-runtime").JSX.Element;
|
|
47
|
-
close: () => import("vue/jsx-runtime").JSX.Element;
|
|
48
|
-
success: () => import("vue/jsx-runtime").JSX.Element;
|
|
49
|
-
error: () => import("vue/jsx-runtime").JSX.Element;
|
|
50
|
-
info: () => import("vue/jsx-runtime").JSX.Element;
|
|
51
|
-
warning: () => import("vue/jsx-runtime").JSX.Element;
|
|
52
|
-
'chevron-left': () => import("vue/jsx-runtime").JSX.Element;
|
|
53
|
-
'chevron-right': () => import("vue/jsx-runtime").JSX.Element;
|
|
54
|
-
'chevron-down': () => import("vue/jsx-runtime").JSX.Element;
|
|
55
|
-
'chevron-up': () => import("vue/jsx-runtime").JSX.Element;
|
|
56
|
-
check: () => import("vue/jsx-runtime").JSX.Element;
|
|
57
|
-
search: () => import("vue/jsx-runtime").JSX.Element;
|
|
58
|
-
user: () => import("vue/jsx-runtime").JSX.Element;
|
|
59
|
-
download: () => import("vue/jsx-runtime").JSX.Element;
|
|
60
|
-
back: () => import("vue/jsx-runtime").JSX.Element;
|
|
61
|
-
link: () => import("vue/jsx-runtime").JSX.Element;
|
|
62
|
-
folder: () => import("vue/jsx-runtime").JSX.Element;
|
|
63
|
-
'folder-open': () => import("vue/jsx-runtime").JSX.Element;
|
|
64
|
-
file: () => import("vue/jsx-runtime").JSX.Element;
|
|
65
|
-
'file-code': () => import("vue/jsx-runtime").JSX.Element;
|
|
66
|
-
'file-json': () => import("vue/jsx-runtime").JSX.Element;
|
|
67
|
-
'file-text': () => import("vue/jsx-runtime").JSX.Element;
|
|
68
|
-
terminal: () => import("vue/jsx-runtime").JSX.Element;
|
|
69
|
-
shield: () => import("vue/jsx-runtime").JSX.Element;
|
|
70
|
-
wrench: () => import("vue/jsx-runtime").JSX.Element;
|
|
71
|
-
plus: () => import("vue/jsx-runtime").JSX.Element;
|
|
72
|
-
bell: () => import("vue/jsx-runtime").JSX.Element;
|
|
73
|
-
settings: () => import("vue/jsx-runtime").JSX.Element;
|
|
74
|
-
logout: () => import("vue/jsx-runtime").JSX.Element;
|
|
75
|
-
home: () => import("vue/jsx-runtime").JSX.Element;
|
|
76
|
-
workbench: () => import("vue/jsx-runtime").JSX.Element;
|
|
77
|
-
'grid-dots': () => import("vue/jsx-runtime").JSX.Element;
|
|
78
|
-
heart: () => import("vue/jsx-runtime").JSX.Element;
|
|
79
|
-
'page-title': () => import("vue/jsx-runtime").JSX.Element;
|
|
80
|
-
'heart-filled': () => import("vue/jsx-runtime").JSX.Element;
|
|
81
|
-
};
|
|
82
|
-
getIconContent: (name: IconName) => (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element) | (() => import("vue/jsx-runtime").JSX.Element);
|
|
83
|
-
};
|
|
84
|
-
export {};
|
|
@@ -1,332 +0,0 @@
|
|
|
1
|
-
import { createVNode, Fragment } from "vue";
|
|
2
|
-
const IconMap = {
|
|
3
|
-
loading: () => createVNode(Fragment, null, [createVNode("circle", {
|
|
4
|
-
"cx": "12",
|
|
5
|
-
"cy": "12",
|
|
6
|
-
"r": "10",
|
|
7
|
-
"stroke-opacity": 0.25
|
|
8
|
-
}, null), createVNode("path", {
|
|
9
|
-
"d": "M12 2a10 10 0 0 1 10 10"
|
|
10
|
-
}, null)]),
|
|
11
|
-
close: () => createVNode(Fragment, null, [createVNode("path", {
|
|
12
|
-
"d": "M18 6 6 18"
|
|
13
|
-
}, null), createVNode("path", {
|
|
14
|
-
"d": "m6 6 12 12"
|
|
15
|
-
}, null)]),
|
|
16
|
-
success: () => createVNode(Fragment, null, [createVNode("circle", {
|
|
17
|
-
"cx": "12",
|
|
18
|
-
"cy": "12",
|
|
19
|
-
"r": "10"
|
|
20
|
-
}, null), createVNode("path", {
|
|
21
|
-
"d": "m9 12 2 2 4-4"
|
|
22
|
-
}, null)]),
|
|
23
|
-
error: () => createVNode(Fragment, null, [createVNode("circle", {
|
|
24
|
-
"cx": "12",
|
|
25
|
-
"cy": "12",
|
|
26
|
-
"r": "10"
|
|
27
|
-
}, null), createVNode("path", {
|
|
28
|
-
"d": "m15 9-6 6"
|
|
29
|
-
}, null), createVNode("path", {
|
|
30
|
-
"d": "m9 9 6 6"
|
|
31
|
-
}, null)]),
|
|
32
|
-
info: () => createVNode(Fragment, null, [createVNode("circle", {
|
|
33
|
-
"cx": "12",
|
|
34
|
-
"cy": "12",
|
|
35
|
-
"r": "10"
|
|
36
|
-
}, null), createVNode("path", {
|
|
37
|
-
"d": "M12 16v-4"
|
|
38
|
-
}, null), createVNode("path", {
|
|
39
|
-
"d": "M12 8h.01"
|
|
40
|
-
}, null)]),
|
|
41
|
-
warning: () => createVNode(Fragment, null, [createVNode("path", {
|
|
42
|
-
"d": "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 20h16a2 2 0 0 0 1.73-2Z"
|
|
43
|
-
}, null), createVNode("path", {
|
|
44
|
-
"d": "M12 9v4"
|
|
45
|
-
}, null), createVNode("path", {
|
|
46
|
-
"d": "M12 17h.01"
|
|
47
|
-
}, null)]),
|
|
48
|
-
"chevron-left": () => createVNode(Fragment, null, [createVNode("path", {
|
|
49
|
-
"d": "m15 18-6-6 6-6"
|
|
50
|
-
}, null)]),
|
|
51
|
-
"chevron-right": () => createVNode(Fragment, null, [createVNode("path", {
|
|
52
|
-
"d": "m9 18 6-6-6-6"
|
|
53
|
-
}, null)]),
|
|
54
|
-
"chevron-down": () => createVNode(Fragment, null, [createVNode("path", {
|
|
55
|
-
"d": "m6 9 6 6 6-6"
|
|
56
|
-
}, null)]),
|
|
57
|
-
"chevron-up": () => createVNode(Fragment, null, [createVNode("path", {
|
|
58
|
-
"d": "m6 15 6-6 6 6"
|
|
59
|
-
}, null)]),
|
|
60
|
-
check: () => createVNode(Fragment, null, [createVNode("path", {
|
|
61
|
-
"d": "M20 6 9 17l-5-5"
|
|
62
|
-
}, null)]),
|
|
63
|
-
search: () => createVNode(Fragment, null, [createVNode("circle", {
|
|
64
|
-
"cx": "11",
|
|
65
|
-
"cy": "11",
|
|
66
|
-
"r": "8"
|
|
67
|
-
}, null), createVNode("path", {
|
|
68
|
-
"d": "m21 21-4.3-4.3"
|
|
69
|
-
}, null)]),
|
|
70
|
-
user: () => createVNode("g", {
|
|
71
|
-
"fill": "currentColor",
|
|
72
|
-
"stroke": "none"
|
|
73
|
-
}, [createVNode("path", {
|
|
74
|
-
"fill-rule": "evenodd",
|
|
75
|
-
"clip-rule": "evenodd",
|
|
76
|
-
"d": "M12 1.5C14.8995 1.5 17.25 3.85051 17.25 6.75C17.25 9.6495 14.8995 12 12 12C9.1005 12 6.75 9.6495 6.75 6.75C6.75 3.85051 9.1005 1.5 12 1.5ZM21.75 19.125C21.75 15.75 17.385 12.777 12 12.777C6.615 12.777 2.25 15.75 2.25 19.125C2.25 22.179 5.823 22.47 10.4925 22.497H13.5075C18.177 22.47 21.75 22.179 21.75 19.125ZM4.5 19.125C4.5 17.1915 7.7775 15.027 12 15.027C16.2225 15.027 19.5 17.1915 19.5 19.125C19.5 19.8443 18.2145 20.2005 13.1625 20.2455L12 20.25L10.8825 20.247C5.817 20.2103 4.5 19.8443 4.5 19.125ZM9 6.75C9 5.09315 10.3431 3.75 12 3.75C13.6569 3.75 15 5.09315 15 6.75C15 8.40685 13.6569 9.75 12 9.75C10.3431 9.75 9 8.40685 9 6.75Z"
|
|
77
|
-
}, null)]),
|
|
78
|
-
download: () => (
|
|
79
|
-
// 实心下载图标:设计稿「详情页下载量」原始路径(箭头 + 底部托盘)
|
|
80
|
-
createVNode("g", {
|
|
81
|
-
"fill": "currentColor",
|
|
82
|
-
"stroke": "none"
|
|
83
|
-
}, [createVNode("path", {
|
|
84
|
-
"fill-rule": "evenodd",
|
|
85
|
-
"clip-rule": "evenodd",
|
|
86
|
-
"d": "M11.25 13.5H7.6875L12 18L16.3125 13.5H12.75V3H11.25V13.5ZM19.5 12H21V21H3V12H4.5V19.5H19.5V12Z"
|
|
87
|
-
}, null)])
|
|
88
|
-
),
|
|
89
|
-
back: () => createVNode("g", {
|
|
90
|
-
"fill": "currentColor",
|
|
91
|
-
"stroke": "none",
|
|
92
|
-
"transform": "translate(2.74, 3.76) scale(1.2)"
|
|
93
|
-
}, [createVNode("path", {
|
|
94
|
-
"d": "M3.83177095,5.24594871 C4.0602244,5.47440869 4.08306498,5.83061605 3.90029598,6.08462021 L3.83175782,6.16518753 C3.5779134,6.41902469 3.16635617,6.41901881 2.912519,6.1651744 L0.190377671,3.44295529 L0.178511775,3.43077648 C0.161302612,3.41264792 0.145127956,3.39352776 0.130082378,3.37351059 L0.190377671,3.44295529 C0.161590153,3.41416695 0.136092993,3.3833986 0.113868819,3.35110255 C0.0995917417,3.33017175 0.0864982717,3.30852919 0.0746766273,3.28611188 C0.0292654095,3.20019745 0.00466816878,3.10620964 0.000603695422,3.01164047 C0.000208243732,3.00233175 3.64474909e-06,2.99286099 3.64474909e-06,2.98334245 C0.000336250747,2.95470912 0.00150386353,2.93496788 0.00356302865,2.91530936 L3.64474909e-06,2.98334245 C3.64474909e-06,2.9464507 0.00307705756,2.91027678 0.00898180791,2.87506278 C0.0119100067,2.85795575 0.0155561728,2.84055358 0.0199163976,2.82330214 C0.0240526844,2.80675154 0.028784588,2.79075497 0.0341019515,2.77502817 C0.0390005997,2.76052929 0.044550606,2.74581013 0.0506490237,2.73127431 C0.0582569033,2.71333431 0.0663820399,2.69623276 0.0752112443,2.67956138 C0.0807509514,2.6688148 0.0871507675,2.65749932 0.0939137641,2.64634913 C0.106428764,2.62605334 0.119478658,2.60699193 0.133478633,2.58869609 C0.139794115,2.58023299 0.14642202,2.57200602 0.153278251,2.56391211 L0.226982285,2.48983163 L2.94912362,0.156500961 C3.22168212,-0.0771272852 3.63202755,-0.0455680793 3.8656558,0.22699042 C4.09928404,0.49954892 4.06772484,0.909894354 3.79516634,1.1435226 L2.407,2.333 L9.59202675,2.33334245 C12.6180843,2.33334245 15.1778244,4.79506422 15.2957606,7.81911854 C15.4203498,11.0138765 12.7903966,13.744442 9.59202675,13.744442 L2.98271209,13.744442 C2.623727,13.744442 2.33271209,13.4534271 2.33271209,13.094442 C2.33271209,12.7354569 2.623727,12.444442 2.98271209,12.444442 L9.59202675,12.444442 C12.0529831,12.444442 14.0925682,10.3268299 13.9967481,7.86977833 C13.9060235,5.54347019 11.9198402,3.63334245 9.59202675,3.63334245 L2.219,3.633 L3.83177095,5.24594871 Z"
|
|
95
|
-
}, null)]),
|
|
96
|
-
link: () => createVNode("g", {
|
|
97
|
-
"fill": "currentColor",
|
|
98
|
-
"stroke": "none"
|
|
99
|
-
}, [createVNode("path", {
|
|
100
|
-
"fill-rule": "evenodd",
|
|
101
|
-
"clip-rule": "evenodd",
|
|
102
|
-
"d": "M20.5145 7.26396C21.1283 7.89005 21.6132 8.60958 21.9555 9.40247H21.9555C22.3163 10.2379 22.4992 11.1113 22.4992 11.9994C22.4992 12.8876 22.3162 13.7614 21.9554 14.5968C21.613 15.3897 21.1282 16.1082 20.5144 16.7348C19.9038 17.3577 19.203 17.8491 18.4316 18.1974C17.6239 18.562 16.7846 18.7448 15.9372 18.7448H13.5C13.0862 18.7448 12.7507 18.4093 12.7507 17.9955C12.7507 17.5817 13.0862 17.2462 13.5 17.2462H15.9372C16.5704 17.2462 17.2023 17.108 17.815 16.8314C18.4077 16.5638 18.9711 16.1692 19.4443 15.6866C19.9286 15.1925 20.3106 14.6261 20.5797 14.003C20.8589 13.3563 21.0006 12.6823 21.0006 11.9995C21.0006 11.3168 20.8591 10.6427 20.5797 9.99596C20.3106 9.37282 19.9286 8.80625 19.4443 8.31221C18.9711 7.82944 18.4077 7.43253 17.815 7.16499C17.2023 6.88835 16.5706 6.7475 15.9372 6.7475H13.5C13.0862 6.7475 12.7507 6.41202 12.7507 5.9982C12.7507 5.58437 13.0862 5.2489 13.5 5.2489H15.9374C16.7847 5.2489 17.624 5.43457 18.4317 5.79921C19.203 6.1478 19.9038 6.641 20.5145 7.26396ZM8.06274 17.2465H10.5C10.7677 17.2465 11.0151 17.3893 11.1489 17.6211C11.2828 17.853 11.2828 18.1386 11.1489 18.3704C11.0151 18.6023 10.7677 18.7451 10.5 18.7451H8.06274C7.21531 18.7451 6.3761 18.5623 5.56838 18.1976C4.79707 17.8494 4.09627 17.359 3.48558 16.736C2.87182 16.1099 2.38695 15.3904 2.04457 14.5975C1.6838 13.762 1.50082 12.888 1.50082 11.9999C1.50082 11.1117 1.6838 10.2376 2.04455 9.40221C2.38695 8.60975 2.87175 7.89007 3.48558 7.26354C4.0962 6.64055 4.79698 6.1478 5.56838 5.79957C6.3761 5.43483 7.2154 5.24923 8.06274 5.24923H10.5002C10.9141 5.24923 11.2495 5.5847 11.2495 5.99853C11.2495 6.41235 10.9141 6.74782 10.5002 6.74782H8.06299C7.42985 6.74782 6.79791 6.88871 6.18525 7.16532C5.59259 7.43288 5.02913 7.83021 4.55593 8.31282C4.07166 8.80683 3.68963 9.37327 3.42057 9.99633C3.14114 10.6431 2.99942 11.3171 2.99942 11.9995C2.99942 12.6819 3.14091 13.356 3.42031 14.0027C3.68937 14.6259 4.07138 15.1918 4.55569 15.6858C5.02887 16.1685 5.59233 16.5641 6.185 16.8316C6.79765 17.1083 7.42943 17.2465 8.06274 17.2465Z"
|
|
103
|
-
}, null), createVNode("path", {
|
|
104
|
-
"d": "M6.70139 11.9931C6.70139 12.4069 7.03686 12.7424 7.45068 12.7424H16.5523C16.9662 12.7424 17.3016 12.4069 17.3016 11.9931C17.3016 11.5792 16.9662 11.2438 16.5523 11.2438H7.45068C7.25196 11.2438 7.06137 11.3227 6.92085 11.4632C6.78033 11.6038 6.70139 11.7943 6.70139 11.9931H6.70139Z"
|
|
105
|
-
}, null)]),
|
|
106
|
-
folder: () => createVNode("path", {
|
|
107
|
-
"d": "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"
|
|
108
|
-
}, null),
|
|
109
|
-
"folder-open": () => createVNode("path", {
|
|
110
|
-
"d": "m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"
|
|
111
|
-
}, null),
|
|
112
|
-
file: () => createVNode("path", {
|
|
113
|
-
"d": "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"
|
|
114
|
-
}, null),
|
|
115
|
-
"file-code": () => createVNode(Fragment, null, [createVNode("path", {
|
|
116
|
-
"d": "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"
|
|
117
|
-
}, null), createVNode("path", {
|
|
118
|
-
"d": "M14 2v4a2 2 0 0 0 2 2h4"
|
|
119
|
-
}, null), createVNode("path", {
|
|
120
|
-
"d": "m10 13-2 2 2 2"
|
|
121
|
-
}, null), createVNode("path", {
|
|
122
|
-
"d": "m14 17 2-2-2-2"
|
|
123
|
-
}, null)]),
|
|
124
|
-
"file-json": () => createVNode(Fragment, null, [createVNode("path", {
|
|
125
|
-
"d": "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"
|
|
126
|
-
}, null), createVNode("path", {
|
|
127
|
-
"d": "M14 2v4a2 2 0 0 0 2 2h4"
|
|
128
|
-
}, null), createVNode("path", {
|
|
129
|
-
"d": "M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1"
|
|
130
|
-
}, null), createVNode("path", {
|
|
131
|
-
"d": "M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1"
|
|
132
|
-
}, null)]),
|
|
133
|
-
"file-text": () => createVNode(Fragment, null, [createVNode("path", {
|
|
134
|
-
"d": "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"
|
|
135
|
-
}, null), createVNode("path", {
|
|
136
|
-
"d": "M14 2v4a2 2 0 0 0 2 2h4"
|
|
137
|
-
}, null), createVNode("path", {
|
|
138
|
-
"d": "M16 13H8"
|
|
139
|
-
}, null), createVNode("path", {
|
|
140
|
-
"d": "M16 17H8"
|
|
141
|
-
}, null), createVNode("path", {
|
|
142
|
-
"d": "M10 9H8"
|
|
143
|
-
}, null)]),
|
|
144
|
-
terminal: () => createVNode(Fragment, null, [createVNode("path", {
|
|
145
|
-
"d": "m4 17 6-6-6-6"
|
|
146
|
-
}, null), createVNode("path", {
|
|
147
|
-
"d": "M12 19h8"
|
|
148
|
-
}, null)]),
|
|
149
|
-
shield: () => createVNode("path", {
|
|
150
|
-
"d": "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"
|
|
151
|
-
}, null),
|
|
152
|
-
wrench: () => createVNode("path", {
|
|
153
|
-
"d": "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"
|
|
154
|
-
}, null),
|
|
155
|
-
plus: () => createVNode(Fragment, null, [createVNode("path", {
|
|
156
|
-
"d": "M5 12h14"
|
|
157
|
-
}, null), createVNode("path", {
|
|
158
|
-
"d": "M12 5v14"
|
|
159
|
-
}, null)]),
|
|
160
|
-
bell: () => createVNode(Fragment, null, [createVNode("path", {
|
|
161
|
-
"d": "M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"
|
|
162
|
-
}, null), createVNode("path", {
|
|
163
|
-
"d": "M10.3 21a1.94 1.94 0 0 0 3.4 0"
|
|
164
|
-
}, null)]),
|
|
165
|
-
settings: () => (
|
|
166
|
-
// 后台管理齿轮:设计稿「ico-后台管理」原始路径(20px 视口等比放大到 24px 并居中)
|
|
167
|
-
createVNode("g", {
|
|
168
|
-
"fill": "currentColor",
|
|
169
|
-
"stroke": "none",
|
|
170
|
-
"transform": "translate(-1.116, -1.116) scale(1.2)"
|
|
171
|
-
}, [createVNode("path", {
|
|
172
|
-
"d": "M10.9311387,2.9311394 C11.2993286,2.9311394 11.5978054,3.22961623 11.5978054,3.59780607 L11.5978054,4.9311394 L11.5945745,4.96740231 C12.2087247,5.03495729 12.7949718,5.19520204 13.3390221,5.43384298 L13.3531294,5.40561682 L14.0197961,4.24561682 C14.2032591,3.9263911 14.6107689,3.81633371 14.9299953,3.99979561 C15.2492204,4.18325983 15.3592777,4.5907696 15.1758147,4.90999532 L14.509148,6.06999532 L14.4892657,6.09953088 C14.9748702,6.45774086 15.4045373,6.88740795 15.7627472,7.3730124 L15.7922828,7.3531301 L16.9522828,6.68646344 C17.2715085,6.50300038 17.6790183,6.61305776 17.8624813,6.93228348 C18.0459444,7.2515092 17.935887,7.65901897 17.6166613,7.84248203 L16.4566613,8.5091487 L16.4284351,8.52325605 C16.6666901,9.06642649 16.8268023,9.65165731 16.8945473,10.2647242 L18.2644721,10.2644727 C18.5991901,10.2644727 18.8762941,10.5111478 18.9239103,10.8326243 L18.9311387,10.9311394 C18.9311387,11.2993292 18.6326619,11.5978061 18.2644721,11.5978061 L16.8945473,11.5975546 C16.8268023,12.2106215 16.6666901,12.7958523 16.4284351,13.3390227 L16.4566613,13.3531301 L17.6166613,14.0197968 C17.935887,14.2032598 18.0459444,14.6107696 17.8624825,14.929996 C17.6790183,15.249221 17.2715085,15.3592784 16.9522828,15.1758154 L15.7922828,14.5091487 L15.7627472,14.4892664 C15.4045373,14.9748709 14.9748702,15.4045379 14.4892657,15.7627479 L14.509148,15.7922835 L15.1758147,16.9522835 C15.3592777,17.2715092 15.2492204,17.679019 14.9299946,17.862482 C14.6107689,18.0459451 14.2032591,17.9358877 14.0197961,17.616662 L13.3531294,16.456662 L13.3390221,16.4284358 C12.7949718,16.6670768 12.2087247,16.8273215 11.5945745,16.8948765 L11.5972767,16.912803 L11.5978054,18.2644727 C11.5978054,18.6326626 11.2993286,18.9311394 10.9311387,18.9311394 C10.5629489,18.9311394 10.2644721,18.6326626 10.2644721,18.2644727 L10.2644721,16.9311394 L10.2677029,16.8948765 C9.65506132,16.8274875 9.07018597,16.6678635 8.52726537,16.430193 L7.84187867,17.6177085 C7.67456866,17.9076111 7.32240952,18.0243122 7.02017438,17.9048619 L6.93123633,17.8618794 C6.61237459,17.6777844 6.50302443,17.2701299 6.68706544,16.951237 L7.37201261,15.7620108 C6.88681791,15.4039485 6.4574945,14.9745378 6.0995302,14.4892664 L6.06999464,14.5091487 L4.90999464,15.1758154 C4.59076892,15.3592784 4.18325915,15.249221 3.99979609,14.9299953 C3.81633303,14.6107696 3.92639042,14.2032598 4.24561614,14.0197968 L5.40561614,13.3531301 L5.4338423,13.3390227 C5.19520136,12.7949725 5.03495661,12.2087254 4.96740163,11.5945752 L4.93113872,11.5978061 L3.59780539,11.5978061 C3.22961555,11.5978061 2.93113872,11.2993292 2.93113872,10.9311394 C2.93113872,10.5629496 3.22961555,10.2644727 3.59780539,10.2644727 L4.93113872,10.2644727 L4.96740163,10.2677036 C5.03495661,9.6535534 5.19520136,9.06730634 5.4338423,8.52325605 L5.40561614,8.5091487 L4.24561614,7.84248203 C3.92639042,7.65901897 3.81633303,7.2515092 3.99979493,6.93228281 C4.18325915,6.61305776 4.59076892,6.50300038 4.90999464,6.68646344 L6.06999464,7.3531301 L6.0995302,7.3730124 C6.45774018,6.88740795 6.88740727,6.45774086 7.37301172,6.09953088 L6.68706544,4.91104178 C6.51975543,4.62113918 6.59489174,4.25783525 6.84952455,4.05590315 L6.93123634,4.00039945 C7.2501292,3.81635844 7.65783766,3.92567748 7.84187867,4.24457035 L8.52726537,5.43208579 C9.07018597,5.19441535 9.65506132,5.03479135 10.2677029,4.96740231 L10.2650007,4.94947584 L10.2644721,3.59780607 C10.2644721,3.22961623 10.5629489,2.9311394 10.9311387,2.9311394 Z M15.5505649,11.5976747 L11.3148054,11.5978061 L9.19922144,15.2658633 C9.73472422,15.480013 10.3191754,15.5978061 10.9311387,15.5978061 C13.2821655,15.5978061 15.227135,13.8592682 15.5505649,11.5976747 Z M6.26447205,10.9311394 C6.26447205,12.4184152 6.96022013,13.7431903 8.04400004,14.5977485 L10.1608054,10.9308061 L8.04400004,7.26453032 C6.96022013,8.11908851 6.26447205,9.44386362 6.26447205,10.9311394 Z M10.9311387,6.26447273 C10.3191754,6.26447273 9.73472422,6.3822658 9.19922144,6.59641552 L11.3148054,10.2638061 L15.5505649,10.2646041 C15.227135,8.00301062 13.2821655,6.26447273 10.9311387,6.26447273 Z"
|
|
173
|
-
}, null)])
|
|
174
|
-
),
|
|
175
|
-
logout: () => createVNode(Fragment, null, [createVNode("path", {
|
|
176
|
-
"d": "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"
|
|
177
|
-
}, null), createVNode("path", {
|
|
178
|
-
"d": "m16 17 5-5-5-5"
|
|
179
|
-
}, null), createVNode("path", {
|
|
180
|
-
"d": "M21 12H9"
|
|
181
|
-
}, null)]),
|
|
182
|
-
home: () => createVNode(Fragment, null, [createVNode("path", {
|
|
183
|
-
"d": "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"
|
|
184
|
-
}, null), createVNode("path", {
|
|
185
|
-
"d": "M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"
|
|
186
|
-
}, null)]),
|
|
187
|
-
workbench: () => createVNode(Fragment, null, [createVNode("rect", {
|
|
188
|
-
"x": "3",
|
|
189
|
-
"y": "3",
|
|
190
|
-
"width": "7",
|
|
191
|
-
"height": "7",
|
|
192
|
-
"rx": "1"
|
|
193
|
-
}, null), createVNode("rect", {
|
|
194
|
-
"x": "14",
|
|
195
|
-
"y": "3",
|
|
196
|
-
"width": "7",
|
|
197
|
-
"height": "7",
|
|
198
|
-
"rx": "1"
|
|
199
|
-
}, null), createVNode("rect", {
|
|
200
|
-
"x": "14",
|
|
201
|
-
"y": "14",
|
|
202
|
-
"width": "7",
|
|
203
|
-
"height": "7",
|
|
204
|
-
"rx": "1"
|
|
205
|
-
}, null), createVNode("rect", {
|
|
206
|
-
"x": "3",
|
|
207
|
-
"y": "14",
|
|
208
|
-
"width": "7",
|
|
209
|
-
"height": "7",
|
|
210
|
-
"rx": "1"
|
|
211
|
-
}, null)]),
|
|
212
|
-
"grid-dots": () => createVNode("g", {
|
|
213
|
-
"fill": "currentColor",
|
|
214
|
-
"stroke": "none"
|
|
215
|
-
}, [createVNode("circle", {
|
|
216
|
-
"cx": "5",
|
|
217
|
-
"cy": "5",
|
|
218
|
-
"r": "1.5"
|
|
219
|
-
}, null), createVNode("circle", {
|
|
220
|
-
"cx": "12",
|
|
221
|
-
"cy": "5",
|
|
222
|
-
"r": "1.5"
|
|
223
|
-
}, null), createVNode("circle", {
|
|
224
|
-
"cx": "19",
|
|
225
|
-
"cy": "5",
|
|
226
|
-
"r": "1.5"
|
|
227
|
-
}, null), createVNode("circle", {
|
|
228
|
-
"cx": "5",
|
|
229
|
-
"cy": "12",
|
|
230
|
-
"r": "1.5"
|
|
231
|
-
}, null), createVNode("circle", {
|
|
232
|
-
"cx": "12",
|
|
233
|
-
"cy": "12",
|
|
234
|
-
"r": "1.5"
|
|
235
|
-
}, null), createVNode("circle", {
|
|
236
|
-
"cx": "19",
|
|
237
|
-
"cy": "12",
|
|
238
|
-
"r": "1.5"
|
|
239
|
-
}, null), createVNode("circle", {
|
|
240
|
-
"cx": "5",
|
|
241
|
-
"cy": "19",
|
|
242
|
-
"r": "1.5"
|
|
243
|
-
}, null), createVNode("circle", {
|
|
244
|
-
"cx": "12",
|
|
245
|
-
"cy": "19",
|
|
246
|
-
"r": "1.5"
|
|
247
|
-
}, null), createVNode("circle", {
|
|
248
|
-
"cx": "19",
|
|
249
|
-
"cy": "19",
|
|
250
|
-
"r": "1.5"
|
|
251
|
-
}, null)]),
|
|
252
|
-
heart: () => (
|
|
253
|
-
// 空心爱心:设计稿「ico-详情未订阅」原始路径(订阅/收藏态,evenodd 外轮廓减内轮廓)
|
|
254
|
-
createVNode("g", {
|
|
255
|
-
"fill": "currentColor",
|
|
256
|
-
"stroke": "none"
|
|
257
|
-
}, [createVNode("path", {
|
|
258
|
-
"fill-rule": "evenodd",
|
|
259
|
-
"clip-rule": "evenodd",
|
|
260
|
-
"d": "M12.0409 5.54069C13.1383 4.44662 14.682 3.87338 16.2685 4.02409C18.2956 4.21669 20.0315 5.55741 20.7294 7.47037C21.4272 9.38357 20.9627 11.5281 19.5272 12.9889L12.4872 19.9489C12.1756 20.257 11.6739 20.257 11.3622 19.9489L4.31436 12.9801C2.88709 11.5275 2.42223 9.38356 3.12002 7.47037C3.81793 5.55742 5.55377 4.21666 7.58096 4.02409C9.16741 3.87341 10.7111 4.44659 11.8085 5.54069L11.9247 5.66178L12.0409 5.54069ZM16.1171 5.61686C14.7042 5.48264 13.34 6.17249 12.6112 7.3903C12.3007 7.90932 11.5487 7.90932 11.2382 7.3903C10.5094 6.17249 9.14517 5.48271 7.73232 5.61686C6.31932 5.75109 5.10929 6.68575 4.62295 8.0192C4.13664 9.35264 4.46057 10.847 5.44717 11.8512L11.9247 18.2546L18.3944 11.859C19.3305 10.9062 19.672 9.52611 19.3036 8.25553L19.2265 8.0192C18.7401 6.68576 17.5301 5.75109 16.1171 5.61686Z"
|
|
261
|
-
}, null)])
|
|
262
|
-
),
|
|
263
|
-
// 页头图标(MH后台-0911 node 0:3904 完整还原):蓝色圆角底 + 白色文档/云朵图形。
|
|
264
|
-
// 底与切割线用 currentColor(随使用处 color 换色,不写死主色);图形恒白(彩底上白图形永远成立);
|
|
265
|
-
// 切割线 mask 还原图形分隔;26 坐标缩放至 24 viewBox。
|
|
266
|
-
"page-title": () => createVNode("g", {
|
|
267
|
-
"transform": "scale(0.9230769)",
|
|
268
|
-
"stroke": "none"
|
|
269
|
-
}, [createVNode("rect", {
|
|
270
|
-
"width": "26",
|
|
271
|
-
"height": "26",
|
|
272
|
-
"rx": "4",
|
|
273
|
-
"fill": "currentColor"
|
|
274
|
-
}, null), createVNode("path", {
|
|
275
|
-
"fill": "#fff",
|
|
276
|
-
"fill-rule": "evenodd",
|
|
277
|
-
"clip-rule": "evenodd",
|
|
278
|
-
"d": "M6.78947 6C6.35346 6 6 6.35346 6 6.78947V19.2105C6 19.6465 6.35346 20 6.78947 20H15.8182H16.2045C16.1524 20 16.1016 19.9947 16.0525 19.9846C15.9758 19.9948 15.8976 20 15.8182 20C14.814 20 14 19.1605 14 18.125C14 17.0895 14.814 16.25 15.8182 16.25C15.9428 16.25 16.0645 16.2629 16.1821 16.2876L16.1818 16.25C16.1818 15.0074 17.1587 14 18.3636 14C18.4543 14 18.5438 14.0057 18.6316 14.0168V6.78947C18.6316 6.35346 18.2781 6 17.8421 6H6.78947ZM15.8684 8.72222H8.76316V9.88889H15.8684V8.72222ZM8.76316 11.4444H12.7105V12.6111H8.76316V11.4444Z"
|
|
279
|
-
}, null), createVNode("g", {
|
|
280
|
-
"opacity": 0.8
|
|
281
|
-
}, [createVNode("mask", {
|
|
282
|
-
"id": "ak-icon-page-title-cut",
|
|
283
|
-
"maskUnits": "userSpaceOnUse",
|
|
284
|
-
"x": "12",
|
|
285
|
-
"y": "12",
|
|
286
|
-
"width": "12",
|
|
287
|
-
"height": "10",
|
|
288
|
-
"fill": "black"
|
|
289
|
-
}, [createVNode("rect", {
|
|
290
|
-
"fill": "white",
|
|
291
|
-
"x": "12",
|
|
292
|
-
"y": "12",
|
|
293
|
-
"width": "12",
|
|
294
|
-
"height": "10"
|
|
295
|
-
}, null), createVNode("path", {
|
|
296
|
-
"fill-rule": "evenodd",
|
|
297
|
-
"clip-rule": "evenodd",
|
|
298
|
-
"d": "M16.0525 19.9846C15.9758 19.9948 15.8976 20 15.8182 20C14.814 20 14 19.1605 14 18.125C14 17.0895 14.814 16.25 15.8182 16.25C15.9428 16.25 16.0645 16.2629 16.1821 16.2876L16.1818 16.25C16.1818 15.0074 17.1587 14 18.3636 14C19.5686 14 20.5455 15.0074 20.5455 16.25L20.5452 16.2874C21.3752 16.4611 22 17.2178 22 18.125C22 19.1605 21.186 20 20.1818 20C20.1772 20 20.1726 20 20.1681 19.9999C20.1651 20 20.1621 20 20.1591 20H16.2045C16.1524 20 16.1016 19.9947 16.0525 19.9846Z"
|
|
299
|
-
}, null)]), createVNode("path", {
|
|
300
|
-
"fill": "#fff",
|
|
301
|
-
"fill-rule": "evenodd",
|
|
302
|
-
"clip-rule": "evenodd",
|
|
303
|
-
"d": "M16.0525 19.9846C15.9758 19.9948 15.8976 20 15.8182 20C14.814 20 14 19.1605 14 18.125C14 17.0895 14.814 16.25 15.8182 16.25C15.9428 16.25 16.0645 16.2629 16.1821 16.2876L16.1818 16.25C16.1818 15.0074 17.1587 14 18.3636 14C19.5686 14 20.5455 15.0074 20.5455 16.25L20.5452 16.2874C21.3752 16.4611 22 17.2178 22 18.125C22 19.1605 21.186 20 20.1818 20C20.1772 20 20.1726 20 20.1681 19.9999C20.1651 20 20.1621 20 20.1591 20H16.2045C16.1524 20 16.1016 19.9947 16.0525 19.9846Z"
|
|
304
|
-
}, null), createVNode("path", {
|
|
305
|
-
"fill": "currentColor",
|
|
306
|
-
"fill-rule": "evenodd",
|
|
307
|
-
"clip-rule": "evenodd",
|
|
308
|
-
"mask": "url(#ak-icon-page-title-cut)",
|
|
309
|
-
"d": "M16.0525 19.9846C15.9758 19.9948 15.8976 20 15.8182 20C14.814 20 14 19.1605 14 18.125C14 17.0895 14.814 16.25 15.8182 16.25C15.9428 16.25 16.0645 16.2629 16.1821 16.2876L16.1818 16.25C16.1818 15.0074 17.1587 14 18.3636 14C19.5686 14 20.5455 15.0074 20.5455 16.25L20.5452 16.2874C21.3752 16.4611 22 17.2178 22 18.125C22 19.1605 21.186 20 20.1818 20C20.1772 20 20.1726 20 20.1681 19.9999C20.1651 20 20.1621 20 20.1591 20H16.2045C16.1524 20 16.1016 19.9947 16.0525 19.9846Z"
|
|
310
|
-
}, null)])]),
|
|
311
|
-
"heart-filled": () => (
|
|
312
|
-
// 实心爱心:上路径的外轮廓子路径(已订阅态填充色由调用方 currentColor 控制)
|
|
313
|
-
createVNode("g", {
|
|
314
|
-
"fill": "currentColor",
|
|
315
|
-
"stroke": "none"
|
|
316
|
-
}, [createVNode("path", {
|
|
317
|
-
"d": "M12.0409 5.54069C13.1383 4.44662 14.682 3.87338 16.2685 4.02409C18.2956 4.21669 20.0315 5.55741 20.7294 7.47037C21.4272 9.38357 20.9627 11.5281 19.5272 12.9889L12.4872 19.9489C12.1756 20.257 11.6739 20.257 11.3622 19.9489L4.31436 12.9801C2.88709 11.5275 2.42223 9.38356 3.12002 7.47037C3.81793 5.55742 5.55377 4.21666 7.58096 4.02409C9.16741 3.87341 10.7111 4.44659 11.8085 5.54069L11.9247 5.66178L12.0409 5.54069Z"
|
|
318
|
-
}, null)])
|
|
319
|
-
)
|
|
320
|
-
};
|
|
321
|
-
const IconNameList = Object.keys(IconMap);
|
|
322
|
-
const useIconContent = () => {
|
|
323
|
-
const getIconContent = (name) => IconMap[name];
|
|
324
|
-
return {
|
|
325
|
-
IconMap,
|
|
326
|
-
getIconContent
|
|
327
|
-
};
|
|
328
|
-
};
|
|
329
|
-
export {
|
|
330
|
-
IconNameList,
|
|
331
|
-
useIconContent
|
|
332
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Icon 组件(原生 SVG):
|
|
3
|
-
* - name 指定内置图标
|
|
4
|
-
* - size 控制尺寸(默认 16px,同时设置 width/height),也可经 class / style 覆盖
|
|
5
|
-
* - stroke 继承 currentColor,随文字颜色
|
|
6
|
-
* - 基底样式为内联 style(`display:inline-block` + `flex-shrink:0`),不含任何 CSS 框架类名
|
|
7
|
-
*/
|
|
8
|
-
export declare const Icon: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
9
|
-
readonly name: {
|
|
10
|
-
readonly type: import("vue").PropType<import(".").IconName>;
|
|
11
|
-
readonly required: true;
|
|
12
|
-
};
|
|
13
|
-
readonly size: {
|
|
14
|
-
readonly type: import("vue").PropType<number | string>;
|
|
15
|
-
readonly default: 16;
|
|
16
|
-
};
|
|
17
|
-
readonly class: {
|
|
18
|
-
readonly type: StringConstructor;
|
|
19
|
-
readonly default: undefined;
|
|
20
|
-
};
|
|
21
|
-
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
|
-
readonly name: {
|
|
23
|
-
readonly type: import("vue").PropType<import(".").IconName>;
|
|
24
|
-
readonly required: true;
|
|
25
|
-
};
|
|
26
|
-
readonly size: {
|
|
27
|
-
readonly type: import("vue").PropType<number | string>;
|
|
28
|
-
readonly default: 16;
|
|
29
|
-
};
|
|
30
|
-
readonly class: {
|
|
31
|
-
readonly type: StringConstructor;
|
|
32
|
-
readonly default: undefined;
|
|
33
|
-
};
|
|
34
|
-
}>> & Readonly<{}>, {
|
|
35
|
-
readonly size: string | number;
|
|
36
|
-
readonly class: string;
|
|
37
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
package/dist/icon.components.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { defineComponent, createVNode } from "vue";
|
|
2
|
-
import { iconProps } from "./icon.props.js";
|
|
3
|
-
import { useIconContent } from "./composables/use-icon-content.js";
|
|
4
|
-
const BASE_STYLE = {
|
|
5
|
-
display: "inline-block",
|
|
6
|
-
flexShrink: "0"
|
|
7
|
-
};
|
|
8
|
-
const Icon = /* @__PURE__ */ defineComponent({
|
|
9
|
-
name: "AIcon",
|
|
10
|
-
props: iconProps,
|
|
11
|
-
setup(props) {
|
|
12
|
-
const {
|
|
13
|
-
getIconContent
|
|
14
|
-
} = useIconContent();
|
|
15
|
-
return () => {
|
|
16
|
-
const content = getIconContent(props.name);
|
|
17
|
-
return createVNode("svg", {
|
|
18
|
-
"viewBox": "0 0 24 24",
|
|
19
|
-
"data-slot": "icon",
|
|
20
|
-
"width": props.size,
|
|
21
|
-
"height": props.size,
|
|
22
|
-
"fill": "none",
|
|
23
|
-
"stroke": "currentColor",
|
|
24
|
-
"stroke-width": 2,
|
|
25
|
-
"stroke-linecap": "round",
|
|
26
|
-
"stroke-linejoin": "round",
|
|
27
|
-
"aria-hidden": "true",
|
|
28
|
-
"style": BASE_STYLE,
|
|
29
|
-
"class": props.class
|
|
30
|
-
}, [content?.()]);
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
export {
|
|
35
|
-
Icon
|
|
36
|
-
};
|
package/dist/icon.props.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
-
import type { IconName } from './composables/use-icon-content';
|
|
3
|
-
/** Icon 组件的 props 定义 */
|
|
4
|
-
export declare const iconProps: {
|
|
5
|
-
readonly name: {
|
|
6
|
-
readonly type: PropType<IconName>;
|
|
7
|
-
readonly required: true;
|
|
8
|
-
};
|
|
9
|
-
/** 尺寸(px),同时设置 width 与 height,默认 16 */
|
|
10
|
-
readonly size: {
|
|
11
|
-
readonly type: PropType<number | string>;
|
|
12
|
-
readonly default: 16;
|
|
13
|
-
};
|
|
14
|
-
readonly class: {
|
|
15
|
-
readonly type: StringConstructor;
|
|
16
|
-
readonly default: undefined;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
/** Icon 组件 props 类型(由 iconProps 经 ExtractPropTypes 解析推导) */
|
|
20
|
-
export type IconProps = ExtractPropTypes<typeof iconProps>;
|
package/dist/icon.props.js
DELETED