naive-icons 1.0.1 → 1.0.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/CHANGELOG.md CHANGED
@@ -17,6 +17,13 @@
17
17
  - 详情弹窗支持键盘方向键连续切换图标,打开时背景内容设为 inert
18
18
  - 无障碍补强:skip link、aria-live 结果计数、标签页方向键切换、焦点归还
19
19
 
20
+ ## 1.0.2
21
+
22
+ 修复
23
+
24
+ - 修复组件不传 `size` 时没有明确尺寸的问题:`normalizeIconProps` 现在始终向 svg 写入 `width` / `height`,默认 24,保证 `<HomeIcon />` 也有稳定的 24px 尺寸
25
+ - 顺手补上默认 `fill="none"`,避免与 SVG 内部已有的 `fill` 属性在覆盖时产生歧义
26
+
20
27
  ## 1.0.1
21
28
 
22
29
  修复
package/README.en.md CHANGED
@@ -1,3 +1,5 @@
1
+ <h1>Naive Icons</h1>
2
+
1
3
  <p align="right">
2
4
  <a href="./README.md">中文</a> | <a href="./README.en.md">English</a>
3
5
  </p>
@@ -6,10 +8,20 @@
6
8
  <img src="assets/logo.svg" alt="Naive Icons" width="132" height="132">
7
9
  </p>
8
10
 
9
- <h1 align="center">Naive Icons</h1>
10
-
11
11
  <p align="center">Hand-drawn "naive folk art" style SVG icon library, built for React and TypeScript</p>
12
12
 
13
+ <p align="center">
14
+ <a href="https://github.com/guokaigdg/naive-icons/stargazers"><img src="https://img.shields.io/github/stars/guokaigdg/naive-icons?style=flat-square&color=E9C46A" alt="GitHub stars"></a>
15
+ <a href="https://www.npmjs.com/package/naive-icons"><img src="https://img.shields.io/npm/v/naive-icons?style=flat-square&color=E76F51" alt="npm version"></a>
16
+ <a href="https://www.npmjs.com/package/naive-icons"><img src="https://img.shields.io/npm/dm/naive-icons?style=flat-square&color=2A9D8F" alt="npm downloads"></a>
17
+ <a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-264653?style=flat-square" alt="license: MIT"></a>
18
+ <br/>
19
+ <img src="https://img.shields.io/badge/React-61DAFB?style=flat-square&logo=react&logoColor=black" alt="React">
20
+ <img src="https://img.shields.io/badge/TypeScript-3178C6?style=flat-square&logo=typescript&logoColor=white" alt="TypeScript">
21
+ <img src="https://img.shields.io/badge/SVG-FFB13B?style=flat-square&logoColor=black" alt="SVG">
22
+ </p>
23
+
24
+
13
25
  Naive Icons is a hand-drawn SVG icon library with a naive folk art style, built for React and TypeScript. All 101 icons are AI-generated original works.
14
26
 
15
27
  Each icon is drawn on a 48x48 grid with a 3.5 stroke, rounded line caps, and a unified retro palette — keeping the charming clumsiness and warmth of hand-drawn illustration. Some icons even feature a pair of dot eyes and a little smile, adding a touch of humanity to your interface.
package/README.md CHANGED
@@ -1,3 +1,6 @@
1
+
2
+ <h1>Naive Icons</h1>
3
+
1
4
  <p align="right">
2
5
  <a href="./README.md">中文</a> | <a href="./README.en.md">English</a>
3
6
  </p>
@@ -6,10 +9,20 @@
6
9
  <img src="assets/logo.svg" alt="Naive Icons" width="132" height="132">
7
10
  </p>
8
11
 
9
- <h1 align="center">Naive Icons</h1>
10
12
 
11
13
  <p align="center">手绘 naive folk art 风格的 SVG 图标库,为 React 与 TypeScript 打造</p>
12
14
 
15
+ <p align="center">
16
+ <a href="https://github.com/guokaigdg/naive-icons/stargazers"><img src="https://img.shields.io/github/stars/guokaigdg/naive-icons?style=flat-square&color=E9C46A" alt="GitHub stars"></a>
17
+ <a href="https://www.npmjs.com/package/naive-icons"><img src="https://img.shields.io/npm/v/naive-icons?style=flat-square&color=E76F51" alt="npm version"></a>
18
+ <a href="https://www.npmjs.com/package/naive-icons"><img src="https://img.shields.io/npm/dm/naive-icons?style=flat-square&color=2A9D8F" alt="npm downloads"></a>
19
+ <a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-264653?style=flat-square" alt="license: MIT"></a>
20
+ <br/>
21
+ <img src="https://img.shields.io/badge/React-61DAFB?style=flat-square&logo=react&logoColor=black" alt="React">
22
+ <img src="https://img.shields.io/badge/TypeScript-3178C6?style=flat-square&logo=typescript&logoColor=white" alt="TypeScript">
23
+ <img src="https://img.shields.io/badge/SVG-FFB13B?style=flat-square&logoColor=black" alt="SVG">
24
+ </p>
25
+
13
26
  Naive Icons 是一套手绘 naive folk art 风格的 SVG 图标库,为 React 与 TypeScript 打造。全部 101 个图标由 AI 生成,均为原创作品。
14
27
 
15
28
  每一个图标都建立在 48x48 的网格上,使用 3.5 的粗描边、圆角线帽与统一的复古调色板,并保留了手绘插画特有的笨拙感与温度——部分图标还带有一对小圆点眼睛和微笑,让界面多一点点人情味。
package/dist/index.js CHANGED
@@ -4,12 +4,11 @@ var jsxRuntime = require('react/jsx-runtime');
4
4
 
5
5
  // src/iconProps.ts
6
6
  function normalizeIconProps(props) {
7
- const { size, color, strokeWidth, ...rest } = props;
7
+ const { size = 24, color, strokeWidth, fill = "none", ...rest } = props;
8
8
  const svgProps = { ...rest };
9
- if (size !== void 0 && size !== null) {
10
- svgProps.width = size;
11
- svgProps.height = size;
12
- }
9
+ svgProps.width = size;
10
+ svgProps.height = size;
11
+ svgProps.fill = fill;
13
12
  if (color !== void 0 && color !== null) {
14
13
  svgProps.stroke = color;
15
14
  }