@yakit-libs/yakit-ui-icons 0.1.2
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/LICENSE +21 -0
- package/README.md +35 -0
- package/dist/createIcon-DLie83v6.js +21 -0
- package/dist/createIcon.d.ts +6 -0
- package/dist/figmaNameCatalog.d.ts +10758 -0
- package/dist/index-C7cW06K3.js +632 -0
- package/dist/index-DXCBgsiK.js +940 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +642 -0
- package/dist/loading/index.d.ts +8 -0
- package/dist/outline/index.d.ts +346 -0
- package/dist/outline/index.js +346 -0
- package/dist/registry.d.ts +28 -0
- package/dist/registry.js +4243 -0
- package/dist/solid/index.d.ts +255 -0
- package/dist/solid/index.js +259 -0
- package/dist/types.d.ts +6 -0
- package/package.json +65 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 yaklang.io Project
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# @yakit-libs/yakit-ui-icons
|
|
2
|
+
|
|
3
|
+
Yakit UI 的 React-only 图标包。它不依赖 Ant Design、`@ant-design/cssinjs`、Emotion 或 ReactDOM。
|
|
4
|
+
|
|
5
|
+
## 安装
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @yakit-libs/yakit-ui-icons react
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 使用
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { HomeFilled, HomeOutlined } from "@yakit-libs/yakit-ui-icons";
|
|
15
|
+
|
|
16
|
+
export const HomeEntry = () => (
|
|
17
|
+
<button type="button">
|
|
18
|
+
<HomeOutlined aria-hidden size={16} />
|
|
19
|
+
<HomeFilled aria-label="首页" size={16} />
|
|
20
|
+
</button>
|
|
21
|
+
);
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
也可以按图标家族导入:
|
|
25
|
+
|
|
26
|
+
```tsx
|
|
27
|
+
import { HomeOutlined } from "@yakit-libs/yakit-ui-icons/outline";
|
|
28
|
+
import { HomeFilled } from "@yakit-libs/yakit-ui-icons/solid";
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
完整注册表是显式的重入口,仅在图标浏览器等需要枚举所有图标的场景使用:
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
import { iconRegistry } from "@yakit-libs/yakit-ui-icons/registry";
|
|
35
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
// @__NO_SIDE_EFFECTS__
|
|
3
|
+
function b(t, r, i = "#353639") {
|
|
4
|
+
const c = t, o = ({ size: a, color: l, style: n, ...e }) => {
|
|
5
|
+
const d = a === void 0 ? void 0 : { height: a, width: a };
|
|
6
|
+
return /* @__PURE__ */ s(
|
|
7
|
+
c,
|
|
8
|
+
{
|
|
9
|
+
"aria-hidden": e["aria-label"] || e["aria-labelledby"] ? void 0 : !0,
|
|
10
|
+
focusable: "false",
|
|
11
|
+
...d,
|
|
12
|
+
...e,
|
|
13
|
+
style: { color: l ?? i, ...n }
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
return o.displayName = r, o;
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
b as c
|
|
21
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { IconProps } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Turns a Figma-exported SVG into an icon component with an Ant Design-like API.
|
|
5
|
+
*/
|
|
6
|
+
export declare function createIcon(svg: unknown, displayName: string, defaultColor?: string): ComponentType<IconProps>;
|