@honeyicons/react 0.0.4 → 0.0.5
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 +76 -18
- package/dist/catalog.js +39 -39
- package/dist/categories.d.ts +1 -1
- package/dist/categories.js +0 -2
- package/dist/create-icon.d.ts +4 -2
- package/dist/create-icon.js +12 -5
- package/dist/icon-base.d.ts +14 -0
- package/dist/icon-base.js +61 -0
- package/dist/icon.d.ts +13 -19
- package/dist/icon.js +11 -68
- package/dist/icons/alert-triangle.d.ts +0 -2
- package/dist/icons/alert-triangle.js +1 -3
- package/dist/icons/archive.d.ts +0 -2
- package/dist/icons/archive.js +1 -3
- package/dist/icons/arrow-down.d.ts +0 -2
- package/dist/icons/arrow-down.js +1 -3
- package/dist/icons/arrow-left.d.ts +0 -2
- package/dist/icons/arrow-left.js +1 -3
- package/dist/icons/arrow-right.d.ts +0 -2
- package/dist/icons/arrow-right.js +1 -3
- package/dist/icons/arrow-up.d.ts +0 -2
- package/dist/icons/arrow-up.js +1 -3
- package/dist/icons/bookmarks.d.ts +0 -2
- package/dist/icons/bookmarks.js +1 -3
- package/dist/icons/broadcast.d.ts +0 -2
- package/dist/icons/broadcast.js +1 -3
- package/dist/icons/calendar.d.ts +0 -2
- package/dist/icons/calendar.js +1 -3
- package/dist/icons/check-double.d.ts +0 -2
- package/dist/icons/check-double.js +0 -2
- package/dist/icons/chevrons-down.d.ts +0 -2
- package/dist/icons/chevrons-down.js +0 -2
- package/dist/icons/chevrons-left.d.ts +0 -2
- package/dist/icons/chevrons-left.js +0 -2
- package/dist/icons/chevrons-right.d.ts +0 -2
- package/dist/icons/chevrons-right.js +0 -2
- package/dist/icons/chevrons-up.d.ts +0 -2
- package/dist/icons/chevrons-up.js +0 -2
- package/dist/icons/door-open.d.ts +0 -2
- package/dist/icons/door-open.js +1 -3
- package/dist/icons/edit.d.ts +0 -2
- package/dist/icons/edit.js +1 -3
- package/dist/icons/eye-closed.d.ts +0 -2
- package/dist/icons/eye-closed.js +1 -3
- package/dist/icons/folder.d.ts +0 -2
- package/dist/icons/folder.js +1 -3
- package/dist/icons/hand-wave.d.ts +0 -2
- package/dist/icons/hand-wave.js +0 -2
- package/dist/icons/headphones.d.ts +0 -2
- package/dist/icons/headphones.js +0 -2
- package/dist/icons/image-add.d.ts +0 -2
- package/dist/icons/image-add.js +1 -3
- package/dist/icons/image.d.ts +0 -2
- package/dist/icons/image.js +1 -3
- package/dist/icons/index.d.ts +39 -39
- package/dist/icons/index.js +39 -78
- package/dist/icons/instagram.d.ts +0 -2
- package/dist/icons/instagram.js +0 -2
- package/dist/icons/lock-open.d.ts +0 -2
- package/dist/icons/lock-open.js +1 -3
- package/dist/icons/map-pin.d.ts +0 -2
- package/dist/icons/map-pin.js +0 -2
- package/dist/icons/menu.d.ts +0 -2
- package/dist/icons/menu.js +0 -2
- package/dist/icons/microsoft-copilot.d.ts +0 -2
- package/dist/icons/microsoft-copilot.js +1 -3
- package/dist/icons/send.d.ts +0 -2
- package/dist/icons/send.js +1 -3
- package/dist/icons/sim-card.d.ts +0 -2
- package/dist/icons/sim-card.js +0 -2
- package/dist/icons/spinner-arc.d.ts +0 -2
- package/dist/icons/spinner-arc.js +1 -3
- package/dist/icons/spinner-wave.d.ts +0 -2
- package/dist/icons/spinner-wave.js +0 -2
- package/dist/icons/square-pen.d.ts +0 -2
- package/dist/icons/square-pen.js +0 -2
- package/dist/icons/typescript.d.ts +0 -2
- package/dist/icons/typescript.js +0 -2
- package/dist/icons/video-camera.d.ts +0 -2
- package/dist/icons/video-camera.js +1 -3
- package/dist/icons/volume-high.d.ts +0 -2
- package/dist/icons/volume-high.js +1 -3
- package/dist/icons/volume-low.d.ts +0 -2
- package/dist/icons/volume-low.js +0 -2
- package/dist/icons/volume-off.d.ts +0 -2
- package/dist/icons/volume-off.js +0 -2
- package/dist/icons/zoom-in.d.ts +0 -2
- package/dist/icons/zoom-in.js +0 -2
- package/dist/icons/zoom-out.d.ts +0 -2
- package/dist/icons/zoom-out.js +0 -2
- package/dist/index.d.ts +1 -0
- package/dist/registry.d.ts +654 -0
- package/dist/registry.js +653 -0
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/icons.json +5008 -0
- package/package.json +4 -3
- package/MIGRATION.md +0 -69
package/README.md
CHANGED
|
@@ -6,23 +6,50 @@ Inspired by [Hugeicons](https://hugeicons.com) and
|
|
|
6
6
|
[Solar Icons](https://github.com/480-Design/Solar-Icon-Set), with smooth curves
|
|
7
7
|
and rounded corners. See [NOTICE.md](./NOTICE.md) for source attribution and licenses.
|
|
8
8
|
|
|
9
|
+
## Set up with your coding agent
|
|
10
|
+
|
|
11
|
+
Give your coding agent this prompt:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
Read https://github.com/arjunkambj/honeyicons/blob/main/docs/setup.md and set up @honeyicons/react in this project.
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Or install the package yourself:
|
|
18
|
+
|
|
9
19
|
```sh
|
|
10
20
|
pnpm add @honeyicons/react
|
|
11
21
|
```
|
|
12
22
|
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
13
25
|
```tsx
|
|
14
|
-
import {
|
|
26
|
+
import { Icon } from "@honeyicons/react";
|
|
15
27
|
|
|
16
28
|
export function Toolbar() {
|
|
17
29
|
return (
|
|
18
|
-
<
|
|
19
|
-
<
|
|
20
|
-
<
|
|
21
|
-
|
|
30
|
+
<nav>
|
|
31
|
+
<Icon icon="home" />
|
|
32
|
+
<Icon icon="moon" variant="bold" size={20} />
|
|
33
|
+
<Icon icon="search" strokeWidth={1.5} color="gray" title="Search" />
|
|
34
|
+
</nav>
|
|
22
35
|
);
|
|
23
36
|
}
|
|
24
37
|
```
|
|
25
38
|
|
|
39
|
+
`icon` accepts the kebab-case icon names, typed as `IconName`, so editors
|
|
40
|
+
autocomplete them and typos fail type checking. Unknown names throw at runtime.
|
|
41
|
+
`variant` only accepts the variants that icon provides. `Icon` includes the full
|
|
42
|
+
collection in your bundle.
|
|
43
|
+
|
|
44
|
+
For fixed icons, named imports let bundlers remove unused icons:
|
|
45
|
+
|
|
46
|
+
```tsx
|
|
47
|
+
import { Bell, Search } from "@honeyicons/react";
|
|
48
|
+
|
|
49
|
+
<Bell size={20} />
|
|
50
|
+
<Search size={16} />
|
|
51
|
+
```
|
|
52
|
+
|
|
26
53
|
Requires React 18 or later. Icons accept SVG props, `size` (default `24`),
|
|
27
54
|
`color` (default `currentColor`), and `strokeWidth` (default `1.8`).
|
|
28
55
|
Use `title`, `aria-label`, or `aria-labelledby` to give an icon an accessible
|
|
@@ -32,12 +59,12 @@ name. Icons without a name are decorative by default. Explicit `role` and
|
|
|
32
59
|
For an icon-only button, put the accessible name on the button:
|
|
33
60
|
|
|
34
61
|
```tsx
|
|
35
|
-
import {
|
|
62
|
+
import { Icon } from "@honeyicons/react";
|
|
36
63
|
|
|
37
64
|
export function NotificationsButton() {
|
|
38
65
|
return (
|
|
39
66
|
<button type="button" aria-label="Notifications">
|
|
40
|
-
<
|
|
67
|
+
<Icon icon="bell" size={20} />
|
|
41
68
|
</button>
|
|
42
69
|
);
|
|
43
70
|
}
|
|
@@ -48,22 +75,53 @@ or CSS lengths such as `"1em"`). Icons inherit the surrounding text color and
|
|
|
48
75
|
forward `ref` to the SVG element. Standard SVG props, event handlers, and
|
|
49
76
|
children such as `<desc>` are supported.
|
|
50
77
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
78
|
+
Icons come in `linear` and `bold`. Each icon defaults to its first variant:
|
|
79
|
+
`linear`, or `bold` for icons drawn only in bold, such as most brand logos.
|
|
80
|
+
Passing a variant the icon does not have throws. Stroke width affects stroked
|
|
81
|
+
geometry; filled outlines retain their original geometry.
|
|
82
|
+
|
|
83
|
+
To type your own props, import `IconName`, `IconProps`, and `IconVariantMap`
|
|
84
|
+
from `@honeyicons/react`. `@honeyicons/react/icons.json` lists each icon's name,
|
|
85
|
+
export, category, variants, and tags, and `@honeyicons/react/catalog` exports the
|
|
86
|
+
same data with components for icon pickers.
|
|
87
|
+
|
|
88
|
+
To draw your own icon with the same props, pass its SVG elements to `createIcon`:
|
|
89
|
+
|
|
90
|
+
```tsx
|
|
91
|
+
import { createIcon } from "@honeyicons/react";
|
|
92
|
+
|
|
93
|
+
export const Divider = createIcon("Divider", {
|
|
94
|
+
linear: [["path", { d: "M4 12h16", stroke: "currentColor" }]],
|
|
95
|
+
});
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Upgrading to 0.0.5
|
|
99
|
+
|
|
100
|
+
- The low-level `Icon iconNode={...}` API is replaced by `Icon icon="name"`.
|
|
101
|
+
Use `createIcon` for custom SVG nodes.
|
|
102
|
+
- Deprecated icon aliases have been removed. Use the canonical exports listed
|
|
103
|
+
in `icons.json`.
|
|
104
|
+
- Only `linear` and `bold` are supported. Unsupported variants throw instead of
|
|
105
|
+
substituting another style. Unused `secondaryColor` and `secondaryOpacity`
|
|
106
|
+
props have been removed.
|
|
107
|
+
- Shapes are now in `objects`, and spinners are in `status`.
|
|
108
|
+
|
|
109
|
+
## Agent skill
|
|
110
|
+
|
|
111
|
+
Coding agents such as Claude Code, Codex, and Cursor can install the Honeyicons
|
|
112
|
+
skill. It looks up real icon names in the published icon index and covers usage
|
|
113
|
+
and best practices:
|
|
114
|
+
|
|
115
|
+
```sh
|
|
116
|
+
npx skills add arjunkambj/honeyicons
|
|
117
|
+
```
|
|
55
118
|
|
|
56
|
-
|
|
57
|
-
`@honeyicons/react/catalog`. For reusable components, import the `HoneyIcon`
|
|
58
|
-
and `HoneyIconProps` types from `@honeyicons/react`.
|
|
119
|
+
## Development
|
|
59
120
|
|
|
60
121
|
The published package contains ESM JavaScript and TypeScript declarations.
|
|
61
|
-
Named icon imports support tree shaking; importing the catalog includes the
|
|
62
|
-
full collection.
|
|
63
122
|
|
|
64
123
|
To build or package from this repository, run `pnpm run build` or `pnpm pack`
|
|
65
124
|
inside `packages/react`. Packing builds the package automatically. The web app
|
|
66
125
|
and shared UI resolve the source through TypeScript paths during development.
|
|
67
126
|
|
|
68
|
-
See [NOTICE.md](./NOTICE.md) for third-party icon licenses and attribution
|
|
69
|
-
and [MIGRATION.md](./MIGRATION.md) for renamed exports.
|
|
127
|
+
See [NOTICE.md](./NOTICE.md) for third-party icon licenses and attribution.
|
package/dist/catalog.js
CHANGED
|
@@ -416,7 +416,7 @@ const catalog = [
|
|
|
416
416
|
name: "arrow-down",
|
|
417
417
|
pascalName: "ArrowDown",
|
|
418
418
|
category: "arrows",
|
|
419
|
-
tags: ["arrow", "down", "direction", "navigation", "arrow-down-02", "hugeicons"
|
|
419
|
+
tags: ["arrow", "down", "direction", "navigation", "arrow-down-02", "hugeicons"],
|
|
420
420
|
variants: ["linear"],
|
|
421
421
|
component: ArrowDown
|
|
422
422
|
},
|
|
@@ -440,7 +440,7 @@ const catalog = [
|
|
|
440
440
|
name: "arrow-left",
|
|
441
441
|
pascalName: "ArrowLeft",
|
|
442
442
|
category: "arrows",
|
|
443
|
-
tags: ["arrow", "left", "direction", "navigation", "arrow-left-02", "hugeicons"
|
|
443
|
+
tags: ["arrow", "left", "direction", "navigation", "arrow-left-02", "hugeicons"],
|
|
444
444
|
variants: ["linear"],
|
|
445
445
|
component: ArrowLeft
|
|
446
446
|
},
|
|
@@ -448,7 +448,7 @@ const catalog = [
|
|
|
448
448
|
name: "arrow-right",
|
|
449
449
|
pascalName: "ArrowRight",
|
|
450
450
|
category: "arrows",
|
|
451
|
-
tags: ["arrow", "right", "direction", "navigation", "arrow-right-02", "hugeicons"
|
|
451
|
+
tags: ["arrow", "right", "direction", "navigation", "arrow-right-02", "hugeicons"],
|
|
452
452
|
variants: ["linear"],
|
|
453
453
|
component: ArrowRight
|
|
454
454
|
},
|
|
@@ -456,7 +456,7 @@ const catalog = [
|
|
|
456
456
|
name: "arrow-up",
|
|
457
457
|
pascalName: "ArrowUp",
|
|
458
458
|
category: "arrows",
|
|
459
|
-
tags: ["arrow", "up", "direction", "navigation", "arrow-up-02", "hugeicons"
|
|
459
|
+
tags: ["arrow", "up", "direction", "navigation", "arrow-up-02", "hugeicons"],
|
|
460
460
|
variants: ["linear"],
|
|
461
461
|
component: ArrowUp
|
|
462
462
|
},
|
|
@@ -616,7 +616,7 @@ const catalog = [
|
|
|
616
616
|
name: "calendar",
|
|
617
617
|
pascalName: "Calendar",
|
|
618
618
|
category: "time",
|
|
619
|
-
tags: ["calendar", "date", "schedule", "event", "month", "hugeicons", "calendar-03"
|
|
619
|
+
tags: ["calendar", "date", "schedule", "event", "month", "hugeicons", "calendar-03"],
|
|
620
620
|
variants: ["linear"],
|
|
621
621
|
component: Calendar
|
|
622
622
|
},
|
|
@@ -736,7 +736,7 @@ const catalog = [
|
|
|
736
736
|
name: "check-double",
|
|
737
737
|
pascalName: "CheckDouble",
|
|
738
738
|
category: "status",
|
|
739
|
-
tags: ["double-check", "tick", "done", "read", "receipt", "delivered", "hugeicons", "check-check"
|
|
739
|
+
tags: ["double-check", "tick", "done", "read", "receipt", "delivered", "hugeicons", "check-check"],
|
|
740
740
|
variants: ["linear"],
|
|
741
741
|
component: CheckDouble
|
|
742
742
|
},
|
|
@@ -744,7 +744,7 @@ const catalog = [
|
|
|
744
744
|
name: "chevron-down",
|
|
745
745
|
pascalName: "ChevronDown",
|
|
746
746
|
category: "arrows",
|
|
747
|
-
tags: ["chevron", "down", "bottom", "expand", "arrow-down-01", "hugeicons", "arrow-down"
|
|
747
|
+
tags: ["chevron", "down", "bottom", "expand", "arrow-down-01", "hugeicons", "arrow-down"],
|
|
748
748
|
variants: ["linear"],
|
|
749
749
|
component: ChevronDown
|
|
750
750
|
},
|
|
@@ -752,7 +752,7 @@ const catalog = [
|
|
|
752
752
|
name: "chevron-left",
|
|
753
753
|
pascalName: "ChevronLeft",
|
|
754
754
|
category: "arrows",
|
|
755
|
-
tags: ["chevron", "left", "back", "previous", "arrow-left-01", "hugeicons", "arrow-left"
|
|
755
|
+
tags: ["chevron", "left", "back", "previous", "arrow-left-01", "hugeicons", "arrow-left"],
|
|
756
756
|
variants: ["linear"],
|
|
757
757
|
component: ChevronLeft
|
|
758
758
|
},
|
|
@@ -760,7 +760,7 @@ const catalog = [
|
|
|
760
760
|
name: "chevron-right",
|
|
761
761
|
pascalName: "ChevronRight",
|
|
762
762
|
category: "arrows",
|
|
763
|
-
tags: ["chevron", "right", "forward", "next", "arrow-right-01", "hugeicons", "arrow-right"
|
|
763
|
+
tags: ["chevron", "right", "forward", "next", "arrow-right-01", "hugeicons", "arrow-right"],
|
|
764
764
|
variants: ["linear"],
|
|
765
765
|
component: ChevronRight
|
|
766
766
|
},
|
|
@@ -768,7 +768,7 @@ const catalog = [
|
|
|
768
768
|
name: "chevron-up",
|
|
769
769
|
pascalName: "ChevronUp",
|
|
770
770
|
category: "arrows",
|
|
771
|
-
tags: ["chevron", "up", "top", "collapse", "arrow-up-01", "hugeicons", "arrow-up"
|
|
771
|
+
tags: ["chevron", "up", "top", "collapse", "arrow-up-01", "hugeicons", "arrow-up"],
|
|
772
772
|
variants: ["linear"],
|
|
773
773
|
component: ChevronUp
|
|
774
774
|
},
|
|
@@ -776,7 +776,7 @@ const catalog = [
|
|
|
776
776
|
name: "chevrons-down",
|
|
777
777
|
pascalName: "ChevronsDown",
|
|
778
778
|
category: "arrows",
|
|
779
|
-
tags: ["chevron", "double", "down", "bottom", "hugeicons", "arrow-down-double"
|
|
779
|
+
tags: ["chevron", "double", "down", "bottom", "hugeicons", "arrow-down-double"],
|
|
780
780
|
variants: ["linear"],
|
|
781
781
|
component: ChevronsDown
|
|
782
782
|
},
|
|
@@ -784,7 +784,7 @@ const catalog = [
|
|
|
784
784
|
name: "chevrons-left",
|
|
785
785
|
pascalName: "ChevronsLeft",
|
|
786
786
|
category: "arrows",
|
|
787
|
-
tags: ["chevron", "double", "left", "first", "hugeicons", "arrow-left-double"
|
|
787
|
+
tags: ["chevron", "double", "left", "first", "hugeicons", "arrow-left-double"],
|
|
788
788
|
variants: ["linear"],
|
|
789
789
|
component: ChevronsLeft
|
|
790
790
|
},
|
|
@@ -792,7 +792,7 @@ const catalog = [
|
|
|
792
792
|
name: "chevrons-right",
|
|
793
793
|
pascalName: "ChevronsRight",
|
|
794
794
|
category: "arrows",
|
|
795
|
-
tags: ["chevron", "double", "right", "last", "hugeicons", "arrow-right-double"
|
|
795
|
+
tags: ["chevron", "double", "right", "last", "hugeicons", "arrow-right-double"],
|
|
796
796
|
variants: ["linear"],
|
|
797
797
|
component: ChevronsRight
|
|
798
798
|
},
|
|
@@ -800,7 +800,7 @@ const catalog = [
|
|
|
800
800
|
name: "chevrons-up",
|
|
801
801
|
pascalName: "ChevronsUp",
|
|
802
802
|
category: "arrows",
|
|
803
|
-
tags: ["chevron", "double", "up", "top", "hugeicons", "arrow-up-double"
|
|
803
|
+
tags: ["chevron", "double", "up", "top", "hugeicons", "arrow-up-double"],
|
|
804
804
|
variants: ["linear"],
|
|
805
805
|
component: ChevronsUp
|
|
806
806
|
},
|
|
@@ -1007,7 +1007,7 @@ const catalog = [
|
|
|
1007
1007
|
{
|
|
1008
1008
|
name: "diamond",
|
|
1009
1009
|
pascalName: "Diamond",
|
|
1010
|
-
category: "
|
|
1010
|
+
category: "objects",
|
|
1011
1011
|
tags: ["diamond", "shape", "geometry", "rhombus", "hugeicons"],
|
|
1012
1012
|
variants: ["linear"],
|
|
1013
1013
|
component: Diamond
|
|
@@ -1056,7 +1056,7 @@ const catalog = [
|
|
|
1056
1056
|
name: "edit",
|
|
1057
1057
|
pascalName: "Edit",
|
|
1058
1058
|
category: "editor",
|
|
1059
|
-
tags: ["edit", "pencil", "write", "draw", "hugeicons", "edit-01"
|
|
1059
|
+
tags: ["edit", "pencil", "write", "draw", "hugeicons", "edit-01"],
|
|
1060
1060
|
variants: ["linear"],
|
|
1061
1061
|
component: Edit
|
|
1062
1062
|
},
|
|
@@ -1192,7 +1192,7 @@ const catalog = [
|
|
|
1192
1192
|
name: "folder",
|
|
1193
1193
|
pascalName: "Folder",
|
|
1194
1194
|
category: "files",
|
|
1195
|
-
tags: ["folder", "directory", "files", "storage", "folder-01", "
|
|
1195
|
+
tags: ["folder", "directory", "files", "storage", "folder-01", "solar"],
|
|
1196
1196
|
variants: ["linear"],
|
|
1197
1197
|
component: Folder
|
|
1198
1198
|
},
|
|
@@ -1432,7 +1432,7 @@ const catalog = [
|
|
|
1432
1432
|
name: "home",
|
|
1433
1433
|
pascalName: "Home",
|
|
1434
1434
|
category: "maps",
|
|
1435
|
-
tags: [],
|
|
1435
|
+
tags: ["house", "homepage", "dashboard", "start"],
|
|
1436
1436
|
variants: ["linear"],
|
|
1437
1437
|
component: Home
|
|
1438
1438
|
},
|
|
@@ -1456,7 +1456,7 @@ const catalog = [
|
|
|
1456
1456
|
name: "image-add",
|
|
1457
1457
|
pascalName: "ImageAdd",
|
|
1458
1458
|
category: "media",
|
|
1459
|
-
tags: ["image", "gallery", "upload", "photo", "plus", "gallery-add", "solar", "images-add"
|
|
1459
|
+
tags: ["image", "gallery", "upload", "photo", "plus", "gallery-add", "solar", "images-add"],
|
|
1460
1460
|
variants: ["linear"],
|
|
1461
1461
|
component: ImageAdd
|
|
1462
1462
|
},
|
|
@@ -1704,7 +1704,7 @@ const catalog = [
|
|
|
1704
1704
|
name: "lock-open",
|
|
1705
1705
|
pascalName: "LockOpen",
|
|
1706
1706
|
category: "security",
|
|
1707
|
-
tags: ["lock-open", "unlock", "security", "access", "solar", "lock-unlock"
|
|
1707
|
+
tags: ["lock-open", "unlock", "security", "access", "solar", "lock-unlock"],
|
|
1708
1708
|
variants: ["linear"],
|
|
1709
1709
|
component: LockOpen
|
|
1710
1710
|
},
|
|
@@ -1832,7 +1832,7 @@ const catalog = [
|
|
|
1832
1832
|
name: "microsoft-copilot",
|
|
1833
1833
|
pascalName: "MicrosoftCopilot",
|
|
1834
1834
|
category: "brands",
|
|
1835
|
-
tags: ["microsoft", "copilot", "ai", "assistant", "brand", "ms-copilot"
|
|
1835
|
+
tags: ["microsoft", "copilot", "ai", "assistant", "brand", "ms-copilot"],
|
|
1836
1836
|
variants: ["bold"],
|
|
1837
1837
|
component: MicrosoftCopilot
|
|
1838
1838
|
},
|
|
@@ -2183,7 +2183,7 @@ const catalog = [
|
|
|
2183
2183
|
{
|
|
2184
2184
|
name: "rhombus",
|
|
2185
2185
|
pascalName: "Rhombus",
|
|
2186
|
-
category: "
|
|
2186
|
+
category: "objects",
|
|
2187
2187
|
tags: ["rhombus", "shape", "geometry", "diamond", "hugeicons"],
|
|
2188
2188
|
variants: ["linear"],
|
|
2189
2189
|
component: Rhombus
|
|
@@ -2208,7 +2208,7 @@ const catalog = [
|
|
|
2208
2208
|
name: "search",
|
|
2209
2209
|
pascalName: "Search",
|
|
2210
2210
|
category: "actions",
|
|
2211
|
-
tags: [],
|
|
2211
|
+
tags: ["find", "magnifier", "lookup", "zoom"],
|
|
2212
2212
|
variants: ["linear"],
|
|
2213
2213
|
component: Search
|
|
2214
2214
|
},
|
|
@@ -2360,7 +2360,7 @@ const catalog = [
|
|
|
2360
2360
|
name: "snapchat",
|
|
2361
2361
|
pascalName: "Snapchat",
|
|
2362
2362
|
category: "brands",
|
|
2363
|
-
tags: [],
|
|
2363
|
+
tags: ["brand", "social", "snap", "ghost"],
|
|
2364
2364
|
variants: ["linear", "bold"],
|
|
2365
2365
|
component: Snapchat
|
|
2366
2366
|
},
|
|
@@ -2383,7 +2383,7 @@ const catalog = [
|
|
|
2383
2383
|
{
|
|
2384
2384
|
name: "spinner",
|
|
2385
2385
|
pascalName: "Spinner",
|
|
2386
|
-
category: "
|
|
2386
|
+
category: "status",
|
|
2387
2387
|
tags: ["loader", "loading", "progress", "wait", "busy", "rotate"],
|
|
2388
2388
|
variants: ["linear"],
|
|
2389
2389
|
component: Spinner
|
|
@@ -2391,15 +2391,15 @@ const catalog = [
|
|
|
2391
2391
|
{
|
|
2392
2392
|
name: "spinner-arc",
|
|
2393
2393
|
pascalName: "SpinnerArc",
|
|
2394
|
-
category: "
|
|
2395
|
-
tags: ["loader", "loading", "progress", "wait", "rotate", "arc", "long", "spinner-large"
|
|
2394
|
+
category: "status",
|
|
2395
|
+
tags: ["loader", "loading", "progress", "wait", "rotate", "arc", "long", "spinner-large"],
|
|
2396
2396
|
variants: ["linear"],
|
|
2397
2397
|
component: SpinnerArc
|
|
2398
2398
|
},
|
|
2399
2399
|
{
|
|
2400
2400
|
name: "spinner-diagonal",
|
|
2401
2401
|
pascalName: "SpinnerDiagonal",
|
|
2402
|
-
category: "
|
|
2402
|
+
category: "status",
|
|
2403
2403
|
tags: ["loader", "loading", "progress", "wait", "grid", "pixel", "diagonal", "wave"],
|
|
2404
2404
|
variants: ["linear"],
|
|
2405
2405
|
component: SpinnerDiagonal
|
|
@@ -2407,7 +2407,7 @@ const catalog = [
|
|
|
2407
2407
|
{
|
|
2408
2408
|
name: "spinner-orbit",
|
|
2409
2409
|
pascalName: "SpinnerOrbit",
|
|
2410
|
-
category: "
|
|
2410
|
+
category: "status",
|
|
2411
2411
|
tags: ["loader", "loading", "progress", "wait", "grid", "pixel", "comet"],
|
|
2412
2412
|
variants: ["linear"],
|
|
2413
2413
|
component: SpinnerOrbit
|
|
@@ -2415,8 +2415,8 @@ const catalog = [
|
|
|
2415
2415
|
{
|
|
2416
2416
|
name: "spinner-wave",
|
|
2417
2417
|
pascalName: "SpinnerWave",
|
|
2418
|
-
category: "
|
|
2419
|
-
tags: ["loader", "loading", "progress", "wait", "grid", "pixel", "chevron", "wave", "spinner-tinker"
|
|
2418
|
+
category: "status",
|
|
2419
|
+
tags: ["loader", "loading", "progress", "wait", "grid", "pixel", "chevron", "wave", "spinner-tinker"],
|
|
2420
2420
|
variants: ["linear"],
|
|
2421
2421
|
component: SpinnerWave
|
|
2422
2422
|
},
|
|
@@ -2424,7 +2424,7 @@ const catalog = [
|
|
|
2424
2424
|
name: "square-pen",
|
|
2425
2425
|
pascalName: "SquarePen",
|
|
2426
2426
|
category: "actions",
|
|
2427
|
-
tags: ["send-message", "
|
|
2427
|
+
tags: ["send-message", "compose", "edit", "write", "pencil"],
|
|
2428
2428
|
variants: ["linear"],
|
|
2429
2429
|
component: SquarePen
|
|
2430
2430
|
},
|
|
@@ -2591,7 +2591,7 @@ const catalog = [
|
|
|
2591
2591
|
{
|
|
2592
2592
|
name: "three-squares",
|
|
2593
2593
|
pascalName: "ThreeSquares",
|
|
2594
|
-
category: "
|
|
2594
|
+
category: "objects",
|
|
2595
2595
|
tags: ["three-squares", "squares", "stack", "layers", "solar"],
|
|
2596
2596
|
variants: ["linear"],
|
|
2597
2597
|
component: ThreeSquares
|
|
@@ -2640,7 +2640,7 @@ const catalog = [
|
|
|
2640
2640
|
name: "trash",
|
|
2641
2641
|
pascalName: "Trash",
|
|
2642
2642
|
category: "actions",
|
|
2643
|
-
tags: [],
|
|
2643
|
+
tags: ["delete", "remove", "bin", "discard"],
|
|
2644
2644
|
variants: ["linear"],
|
|
2645
2645
|
component: Trash
|
|
2646
2646
|
},
|
|
@@ -2784,7 +2784,7 @@ const catalog = [
|
|
|
2784
2784
|
name: "volume-high",
|
|
2785
2785
|
pascalName: "VolumeHigh",
|
|
2786
2786
|
category: "media",
|
|
2787
|
-
tags: ["volume", "sound", "speaker", "audio", "unmute", "solar", "volume-loud"
|
|
2787
|
+
tags: ["volume", "sound", "speaker", "audio", "unmute", "solar", "volume-loud"],
|
|
2788
2788
|
variants: ["linear"],
|
|
2789
2789
|
component: VolumeHigh
|
|
2790
2790
|
},
|
|
@@ -2815,7 +2815,7 @@ const catalog = [
|
|
|
2815
2815
|
{
|
|
2816
2816
|
name: "waves",
|
|
2817
2817
|
pascalName: "Waves",
|
|
2818
|
-
category: "
|
|
2818
|
+
category: "objects",
|
|
2819
2819
|
tags: ["waves", "water", "sea", "ocean"],
|
|
2820
2820
|
variants: ["linear"],
|
|
2821
2821
|
component: Waves
|
|
@@ -2872,7 +2872,7 @@ const catalog = [
|
|
|
2872
2872
|
name: "x",
|
|
2873
2873
|
pascalName: "X",
|
|
2874
2874
|
category: "brands",
|
|
2875
|
-
tags: [],
|
|
2875
|
+
tags: ["brand", "social", "twitter"],
|
|
2876
2876
|
variants: ["linear"],
|
|
2877
2877
|
component: X
|
|
2878
2878
|
},
|
|
@@ -2904,7 +2904,7 @@ const catalog = [
|
|
|
2904
2904
|
name: "zoom-in",
|
|
2905
2905
|
pascalName: "ZoomIn",
|
|
2906
2906
|
category: "actions",
|
|
2907
|
-
tags: ["magnifier", "magnifier-zoom-in", "zoom-in", "search", "enlarge", "plus", "solar", "search-plus"
|
|
2907
|
+
tags: ["magnifier", "magnifier-zoom-in", "zoom-in", "search", "enlarge", "plus", "solar", "search-plus"],
|
|
2908
2908
|
variants: ["linear"],
|
|
2909
2909
|
component: ZoomIn
|
|
2910
2910
|
},
|
|
@@ -2912,7 +2912,7 @@ const catalog = [
|
|
|
2912
2912
|
name: "zoom-out",
|
|
2913
2913
|
pascalName: "ZoomOut",
|
|
2914
2914
|
category: "actions",
|
|
2915
|
-
tags: ["magnifier", "minimalistic-magnifier-zoom-out", "zoom-out", "search", "shrink", "minus", "solar", "search-minus"
|
|
2915
|
+
tags: ["magnifier", "minimalistic-magnifier-zoom-out", "zoom-out", "search", "shrink", "minus", "solar", "search-minus"],
|
|
2916
2916
|
variants: ["linear"],
|
|
2917
2917
|
component: ZoomOut
|
|
2918
2918
|
}
|
package/dist/categories.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const ICON_CATEGORIES: readonly ["actions", "ai", "arrows", "brands", "charts", "chat", "commerce", "development", "devices", "editor", "files", "layout", "maps", "media", "objects", "security", "settings", "
|
|
1
|
+
export declare const ICON_CATEGORIES: readonly ["actions", "ai", "arrows", "brands", "charts", "chat", "commerce", "development", "devices", "editor", "files", "layout", "maps", "media", "objects", "security", "settings", "status", "time", "user"];
|
|
2
2
|
export type IconCategory = (typeof ICON_CATEGORIES)[number];
|
package/dist/categories.js
CHANGED
package/dist/create-icon.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { type ForwardRefExoticComponent, type RefAttributes } from "react";
|
|
2
|
-
import { type
|
|
2
|
+
import { type IconBaseProps } from "./icon-base.js";
|
|
3
3
|
import { type IconNodeMap, type IconVariant } from "./types.js";
|
|
4
|
-
export type HoneyIconProps = Omit<
|
|
4
|
+
export type HoneyIconProps = Omit<IconBaseProps, "iconNode"> & {
|
|
5
|
+
variant?: IconVariant;
|
|
6
|
+
};
|
|
5
7
|
export type HoneyIcon = ForwardRefExoticComponent<HoneyIconProps & RefAttributes<SVGSVGElement>> & {
|
|
6
8
|
variants: readonly IconVariant[];
|
|
7
9
|
};
|
package/dist/create-icon.js
CHANGED
|
@@ -2,17 +2,24 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import {
|
|
3
3
|
forwardRef
|
|
4
4
|
} from "react";
|
|
5
|
-
import {
|
|
5
|
+
import { IconBase } from "./icon-base.js";
|
|
6
6
|
import { ICON_VARIANTS } from "./types.js";
|
|
7
7
|
function createIcon(name, nodes) {
|
|
8
8
|
const variants = ICON_VARIANTS.filter((variant) => nodes[variant]);
|
|
9
|
+
const [defaultVariant] = variants;
|
|
10
|
+
if (!defaultVariant) {
|
|
11
|
+
throw new Error(`${name} has no icon data`);
|
|
12
|
+
}
|
|
9
13
|
const Component = forwardRef(
|
|
10
|
-
function HoneyIcon({ variant =
|
|
11
|
-
|
|
14
|
+
function HoneyIcon({ variant = defaultVariant, ...props }, ref) {
|
|
15
|
+
if (!Object.hasOwn(nodes, variant)) {
|
|
16
|
+
throw new Error(`${name} has no ${variant} variant`);
|
|
17
|
+
}
|
|
18
|
+
const iconNode = nodes[variant];
|
|
12
19
|
if (!iconNode) {
|
|
13
|
-
throw new Error(
|
|
20
|
+
throw new Error(`${name} has no ${variant} variant`);
|
|
14
21
|
}
|
|
15
|
-
return /* @__PURE__ */ jsx(
|
|
22
|
+
return /* @__PURE__ */ jsx(IconBase, { ref, iconNode, ...props });
|
|
16
23
|
}
|
|
17
24
|
);
|
|
18
25
|
Component.displayName = name;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type SVGProps } from "react";
|
|
2
|
+
import type { IconNode } from "./types.js";
|
|
3
|
+
export type IconBaseProps = Omit<SVGProps<SVGSVGElement>, "ref" | "strokeWidth" | "width" | "height"> & {
|
|
4
|
+
iconNode: IconNode;
|
|
5
|
+
size?: number | string;
|
|
6
|
+
strokeWidth?: number;
|
|
7
|
+
title?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const IconBase: import("react").ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "height" | "ref" | "strokeWidth" | "width"> & {
|
|
10
|
+
iconNode: IconNode;
|
|
11
|
+
size?: number | string;
|
|
12
|
+
strokeWidth?: number;
|
|
13
|
+
title?: string;
|
|
14
|
+
} & import("react").RefAttributes<SVGSVGElement>>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { createElement, forwardRef } from "react";
|
|
3
|
+
function paintsStroke(attrs) {
|
|
4
|
+
const stroke = attrs.stroke;
|
|
5
|
+
return Boolean(stroke && stroke !== "none");
|
|
6
|
+
}
|
|
7
|
+
function paintsFill(attrs) {
|
|
8
|
+
const fill = attrs.fill;
|
|
9
|
+
return Boolean(fill && fill !== "none");
|
|
10
|
+
}
|
|
11
|
+
const IconBase = forwardRef(
|
|
12
|
+
function IconBase2({
|
|
13
|
+
iconNode,
|
|
14
|
+
size = 24,
|
|
15
|
+
color = "currentColor",
|
|
16
|
+
strokeWidth = 1.8,
|
|
17
|
+
title,
|
|
18
|
+
className,
|
|
19
|
+
style,
|
|
20
|
+
children,
|
|
21
|
+
...props
|
|
22
|
+
}, ref) {
|
|
23
|
+
const hasStroke = iconNode.some(([, attrs]) => paintsStroke(attrs));
|
|
24
|
+
const hasAccessibleName = Boolean(
|
|
25
|
+
title || props["aria-label"] || props["aria-labelledby"]
|
|
26
|
+
);
|
|
27
|
+
return /* @__PURE__ */ jsxs(
|
|
28
|
+
"svg",
|
|
29
|
+
{
|
|
30
|
+
ref,
|
|
31
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
32
|
+
width: size,
|
|
33
|
+
height: size,
|
|
34
|
+
viewBox: "0 0 24 24",
|
|
35
|
+
fill: "none",
|
|
36
|
+
stroke: hasStroke ? "currentColor" : void 0,
|
|
37
|
+
strokeWidth: hasStroke ? strokeWidth : void 0,
|
|
38
|
+
strokeLinecap: hasStroke ? "round" : void 0,
|
|
39
|
+
strokeLinejoin: hasStroke ? "round" : void 0,
|
|
40
|
+
color,
|
|
41
|
+
className,
|
|
42
|
+
style,
|
|
43
|
+
role: hasAccessibleName ? "img" : "presentation",
|
|
44
|
+
"aria-hidden": hasAccessibleName ? void 0 : true,
|
|
45
|
+
"aria-label": title,
|
|
46
|
+
...props,
|
|
47
|
+
children: [
|
|
48
|
+
title ? /* @__PURE__ */ jsx("title", { children: title }) : null,
|
|
49
|
+
iconNode.map(([tag, attrs], index) => {
|
|
50
|
+
const mapped = hasStroke && paintsFill(attrs) && !paintsStroke(attrs) ? { ...attrs, stroke: "none" } : attrs;
|
|
51
|
+
return createElement(tag, { ...mapped, key: index });
|
|
52
|
+
}),
|
|
53
|
+
children
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
export {
|
|
60
|
+
IconBase
|
|
61
|
+
};
|
package/dist/icon.d.ts
CHANGED
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { type ReactElement, type RefAttributes } from "react";
|
|
2
|
+
import type { HoneyIconProps } from "./create-icon.js";
|
|
3
|
+
import { type IconName, type IconVariantMap } from "./registry.js";
|
|
4
|
+
export type IconProps<Name extends IconName = IconName> = Omit<HoneyIconProps, "variant"> & {
|
|
5
|
+
[Key in Name]: {
|
|
6
|
+
icon: Key;
|
|
7
|
+
variant?: IconVariantMap[Key];
|
|
8
|
+
};
|
|
9
|
+
}[Name];
|
|
10
|
+
type IconComponent = (<Name extends IconName>(props: IconProps<Name> & RefAttributes<SVGSVGElement>) => ReactElement) & {
|
|
11
|
+
displayName?: string;
|
|
11
12
|
};
|
|
12
|
-
export declare const Icon:
|
|
13
|
-
|
|
14
|
-
variant?: IconVariant;
|
|
15
|
-
size?: number | string;
|
|
16
|
-
strokeWidth?: number;
|
|
17
|
-
secondaryColor?: string;
|
|
18
|
-
secondaryOpacity?: number;
|
|
19
|
-
title?: string;
|
|
20
|
-
} & import("react").RefAttributes<SVGSVGElement>>;
|
|
13
|
+
export declare const Icon: IconComponent;
|
|
14
|
+
export {};
|