@timmbr/icons 1.0.0-beta

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 ADDED
@@ -0,0 +1,32 @@
1
+ # @timmbr/icons
2
+
3
+ Icon abstraction system wrapping `lucide-react` icons and custom SVG icons under a unified, performant API for the Timmbr Design System.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pnpm add @timmbr/icons --filter @timmbr/ui
9
+ ```
10
+
11
+ ## Features
12
+
13
+ - **Standardized API**: Every icon supports `size`, `customSize`, `className`, and SVG attributes.
14
+ - **Lucide Integration**: Seamlessly wrap any icon from `lucide-react`.
15
+ - **Custom SVGs**: First-class support for custom branded SVGs (`LogoIcon`, `SpinnerIcon`, etc.).
16
+
17
+ ## Usage
18
+
19
+ ```tsx
20
+ import { Icon, ChevronDown, LogoIcon, SpinnerIcon } from '@timmbr/icons';
21
+
22
+ // Using a Lucide Icon
23
+ export function Example() {
24
+ return (
25
+ <div className="flex items-center gap-4">
26
+ <Icon icon={ChevronDown} size={20} className="text-brand-500" />
27
+ <Icon icon={LogoIcon} size={32} />
28
+ <Icon icon={SpinnerIcon} size={24} />
29
+ </div>
30
+ );
31
+ }
32
+ ```
package/dist/Icon.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import type { IconProps } from './Icon.types';
3
+ export declare const Icon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
4
+ //# sourceMappingURL=Icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../src/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,eAAO,MAAM,IAAI,iFAYhB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type React from 'react';
2
+ import type { LucideProps } from 'lucide-react';
3
+ export interface IconProps extends Omit<LucideProps, 'ref'> {
4
+ icon: React.ElementType;
5
+ customSize?: boolean;
6
+ }
7
+ //# sourceMappingURL=Icon.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Icon.types.d.ts","sourceRoot":"","sources":["../src/Icon.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC;IACzD,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ export declare const LogoIcon: React.FC<React.SVGProps<SVGSVGElement>>;
3
+ //# sourceMappingURL=LogoIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogoIcon.d.ts","sourceRoot":"","sources":["../../src/custom/LogoIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAgB5D,CAAC"}
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ export interface SpinnerIconProps extends React.SVGProps<SVGSVGElement> {
3
+ size?: number | string;
4
+ }
5
+ export declare const SpinnerIcon: React.FC<SpinnerIconProps>;
6
+ //# sourceMappingURL=SpinnerIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SpinnerIcon.d.ts","sourceRoot":"","sources":["../../src/custom/SpinnerIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,WAAW,gBAAiB,SAAQ,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC;IACrE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAsClD,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './LogoIcon';
2
+ export * from './SpinnerIcon';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/custom/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './Icon';
2
+ export * from './Icon.types';
3
+ export * from './custom';
4
+ export { ChevronDown, ChevronUp, ChevronRight, ChevronLeft, Check, CheckCircle, X, AlertCircle, AlertTriangle, Info, Loader2, Sparkles, ArrowRight, ArrowLeft, Download, Heart, Search, Bell, Share2, Eye, EyeOff, TrendingUp, TrendingDown, MoreHorizontal, MoreVertical, } from 'lucide-react';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AAGzB,OAAO,EACL,WAAW,EACX,SAAS,EACT,YAAY,EACZ,WAAW,EACX,KAAK,EACL,WAAW,EACX,CAAC,EACD,WAAW,EACX,aAAa,EACb,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,UAAU,EACV,SAAS,EACT,QAAQ,EACR,KAAK,EACL,MAAM,EACN,IAAI,EACJ,MAAM,EACN,GAAG,EACH,MAAM,EACN,UAAU,EACV,YAAY,EACZ,cAAc,EACd,YAAY,GACb,MAAM,cAAc,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,113 @@
1
+ import { jsx as o, jsxs as c } from "react/jsx-runtime";
2
+ import * as s from "react";
3
+ import { cn as l } from "@timmbr/utils";
4
+ import { AlertCircle as v, AlertTriangle as C, ArrowLeft as x, ArrowRight as u, Bell as y, Check as L, CheckCircle as I, ChevronDown as H, ChevronLeft as M, ChevronRight as A, ChevronUp as N, Download as W, Eye as D, EyeOff as R, Heart as S, Info as j, Loader2 as B, MoreHorizontal as T, MoreVertical as E, Search as O, Share2 as U, Sparkles as V, TrendingDown as X, TrendingUp as b, X as q } from "lucide-react";
5
+ const h = s.forwardRef(
6
+ ({ icon: r, className: t, size: e = 24, customSize: n = !1, ...i }, a) => /* @__PURE__ */ o(
7
+ r,
8
+ {
9
+ ref: a,
10
+ width: n ? void 0 : e,
11
+ height: n ? void 0 : e,
12
+ className: l("shrink-0 text-current transition-transform", t),
13
+ ...i
14
+ }
15
+ )
16
+ );
17
+ h.displayName = "Icon";
18
+ const d = (r) => /* @__PURE__ */ c(
19
+ "svg",
20
+ {
21
+ viewBox: "0 0 32 32",
22
+ fill: "none",
23
+ xmlns: "http://www.w3.org/2000/svg",
24
+ ...r,
25
+ children: [
26
+ /* @__PURE__ */ o("rect", { width: "32", height: "32", rx: "8", fill: "currentColor", fillOpacity: "0.1" }),
27
+ /* @__PURE__ */ o(
28
+ "path",
29
+ {
30
+ d: "M8 10H24M16 10V24M11 24H21",
31
+ stroke: "currentColor",
32
+ strokeWidth: "2.5",
33
+ strokeLinecap: "round",
34
+ strokeLinejoin: "round"
35
+ }
36
+ )
37
+ ]
38
+ }
39
+ );
40
+ d.displayName = "LogoIcon";
41
+ const p = ({
42
+ size: r,
43
+ width: t,
44
+ height: e,
45
+ className: n,
46
+ ...i
47
+ }) => /* @__PURE__ */ c(
48
+ "svg",
49
+ {
50
+ width: t ?? r ?? 24,
51
+ height: e ?? r ?? 24,
52
+ viewBox: "0 0 24 24",
53
+ fill: "none",
54
+ xmlns: "http://www.w3.org/2000/svg",
55
+ className: l("animate-spin", n),
56
+ ...i,
57
+ children: [
58
+ /* @__PURE__ */ o(
59
+ "circle",
60
+ {
61
+ cx: "12",
62
+ cy: "12",
63
+ r: "10",
64
+ stroke: "currentColor",
65
+ strokeWidth: "3",
66
+ strokeDasharray: "31.415, 31.415",
67
+ strokeLinecap: "round",
68
+ opacity: "0.25"
69
+ }
70
+ ),
71
+ /* @__PURE__ */ o(
72
+ "path",
73
+ {
74
+ d: "M12 2A10 10 0 0 1 22 12",
75
+ stroke: "currentColor",
76
+ strokeWidth: "3",
77
+ strokeLinecap: "round"
78
+ }
79
+ )
80
+ ]
81
+ }
82
+ );
83
+ p.displayName = "SpinnerIcon";
84
+ export {
85
+ v as AlertCircle,
86
+ C as AlertTriangle,
87
+ x as ArrowLeft,
88
+ u as ArrowRight,
89
+ y as Bell,
90
+ L as Check,
91
+ I as CheckCircle,
92
+ H as ChevronDown,
93
+ M as ChevronLeft,
94
+ A as ChevronRight,
95
+ N as ChevronUp,
96
+ W as Download,
97
+ D as Eye,
98
+ R as EyeOff,
99
+ S as Heart,
100
+ h as Icon,
101
+ j as Info,
102
+ B as Loader2,
103
+ d as LogoIcon,
104
+ T as MoreHorizontal,
105
+ E as MoreVertical,
106
+ O as Search,
107
+ U as Share2,
108
+ V as Sparkles,
109
+ p as SpinnerIcon,
110
+ X as TrendingDown,
111
+ b as TrendingUp,
112
+ q as X
113
+ };
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@timmbr/icons",
3
+ "version": "1.0.0-beta",
4
+ "description": "Unified icon system wrapping Lucide and custom SVGs for Timmbr Design System",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "default": "./dist/index.js"
14
+ }
15
+ },
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "publishConfig": {
20
+ "access": "public"
21
+ },
22
+ "dependencies": {
23
+ "lucide-react": "^1.16.0",
24
+ "@timmbr/utils": "1.0.0-beta"
25
+ },
26
+ "peerDependencies": {
27
+ "react": ">=18.0.0",
28
+ "react-dom": ">=18.0.0"
29
+ },
30
+ "devDependencies": {
31
+ "@types/react": "^19.0.8",
32
+ "@types/react-dom": "^19.0.3",
33
+ "@vitejs/plugin-react": "^4.3.4",
34
+ "react": "^19.0.0",
35
+ "react-dom": "^19.0.0",
36
+ "rimraf": "^6.0.1",
37
+ "typescript": "^5.7.3",
38
+ "vite": "^6.2.0",
39
+ "@timmbr/tsconfig": "1.0.0"
40
+ },
41
+ "scripts": {
42
+ "build": "vite build && tsc --emitDeclarationOnly",
43
+ "dev": "vite build --watch",
44
+ "clean": "rimraf dist"
45
+ }
46
+ }