@onimuxha/oxycons 1.0.1
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/lib/icons/categories/ai/chatbot.ts +12 -0
- package/lib/icons/categories/ai/chatgpt.ts +12 -0
- package/lib/icons/categories/ai/claude.ts +18 -0
- package/lib/icons/categories/ai/format.svg +0 -0
- package/lib/icons/categories/ai/gemini.ts +12 -0
- package/lib/icons/categories/ai/index.ts +4 -0
- package/lib/icons/categories/app/applenews.ts +13 -0
- package/lib/icons/categories/app/behance.ts +12 -0
- package/lib/icons/categories/app/facebook.ts +12 -0
- package/lib/icons/categories/app/format.svg +5 -0
- package/lib/icons/categories/app/index.ts +8 -0
- package/lib/icons/categories/app/linkedin.ts +12 -0
- package/lib/icons/categories/app/messenger.ts +12 -0
- package/lib/icons/categories/app/telegram.ts +20 -0
- package/lib/icons/categories/app/tiktok.ts +12 -0
- package/lib/icons/categories/app/twitter.ts +12 -0
- package/lib/icons/categories/company/1001tracklists.ts +19 -0
- package/lib/icons/categories/company/2k.ts +12 -0
- package/lib/icons/categories/company/4chan.ts +12 -0
- package/lib/icons/categories/company/500px.ts +12 -0
- package/lib/icons/categories/company/99designs.ts +12 -0
- package/lib/icons/categories/company/9gag.ts +12 -0
- package/lib/icons/categories/company/abbott.ts +12 -0
- package/lib/icons/categories/company/abbvie.ts +12 -0
- package/lib/icons/categories/company/about-me.ts +12 -0
- package/lib/icons/categories/company/accusoft.ts +12 -0
- package/lib/icons/categories/company/acer.ts +12 -0
- package/lib/icons/categories/company/activeloop.ts +23 -0
- package/lib/icons/categories/company/acura.ts +12 -0
- package/lib/icons/categories/company/adafruit.ts +12 -0
- package/lib/icons/categories/company/binance.ts +12 -0
- package/lib/icons/categories/company/format.svg +5 -0
- package/lib/icons/categories/company/google.ts +12 -0
- package/lib/icons/categories/company/index.ts +18 -0
- package/lib/icons/categories/company/meta.ts +12 -0
- package/lib/icons/categories/company/microsoft.ts +12 -0
- package/lib/icons/categories/design-tools/acrobat-reader.ts +12 -0
- package/lib/icons/categories/design-tools/adobe-fonts.ts +12 -0
- package/lib/icons/categories/design-tools/adobe.ts +12 -0
- package/lib/icons/categories/design-tools/after-effect.ts +12 -0
- package/lib/icons/categories/design-tools/audition.ts +17 -0
- package/lib/icons/categories/design-tools/creative-cloud.ts +22 -0
- package/lib/icons/categories/design-tools/dreamweaver.ts +12 -0
- package/lib/icons/categories/design-tools/figma.ts +12 -0
- package/lib/icons/categories/design-tools/format.svg +0 -0
- package/lib/icons/categories/design-tools/illustrator.ts +12 -0
- package/lib/icons/categories/design-tools/in-design.ts +12 -0
- package/lib/icons/categories/design-tools/in-vision.ts +12 -0
- package/lib/icons/categories/design-tools/index.ts +17 -0
- package/lib/icons/categories/design-tools/lightroom-classic.ts +18 -0
- package/lib/icons/categories/design-tools/lightroom.ts +12 -0
- package/lib/icons/categories/design-tools/photoshop.ts +12 -0
- package/lib/icons/categories/design-tools/premiere-pro.ts +12 -0
- package/lib/icons/categories/design-tools/sketch.ts +12 -0
- package/lib/icons/categories/design-tools/xd.ts +12 -0
- package/lib/icons/categories/framework/activity-pub-rocks.ts +19 -0
- package/lib/icons/categories/framework/actix.ts +12 -0
- package/lib/icons/categories/framework/angular.ts +12 -0
- package/lib/icons/categories/framework/angularjs.ts +12 -0
- package/lib/icons/categories/framework/format.svg +5 -0
- package/lib/icons/categories/framework/index.ts +7 -0
- package/lib/icons/categories/framework/nodejs.ts +12 -0
- package/lib/icons/categories/framework/react.ts +12 -0
- package/lib/icons/categories/framework/vue.ts +12 -0
- package/lib/icons/categories/index.ts +33 -0
- package/lib/icons/categories/programming/css.ts +12 -0
- package/lib/icons/categories/programming/format.svg +0 -0
- package/lib/icons/categories/programming/html.ts +12 -0
- package/lib/icons/categories/programming/index.ts +3 -0
- package/lib/icons/categories/programming/php.ts +12 -0
- package/lib/icons/categories/tools/1.1.1.1.ts +12 -0
- package/lib/icons/categories/tools/1panel.ts +12 -0
- package/lib/icons/categories/tools/1password.ts +12 -0
- package/lib/icons/categories/tools/2fas.ts +12 -0
- package/lib/icons/categories/tools/365-data-sience.ts +12 -0
- package/lib/icons/categories/tools/7zip.ts +12 -0
- package/lib/icons/categories/tools/ab-download-manager.ts +12 -0
- package/lib/icons/categories/tools/abletonlive.ts +12 -0
- package/lib/icons/categories/tools/acode.ts +12 -0
- package/lib/icons/categories/tools/actual-budget.ts +22 -0
- package/lib/icons/categories/tools/docker.ts +12 -0
- package/lib/icons/categories/tools/format.svg +0 -0
- package/lib/icons/categories/tools/git.ts +12 -0
- package/lib/icons/categories/tools/github.ts +12 -0
- package/lib/icons/categories/tools/go-abstract.ts +12 -0
- package/lib/icons/categories/tools/index.ts +15 -0
- package/lib/icons/categories/tools/thirty-seconds-of-code.ts +17 -0
- package/lib/icons/categories-info.ts +50 -0
- package/lib/icons/create-icon.tsx +140 -0
- package/lib/icons/icon.tsx +43 -0
- package/lib/icons/registry.ts +127 -0
- package/lib/icons/types.ts +69 -0
- package/package.json +115 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createIcon } from "../../create-icon";
|
|
2
|
+
|
|
3
|
+
export const Git = createIcon({
|
|
4
|
+
name: "Git",
|
|
5
|
+
viewBox: "0 0 24 24",
|
|
6
|
+
svg: `<svg fill="currentColor">
|
|
7
|
+
<path
|
|
8
|
+
d="M23.546 10.93L13.067.452a1.55 1.55 0 0 0-2.188 0L8.708 2.627l2.76 2.76a1.838 1.838 0 0 1 2.327 2.341l2.658 2.66a1.838 1.838 0 0 1 1.9 3.039a1.837 1.837 0 0 1-2.6 0a1.85 1.85 0 0 1-.404-1.996L12.86 8.955v6.525c.176.086.342.203.488.348a1.85 1.85 0 0 1 0 2.6a1.844 1.844 0 0 1-2.609 0a1.834 1.834 0 0 1 0-2.598c.182-.18.387-.316.605-.406V8.835a1.834 1.834 0 0 1-.996-2.41L7.636 3.7L.45 10.881c-.6.605-.6 1.584 0 2.189l10.48 10.477a1.545 1.545 0 0 0 2.186 0l10.43-10.43a1.544 1.544 0 0 0 0-2.187" />
|
|
9
|
+
</svg>`,
|
|
10
|
+
categories: ["tools", "development"],
|
|
11
|
+
keywords: ["git", "version", "control", "github"],
|
|
12
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createIcon } from "../../create-icon";
|
|
2
|
+
|
|
3
|
+
export const Github = createIcon({
|
|
4
|
+
name: "Github",
|
|
5
|
+
viewBox: "0 0 24 24",
|
|
6
|
+
svg: `<svg fill="currentColor">
|
|
7
|
+
<path
|
|
8
|
+
d="M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" />
|
|
9
|
+
</svg>`,
|
|
10
|
+
categories: ["tools", "development"],
|
|
11
|
+
keywords: ["github", "repository", "source", "code", "version control"],
|
|
12
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createIcon } from "../../create-icon";
|
|
2
|
+
|
|
3
|
+
export const GoAbstract = createIcon({
|
|
4
|
+
name: "Go Abstract",
|
|
5
|
+
viewBox: "0 0 24 24",
|
|
6
|
+
svg: `<svg fill="currentColor">
|
|
7
|
+
<path
|
|
8
|
+
d="M12 0c9.601 0 12 2.399 12 12s-2.399 12-12 12S0 21.601 0 12S2.399 0 12 0m-1.969 18.564c2.524.003 4.604-2.07 4.609-4.595c0-2.521-2.074-4.595-4.595-4.595S5.45 11.449 5.45 13.969c0 2.516 2.065 4.588 4.581 4.595m8.344-.189V5.625H5.625v2.247h10.498v10.503zm-8.344-6.748a2.343 2.343 0 1 1-.002 4.686a2.343 2.343 0 0 1 .002-4.686" />
|
|
9
|
+
</svg>`,
|
|
10
|
+
categories: ["tools"],
|
|
11
|
+
keywords: ["abstract", "go", "design", "pattern", "software", "development"],
|
|
12
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { AbDownloadManager } from "./ab-download-manager";
|
|
2
|
+
export { AbletonLive } from "./abletonlive";
|
|
3
|
+
export { Acode } from "./acode";
|
|
4
|
+
export { Actualbudget } from "./actual-budget";
|
|
5
|
+
export { DataScience365 } from "./365-data-sience";
|
|
6
|
+
export { Docker } from "./docker";
|
|
7
|
+
export { Git } from "./git";
|
|
8
|
+
export { Github } from "./github";
|
|
9
|
+
export { GoAbstract } from "./go-abstract";
|
|
10
|
+
export { OnePanel } from "./1panel";
|
|
11
|
+
export { OnePassword } from "./1password";
|
|
12
|
+
export { SevenZip } from "./7zip";
|
|
13
|
+
export { ThirtySecondsOfCode } from "./thirty-seconds-of-code";
|
|
14
|
+
export { TwoFAS } from "./2fas";
|
|
15
|
+
export { _1_1_1_1 } from "./1.1.1.1";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createIcon } from "../../create-icon";
|
|
2
|
+
|
|
3
|
+
export const ThirtySecondsOfCode = createIcon({
|
|
4
|
+
name: "ThirtySecondsOfCode",
|
|
5
|
+
viewBox: "0 0 24 24",
|
|
6
|
+
svg: `<svg fill="currentColor">
|
|
7
|
+
<path
|
|
8
|
+
d="M13.895 12c0 .734-.593 1.328-1.324 1.328h-.58a6.67 6.67 0 0 1-.389 5.09a6.63 6.63 0 0 1-2.22 2.508a6.6 6.6 0 0 1-9.028-1.619l-.044-.06c-.47-.563-.397-1.4.163-1.872a1.32 1.32 0 0 1 1.864.164l.158.207a3.97 3.97 0 0 0 3.523 1.63a3.96 3.96 0 0 0 3.226-2.163A3.997 3.997 0 0 0 7.771 12A3.98 3.98 0 0 0 9.45 9.927a4 4 0 0 0-1.537-4.644a3.96 3.96 0 0 0-5.417.971l-.158.208a1.32 1.32 0 0 1-1.864.163A1.33 1.33 0 0 1 .31 4.754l.044-.061a6.6 6.6 0 0 1 2.583-2.128a6.6 6.6 0 0 1 6.446.51a6.63 6.63 0 0 1 2.22 2.506a6.66 6.66 0 0 1 .389 5.09h.58c.73 0 1.323.595 1.323 1.329m-.067 5.21a8.3 8.3 0 0 1-1.196 2.811a6.63 6.63 0 0 0 4.717 1.964A6.654 6.654 0 0 0 24 15.328V8.672a6.654 6.654 0 0 0-6.651-6.657c-1.844 0-3.513.75-4.717 1.964a8.3 8.3 0 0 1 1.196 2.81a3.99 3.99 0 0 1 7.511 1.883v6.656a3.992 3.992 0 0 1-7.51 1.883Z" />
|
|
9
|
+
</svg>`,
|
|
10
|
+
categories: ["tools"],
|
|
11
|
+
keywords: [
|
|
12
|
+
"30 seconds of code",
|
|
13
|
+
"javascript",
|
|
14
|
+
"web development",
|
|
15
|
+
"programming",
|
|
16
|
+
],
|
|
17
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-safe category metadata. Use this in Server Components (e.g. app/page.tsx).
|
|
3
|
+
* Do not import the full registry or any icon components on the server—
|
|
4
|
+
* they use createIcon() which is client-only.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const CATEGORIES = [
|
|
8
|
+
"programming",
|
|
9
|
+
"app",
|
|
10
|
+
"design-tools",
|
|
11
|
+
"ai",
|
|
12
|
+
"tools",
|
|
13
|
+
"framework",
|
|
14
|
+
"company",
|
|
15
|
+
] as const;
|
|
16
|
+
|
|
17
|
+
const CATEGORY_INFO: Record<string, { name: string; description: string }> = {
|
|
18
|
+
programming: {
|
|
19
|
+
name: "Programming",
|
|
20
|
+
description: "Programming languages and web technologies",
|
|
21
|
+
},
|
|
22
|
+
app: {
|
|
23
|
+
name: "App",
|
|
24
|
+
description: "Application and device related icons",
|
|
25
|
+
},
|
|
26
|
+
"design-tools": {
|
|
27
|
+
name: "Design Tools",
|
|
28
|
+
description: "Design and creative software icons",
|
|
29
|
+
},
|
|
30
|
+
ai: {
|
|
31
|
+
name: "AI",
|
|
32
|
+
description: "Artificial intelligence and machine learning icons",
|
|
33
|
+
},
|
|
34
|
+
tools: {
|
|
35
|
+
name: "Tools",
|
|
36
|
+
description: "Development and utility tools icons",
|
|
37
|
+
},
|
|
38
|
+
framework: {
|
|
39
|
+
name: "Framework",
|
|
40
|
+
description: "Web frameworks and libraries icons",
|
|
41
|
+
},
|
|
42
|
+
Company: {
|
|
43
|
+
name: "Company",
|
|
44
|
+
description: "Tech companies and brands icons",
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export function getCategoryInfo(category: string) {
|
|
49
|
+
return CATEGORY_INFO[category];
|
|
50
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Icon } from "./icon";
|
|
5
|
+
import { IconMetadata, IconProps } from "./types";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Create a reusable icon component from icon metadata
|
|
9
|
+
*
|
|
10
|
+
* @param metadata - Icon metadata including SVG path data (single or multiple) or full SVG code
|
|
11
|
+
* @returns A React component that renders the icon with support for size and color customization
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* // Single path with size and color customization
|
|
16
|
+
* const HomeIcon = createIcon({
|
|
17
|
+
* name: 'home',
|
|
18
|
+
* viewBox: '0 0 24 24',
|
|
19
|
+
* path: 'M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z',
|
|
20
|
+
* categories: ['navigation'],
|
|
21
|
+
* });
|
|
22
|
+
* <HomeIcon size={24} className="text-red-500" />
|
|
23
|
+
*
|
|
24
|
+
* // Multiple paths with properties
|
|
25
|
+
* const ComplexIcon = createIcon({
|
|
26
|
+
* name: 'logo',
|
|
27
|
+
* viewBox: '0 0 100 100',
|
|
28
|
+
* paths: [
|
|
29
|
+
* { d: 'M10 10h20v20H10z', fill: '#000', opacity: 0.45 },
|
|
30
|
+
* { d: 'M40 40h20v20H40z', fill: '#000', opacity: 0.6 },
|
|
31
|
+
* ],
|
|
32
|
+
* });
|
|
33
|
+
*
|
|
34
|
+
* // Full SVG code
|
|
35
|
+
* const LogoIcon = createIcon({
|
|
36
|
+
* name: 'logo',
|
|
37
|
+
* viewBox: '0 0 100 100',
|
|
38
|
+
* svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="#000" d="M10 10h20v20H10z" opacity="0.45" /></svg>',
|
|
39
|
+
* });
|
|
40
|
+
* <HomeIcon size={24} />
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export function createIcon(metadata: IconMetadata) {
|
|
44
|
+
const IconComponent = React.forwardRef<SVGSVGElement, IconProps>(
|
|
45
|
+
(props, ref) => {
|
|
46
|
+
const { size = 24, className = "", ...restProps } = props;
|
|
47
|
+
const sizeValue =
|
|
48
|
+
typeof size === "number" ? size : parseInt(size as string, 10);
|
|
49
|
+
|
|
50
|
+
// Handle full SVG code
|
|
51
|
+
if (metadata.svg) {
|
|
52
|
+
return (
|
|
53
|
+
<svg
|
|
54
|
+
ref={ref}
|
|
55
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
56
|
+
viewBox={metadata.viewBox}
|
|
57
|
+
width={sizeValue}
|
|
58
|
+
height={sizeValue}
|
|
59
|
+
className={`inline-block ${className}`}
|
|
60
|
+
style={{ color: "currentColor" }}
|
|
61
|
+
dangerouslySetInnerHTML={{ __html: metadata.svg }}
|
|
62
|
+
{...restProps}
|
|
63
|
+
/>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Handle both single path and multiple paths
|
|
68
|
+
const hasPaths = metadata.paths && metadata.paths.length > 0;
|
|
69
|
+
const singlePath = metadata.path;
|
|
70
|
+
|
|
71
|
+
return (
|
|
72
|
+
<Icon {...props} ref={ref} viewBox={metadata.viewBox || "0 0 24 24"}>
|
|
73
|
+
{hasPaths ? (
|
|
74
|
+
// Render multiple paths with their individual properties
|
|
75
|
+
metadata.paths!.map((pathData, index) => (
|
|
76
|
+
<path
|
|
77
|
+
key={index}
|
|
78
|
+
d={pathData.d}
|
|
79
|
+
fill={pathData.fill || "currentColor"}
|
|
80
|
+
stroke={pathData.stroke}
|
|
81
|
+
fillOpacity={pathData.fillOpacity}
|
|
82
|
+
strokeOpacity={pathData.strokeOpacity}
|
|
83
|
+
opacity={pathData.opacity}
|
|
84
|
+
strokeWidth={pathData.strokeWidth}
|
|
85
|
+
/>
|
|
86
|
+
))
|
|
87
|
+
) : (
|
|
88
|
+
// Render single path
|
|
89
|
+
<path d={singlePath} fill="currentColor" />
|
|
90
|
+
)}
|
|
91
|
+
</Icon>
|
|
92
|
+
);
|
|
93
|
+
},
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
IconComponent.displayName = `${metadata.name}Icon`;
|
|
97
|
+
|
|
98
|
+
// Attach metadata to the component so the registry can read categories, keywords, etc.
|
|
99
|
+
try {
|
|
100
|
+
// Use a non-enumerable property to avoid interfering with React internals
|
|
101
|
+
Object.defineProperty(IconComponent, "metadata", {
|
|
102
|
+
value: metadata,
|
|
103
|
+
writable: false,
|
|
104
|
+
configurable: true,
|
|
105
|
+
enumerable: false,
|
|
106
|
+
});
|
|
107
|
+
} catch (e) {
|
|
108
|
+
// Fallback if defineProperty fails in some environments
|
|
109
|
+
(IconComponent as any).metadata = metadata;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return IconComponent;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Create multiple icon components from metadata
|
|
117
|
+
*
|
|
118
|
+
* @param metadataMap - Object mapping icon names to metadata
|
|
119
|
+
* @returns Object with icon components
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```tsx
|
|
123
|
+
* const icons = createIcons({
|
|
124
|
+
* home: ICON_DATA.home,
|
|
125
|
+
* search: ICON_DATA.search,
|
|
126
|
+
* });
|
|
127
|
+
* <icons.home size={24} />
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
export function createIcons(
|
|
131
|
+
metadataMap: Record<string, IconMetadata>,
|
|
132
|
+
): Record<string, React.FC<IconProps>> {
|
|
133
|
+
const icons: Record<string, React.FC<IconProps>> = {};
|
|
134
|
+
|
|
135
|
+
Object.entries(metadataMap).forEach(([key, metadata]) => {
|
|
136
|
+
icons[key] = createIcon(metadata);
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
return icons;
|
|
140
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { IconProps } from './types';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Base Icon Component
|
|
8
|
+
* Provides a consistent interface for rendering SVG icons
|
|
9
|
+
*/
|
|
10
|
+
export const Icon = React.forwardRef<SVGSVGElement, IconProps>(
|
|
11
|
+
(
|
|
12
|
+
{
|
|
13
|
+
size = 24,
|
|
14
|
+
filled = false,
|
|
15
|
+
className,
|
|
16
|
+
children,
|
|
17
|
+
'aria-label': ariaLabel,
|
|
18
|
+
viewBox = '0 0 24 24',
|
|
19
|
+
...props
|
|
20
|
+
},
|
|
21
|
+
ref
|
|
22
|
+
) => {
|
|
23
|
+
// Convert size to string if it's a number
|
|
24
|
+
const sizeValue = typeof size === 'number' ? `${size}px` : size;
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<svg
|
|
28
|
+
ref={ref}
|
|
29
|
+
width={sizeValue}
|
|
30
|
+
height={sizeValue}
|
|
31
|
+
viewBox={viewBox}
|
|
32
|
+
className={`inline-block ${className || ''}`}
|
|
33
|
+
aria-label={ariaLabel}
|
|
34
|
+
role={ariaLabel ? 'img' : 'presentation'}
|
|
35
|
+
{...props}
|
|
36
|
+
>
|
|
37
|
+
{children}
|
|
38
|
+
</svg>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
Icon.displayName = 'Icon';
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import * as Programming from "./categories/programming";
|
|
2
|
+
import * as App from "./categories/app";
|
|
3
|
+
import * as DesignTools from "./categories/design-tools";
|
|
4
|
+
import * as AI from "./categories/ai";
|
|
5
|
+
import * as Tools from "./categories/tools";
|
|
6
|
+
import * as Framework from "./categories/framework";
|
|
7
|
+
import * as Company from "./categories/company";
|
|
8
|
+
|
|
9
|
+
// Compile all icons from all categories
|
|
10
|
+
export const Oxycons = {
|
|
11
|
+
// Programming
|
|
12
|
+
...Programming,
|
|
13
|
+
// App
|
|
14
|
+
...App,
|
|
15
|
+
// Design Tools
|
|
16
|
+
...DesignTools,
|
|
17
|
+
// AI
|
|
18
|
+
...AI,
|
|
19
|
+
// Tools
|
|
20
|
+
...Tools,
|
|
21
|
+
// Framework
|
|
22
|
+
...Framework,
|
|
23
|
+
// Company
|
|
24
|
+
...Company,
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type OxyconsType = typeof Oxycons;
|
|
28
|
+
|
|
29
|
+
// Get all icon names
|
|
30
|
+
export const getIconNames = (): string[] => {
|
|
31
|
+
return Object.keys(Oxycons);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// Get all categories with their icons
|
|
35
|
+
export const getIconsByCategory = () => {
|
|
36
|
+
// Start with empty arrays for every known category
|
|
37
|
+
const buckets: Record<string, any[]> = {
|
|
38
|
+
programming: [],
|
|
39
|
+
app: [],
|
|
40
|
+
"design-tools": [],
|
|
41
|
+
ai: [],
|
|
42
|
+
tools: [],
|
|
43
|
+
framework: [],
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// Merge all exports into a single map to iterate
|
|
47
|
+
const all: Record<string, any> = {
|
|
48
|
+
...Programming,
|
|
49
|
+
...App,
|
|
50
|
+
...DesignTools,
|
|
51
|
+
...AI,
|
|
52
|
+
...Tools,
|
|
53
|
+
...Framework,
|
|
54
|
+
...Company,
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
Object.entries(all).forEach(([exportName, component]) => {
|
|
58
|
+
if (!component) return;
|
|
59
|
+
|
|
60
|
+
// Try to read metadata attached to the component (created in createIcon)
|
|
61
|
+
const meta = (component as any).metadata;
|
|
62
|
+
|
|
63
|
+
// Prepare an item that includes the export name and the component
|
|
64
|
+
const item = { name: exportName, component };
|
|
65
|
+
|
|
66
|
+
// If metadata includes categories, add the component into each listed category
|
|
67
|
+
if (meta && Array.isArray(meta.categories) && meta.categories.length > 0) {
|
|
68
|
+
meta.categories.forEach((cat: string) => {
|
|
69
|
+
if (!buckets[cat]) buckets[cat] = [];
|
|
70
|
+
buckets[cat].push(item);
|
|
71
|
+
});
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Fallback: add to framework by default
|
|
76
|
+
buckets["framework"].push(item);
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
return buckets;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
// Get category info
|
|
83
|
+
export const getCategoryInfo = (category: string) => {
|
|
84
|
+
const info: Record<string, { name: string; description: string }> = {
|
|
85
|
+
programming: {
|
|
86
|
+
name: "Programming",
|
|
87
|
+
description: "Programming languages and web technologies",
|
|
88
|
+
},
|
|
89
|
+
app: {
|
|
90
|
+
name: "App",
|
|
91
|
+
description: "Application and device related icons",
|
|
92
|
+
},
|
|
93
|
+
"design-tools": {
|
|
94
|
+
name: "Design Tools",
|
|
95
|
+
description: "Design and creative software icons",
|
|
96
|
+
},
|
|
97
|
+
ai: {
|
|
98
|
+
name: "AI",
|
|
99
|
+
description: "Artificial intelligence and machine learning icons",
|
|
100
|
+
},
|
|
101
|
+
tools: {
|
|
102
|
+
name: "Tools",
|
|
103
|
+
description: "Development and utility tools icons",
|
|
104
|
+
},
|
|
105
|
+
framework: {
|
|
106
|
+
name: "Framework",
|
|
107
|
+
description: "Web frameworks and libraries icons",
|
|
108
|
+
},
|
|
109
|
+
company: {
|
|
110
|
+
name: "Company",
|
|
111
|
+
description: "Tech companies and brands icons",
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
return info[category];
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
// All categories
|
|
119
|
+
export const CATEGORIES = [
|
|
120
|
+
"programming",
|
|
121
|
+
"app",
|
|
122
|
+
"design-tools",
|
|
123
|
+
"ai",
|
|
124
|
+
"tools",
|
|
125
|
+
"framework",
|
|
126
|
+
"company",
|
|
127
|
+
];
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
/**
|
|
3
|
+
* Oxycons Icon Library Types
|
|
4
|
+
* Core type definitions for the icon system
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export interface IconProps extends React.SVGAttributes<SVGSVGElement> {
|
|
8
|
+
/** Size of the icon in pixels */
|
|
9
|
+
size?: number | string;
|
|
10
|
+
/** Whether the icon is filled */
|
|
11
|
+
filled?: boolean;
|
|
12
|
+
/** Custom CSS class for styling */
|
|
13
|
+
className?: string;
|
|
14
|
+
/** ARIA label for accessibility */
|
|
15
|
+
'aria-label'?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface PathData {
|
|
19
|
+
/** SVG path d attribute */
|
|
20
|
+
d: string;
|
|
21
|
+
/** Fill color for the path */
|
|
22
|
+
fill?: string;
|
|
23
|
+
/** Stroke color for the path */
|
|
24
|
+
stroke?: string;
|
|
25
|
+
/** Fill opacity */
|
|
26
|
+
fillOpacity?: number;
|
|
27
|
+
/** Stroke opacity */
|
|
28
|
+
strokeOpacity?: number;
|
|
29
|
+
/** Opacity for the entire path */
|
|
30
|
+
opacity?: number;
|
|
31
|
+
/** Stroke width */
|
|
32
|
+
strokeWidth?: string | number;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface IconMetadata {
|
|
36
|
+
/** Icon name/identifier */
|
|
37
|
+
name: string;
|
|
38
|
+
/** SVG viewBox attribute */
|
|
39
|
+
viewBox?: string;
|
|
40
|
+
/** SVG path data - supports single string or array of paths */
|
|
41
|
+
path?: string;
|
|
42
|
+
/** Multiple paths for complex icons */
|
|
43
|
+
paths?: PathData[];
|
|
44
|
+
/** Full SVG code as a string */
|
|
45
|
+
svg?: string;
|
|
46
|
+
/** Whether the icon has a filled variant */
|
|
47
|
+
hasFilled?: boolean;
|
|
48
|
+
/** Icon categories for organization */
|
|
49
|
+
categories?: string[];
|
|
50
|
+
/** Search keywords for the icon */
|
|
51
|
+
keywords?: string[];
|
|
52
|
+
/** Icon version */
|
|
53
|
+
version?: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export type IconComponent = React.FC<IconProps>;
|
|
57
|
+
|
|
58
|
+
export interface IconLibraryConfig {
|
|
59
|
+
/** Library name */
|
|
60
|
+
name: string;
|
|
61
|
+
/** Library version */
|
|
62
|
+
version: string;
|
|
63
|
+
/** Library description */
|
|
64
|
+
description: string;
|
|
65
|
+
/** Total number of icons */
|
|
66
|
+
totalIcons: number;
|
|
67
|
+
/** Available categories */
|
|
68
|
+
categories: string[];
|
|
69
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@onimuxha/oxycons",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "A modern, comprehensive icon library for React applications with TypeScript support",
|
|
5
|
+
"private": false,
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Endo Design",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/endo-design/oxycons"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/endo-design/oxycons",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/endo-design/oxycons/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"icons",
|
|
18
|
+
"react",
|
|
19
|
+
"typescript",
|
|
20
|
+
"svg",
|
|
21
|
+
"icon-library",
|
|
22
|
+
"ui-icons",
|
|
23
|
+
"design-system"
|
|
24
|
+
],
|
|
25
|
+
"files": [
|
|
26
|
+
"lib/icons",
|
|
27
|
+
"README.md",
|
|
28
|
+
"LICENSE"
|
|
29
|
+
],
|
|
30
|
+
"main": "./lib/icons/index.ts",
|
|
31
|
+
"types": "./lib/icons/index.ts",
|
|
32
|
+
"exports": {
|
|
33
|
+
".": {
|
|
34
|
+
"types": "./lib/icons/index.ts",
|
|
35
|
+
"default": "./lib/icons/index.ts"
|
|
36
|
+
},
|
|
37
|
+
"./icons": {
|
|
38
|
+
"default": "./lib/icons/icons.ts"
|
|
39
|
+
},
|
|
40
|
+
"./data": {
|
|
41
|
+
"default": "./lib/icons/data.ts"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@hookform/resolvers": "^3.9.1",
|
|
46
|
+
"@radix-ui/react-accordion": "1.2.2",
|
|
47
|
+
"@radix-ui/react-alert-dialog": "1.1.4",
|
|
48
|
+
"@radix-ui/react-aspect-ratio": "1.1.1",
|
|
49
|
+
"@radix-ui/react-avatar": "1.1.2",
|
|
50
|
+
"@radix-ui/react-checkbox": "1.1.3",
|
|
51
|
+
"@radix-ui/react-collapsible": "1.1.2",
|
|
52
|
+
"@radix-ui/react-context-menu": "2.2.4",
|
|
53
|
+
"@radix-ui/react-dialog": "1.1.4",
|
|
54
|
+
"@radix-ui/react-dropdown-menu": "2.1.4",
|
|
55
|
+
"@radix-ui/react-hover-card": "1.1.4",
|
|
56
|
+
"@radix-ui/react-label": "2.1.1",
|
|
57
|
+
"@radix-ui/react-menubar": "1.1.4",
|
|
58
|
+
"@radix-ui/react-navigation-menu": "1.2.3",
|
|
59
|
+
"@radix-ui/react-popover": "1.1.4",
|
|
60
|
+
"@radix-ui/react-progress": "1.1.1",
|
|
61
|
+
"@radix-ui/react-radio-group": "1.2.2",
|
|
62
|
+
"@radix-ui/react-scroll-area": "1.2.2",
|
|
63
|
+
"@radix-ui/react-select": "2.1.4",
|
|
64
|
+
"@radix-ui/react-separator": "1.1.1",
|
|
65
|
+
"@radix-ui/react-slider": "1.2.2",
|
|
66
|
+
"@radix-ui/react-slot": "1.1.1",
|
|
67
|
+
"@radix-ui/react-switch": "1.1.2",
|
|
68
|
+
"@radix-ui/react-tabs": "1.1.2",
|
|
69
|
+
"@radix-ui/react-toast": "1.2.4",
|
|
70
|
+
"@radix-ui/react-toggle": "1.1.1",
|
|
71
|
+
"@radix-ui/react-toggle-group": "1.1.1",
|
|
72
|
+
"@radix-ui/react-tooltip": "1.1.6",
|
|
73
|
+
"autoprefixer": "^10.4.20",
|
|
74
|
+
"class-variance-authority": "^0.7.1",
|
|
75
|
+
"clsx": "^2.1.1",
|
|
76
|
+
"cmdk": "1.1.1",
|
|
77
|
+
"date-fns": "4.1.0",
|
|
78
|
+
"embla-carousel-react": "8.5.1",
|
|
79
|
+
"framer-motion": "^11.18.2",
|
|
80
|
+
"input-otp": "1.4.1",
|
|
81
|
+
"lenis": "^1.3.17",
|
|
82
|
+
"lucide-react": "^0.544.0",
|
|
83
|
+
"next": "16.1.6",
|
|
84
|
+
"next-themes": "^0.4.6",
|
|
85
|
+
"react": "^19",
|
|
86
|
+
"react-day-picker": "8.10.1",
|
|
87
|
+
"react-dom": "^19",
|
|
88
|
+
"react-hook-form": "^7.54.1",
|
|
89
|
+
"react-resizable-panels": "^2.1.7",
|
|
90
|
+
"recharts": "2.15.0",
|
|
91
|
+
"sonner": "^1.7.1",
|
|
92
|
+
"tailwind-merge": "^2.5.5",
|
|
93
|
+
"tailwindcss-animate": "^1.0.7",
|
|
94
|
+
"vaul": "^1.1.2",
|
|
95
|
+
"zod": "^3.24.1"
|
|
96
|
+
},
|
|
97
|
+
"devDependencies": {
|
|
98
|
+
"@tailwindcss/postcss": "^4.1.13",
|
|
99
|
+
"@types/node": "^22",
|
|
100
|
+
"@types/react": "^19",
|
|
101
|
+
"@types/react-dom": "^19",
|
|
102
|
+
"postcss": "^8.5",
|
|
103
|
+
"tailwindcss": "^3.4.17",
|
|
104
|
+
"typescript": "5.7.3"
|
|
105
|
+
},
|
|
106
|
+
"scripts": {
|
|
107
|
+
"dev": "next dev",
|
|
108
|
+
"build": "next build",
|
|
109
|
+
"start": "next start",
|
|
110
|
+
"lint": "eslint .",
|
|
111
|
+
"generate:icons": "node scripts/generate-icons.js",
|
|
112
|
+
"generate:icons:verbose": "node scripts/generate-icons.js --verbose",
|
|
113
|
+
"update:indexes": "node scripts/update-indexes.js"
|
|
114
|
+
}
|
|
115
|
+
}
|