firebird-icon-lib 1.0.0

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 ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Firebird Icon Library
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.
22
+
package/README.md ADDED
@@ -0,0 +1,130 @@
1
+ # Firebird Icon Library
2
+
3
+ A lightweight, TypeScript-first React icon library with dynamic SVG icon loading. Easily add and use SVG icons in your React applications with full type safety.
4
+
5
+ ## Features
6
+
7
+ - 🎯 **TypeScript Support** - Full type definitions included
8
+ - ⚡ **Dynamic Icon Loading** - Automatically discovers icons from the `icons/` directory
9
+ - 🎨 **Customizable** - Control size, color, and styling with props
10
+ - 📦 **Tree-shakeable** - Only includes icons you use
11
+ - 🚀 **Zero Runtime** - Icons are compiled at build time
12
+ - ♿ **Accessible** - Includes proper ARIA attributes
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ npm install firebird-icon-lib
18
+ # or
19
+ yarn add firebird-icon-lib
20
+ # or
21
+ pnpm add firebird-icon-lib
22
+ ```
23
+
24
+ ## Peer Dependencies
25
+
26
+ This library requires React 16.8.0 or higher:
27
+
28
+ ```bash
29
+ npm install react react-dom
30
+ ```
31
+
32
+ ## Usage
33
+
34
+ ### Basic Usage
35
+
36
+ ```tsx
37
+ import { Icon } from 'firebird-icon-lib';
38
+
39
+ function App() {
40
+ return (
41
+ <div>
42
+ <Icon name="add" size={24} />
43
+ <Icon name="delete" size={32} color="#ff0000" />
44
+ </div>
45
+ );
46
+ }
47
+ ```
48
+
49
+ ### With Custom Styling
50
+
51
+ ```tsx
52
+ import { Icon } from 'firebird-icon-lib';
53
+
54
+ function App() {
55
+ return (
56
+ <Icon
57
+ name="add"
58
+ size={48}
59
+ color="#646cff"
60
+ className="my-custom-icon"
61
+ style={{ margin: '10px' }}
62
+ />
63
+ );
64
+ }
65
+ ```
66
+
67
+ ### Available Icons
68
+
69
+ The library includes the following icons by default:
70
+ - `add` - Plus/add icon
71
+ - `delete` - Delete/trash icon
72
+
73
+ ## API
74
+
75
+ ### Icon Component Props
76
+
77
+ | Prop | Type | Default | Description |
78
+ |------|------|---------|-------------|
79
+ | `name` | `IconName` | **required** | The name of the icon to display |
80
+ | `size` | `number \| string` | `24` | Size of the icon (in pixels or CSS units) |
81
+ | `color` | `string` | - | Color of the icon (uses `currentColor` by default) |
82
+ | `className` | `string` | - | Additional CSS class names |
83
+ | `style` | `React.CSSProperties` | - | Inline styles to apply |
84
+
85
+ ### TypeScript Types
86
+
87
+ ```tsx
88
+ import type { IconProps, IconName } from 'firebird-icon-lib';
89
+
90
+ // IconName is a union type of available icon names
91
+ const iconName: IconName = 'add'; // ✅
92
+ const invalidName: IconName = 'invalid'; // ❌ TypeScript error
93
+ ```
94
+
95
+ ## Adding Custom Icons
96
+
97
+ To add your own icons:
98
+
99
+ 1. Place SVG files in the `src/icons/` directory
100
+ 2. The icon name will be automatically derived from the filename
101
+ 3. For example, `src/icons/my-icon.svg` becomes `name="my-icon"`
102
+
103
+ **Note:** SVG files should use `stroke="currentColor"` or `fill="currentColor"` to support the `color` prop.
104
+
105
+ ## Development
106
+
107
+ ```bash
108
+ # Install dependencies
109
+ npm install
110
+
111
+ # Run development server
112
+ npm run dev
113
+
114
+ # Build for production
115
+ npm run build
116
+
117
+ # Run tests
118
+ npm test
119
+
120
+ # Format code
121
+ npm run format
122
+ ```
123
+
124
+ ## License
125
+
126
+ MIT
127
+
128
+ ## Contributing
129
+
130
+ Contributions are welcome! Please feel free to submit a Pull Request.
package/dist/Icon.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ export declare const iconMap: Record<string, React.FC<React.SVGProps<SVGSVGElement>>>;
3
+ export type IconName = keyof typeof iconMap;
4
+ export interface IconProps extends Omit<React.SVGProps<SVGSVGElement>, 'width' | 'height' | 'color'> {
5
+ name: IconName;
6
+ size?: number | string;
7
+ color?: string;
8
+ className?: string;
9
+ }
10
+ declare const Icon: React.FC<IconProps>;
11
+ export default Icon;
12
+ //# 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,MAAM,OAAO,CAAC;AAS1B,eAAO,MAAM,OAAO,EAAE,MAAM,CAC1B,MAAM,EACN,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CACnC,CAAC;AAmCP,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,OAAO,CAAC;AAE5C,MAAM,WAAW,SAAU,SAAQ,IAAI,CACrC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,EAC7B,OAAO,GAAG,QAAQ,GAAG,OAAO,CAC7B;IACC,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAkC7B,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2
+ <line x1="12" y1="5" x2="12" y2="19"></line>
3
+ <line x1="5" y1="12" x2="19" y2="12"></line>
4
+ </svg>
5
+
@@ -0,0 +1,7 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2
+ <polyline points="3 6 5 6 21 6"></polyline>
3
+ <path d="m19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path>
4
+ <line x1="10" y1="11" x2="10" y2="17"></line>
5
+ <line x1="14" y1="11" x2="14" y2="17"></line>
6
+ </svg>
7
+
@@ -0,0 +1,3 @@
1
+ export { default as Icon, type IconProps, type IconName } from './Icon';
2
+ export { default } from './Icon';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC"}
@@ -0,0 +1,6 @@
1
+ Object.defineProperty(exports,`__esModule`,{value:!0});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));require(`react`);var l=o((e=>{var t=Symbol.for(`react.transitional.element`);function n(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.jsx=n,e.jsxs=n})),u=o((e=>{process.env.NODE_ENV!==`production`&&(function(){function t(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===O?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case C:return`Suspense`;case w:return`SuspenseList`;case D:return`Activity`}if(typeof e==`object`)switch(typeof e.tag==`number`&&console.error(`Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.`),e.$$typeof){case g:return`Portal`;case x:return e.displayName||`Context`;case b:return(e._context.displayName||`Context`)+`.Consumer`;case S:var n=e.render;return e=e.displayName,e||=(e=n.displayName||n.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case T:return n=e.displayName||null,n===null?t(e.type)||`Memo`:n;case E:n=e._payload,e=e._init;try{return t(e(n))}catch{}}return null}function n(e){return``+e}function r(e){try{n(e);var t=!1}catch{t=!0}if(t){t=console;var r=t.error,i=typeof Symbol==`function`&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||`Object`;return r.call(t,`The provided key is an unsupported type %s. This value must be coerced to a string before using it here.`,i),n(e)}}function i(e){if(e===_)return`<>`;if(typeof e==`object`&&e&&e.$$typeof===E)return`<...>`;try{var n=t(e);return n?`<`+n+`>`:`<...>`}catch{return`<...>`}}function a(){var e=k.A;return e===null?null:e.getOwner()}function o(){return Error(`react-stack-top-frame`)}function s(e){if(A.call(e,`key`)){var t=Object.getOwnPropertyDescriptor(e,`key`).get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function c(e,t){function n(){N||(N=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}n.isReactWarning=!0,Object.defineProperty(e,`key`,{get:n,configurable:!0})}function l(){var e=t(this.type);return P[e]||(P[e]=!0,console.error(`Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.`)),e=this.props.ref,e===void 0?null:e}function u(e,t,n,r,i,a){var o=n.ref;return e={$$typeof:h,type:e,key:t,props:n,_owner:r},(o===void 0?null:o)===null?Object.defineProperty(e,`ref`,{enumerable:!1,value:null}):Object.defineProperty(e,`ref`,{enumerable:!1,get:l}),e._store={},Object.defineProperty(e._store,`validated`,{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,`_debugInfo`,{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,`_debugStack`,{configurable:!1,enumerable:!1,writable:!0,value:i}),Object.defineProperty(e,`_debugTask`,{configurable:!1,enumerable:!1,writable:!0,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function d(e,n,i,o,l,d){var p=n.children;if(p!==void 0)if(o)if(j(p)){for(o=0;o<p.length;o++)f(p[o]);Object.freeze&&Object.freeze(p)}else console.error(`React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.`);else f(p);if(A.call(n,`key`)){p=t(e);var m=Object.keys(n).filter(function(e){return e!==`key`});o=0<m.length?`{key: someKey, `+m.join(`: ..., `)+`: ...}`:`{key: someKey}`,L[p+o]||(m=0<m.length?`{`+m.join(`: ..., `)+`: ...}`:`{}`,console.error(`A props object containing a "key" prop is being spread into JSX:
2
+ let props = %s;
3
+ <%s {...props} />
4
+ React keys must be passed directly to JSX without using spread:
5
+ let props = %s;
6
+ <%s key={someKey} {...props} />`,o,p,m,p),L[p+o]=!0)}if(p=null,i!==void 0&&(r(i),p=``+i),s(n)&&(r(n.key),p=``+n.key),`key`in n)for(var h in i={},n)h!==`key`&&(i[h]=n[h]);else i=n;return p&&c(i,typeof e==`function`?e.displayName||e.name||`Unknown`:e),u(e,p,i,a(),l,d)}function f(e){p(e)?e._store&&(e._store.validated=1):typeof e==`object`&&e&&e.$$typeof===E&&(e._payload.status===`fulfilled`?p(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function p(e){return typeof e==`object`&&!!e&&e.$$typeof===h}var m=require(`react`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),b=Symbol.for(`react.consumer`),x=Symbol.for(`react.context`),S=Symbol.for(`react.forward_ref`),C=Symbol.for(`react.suspense`),w=Symbol.for(`react.suspense_list`),T=Symbol.for(`react.memo`),E=Symbol.for(`react.lazy`),D=Symbol.for(`react.activity`),O=Symbol.for(`react.client.reference`),k=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=Object.prototype.hasOwnProperty,j=Array.isArray,M=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(e){return e()}};var N,P={},F=m.react_stack_bottom_frame.bind(m,o)(),I=M(i(o)),L={};e.Fragment=_,e.jsx=function(e,t,n){var r=1e4>k.recentlyCreatedOwnerStacks++;return d(e,t,n,!1,r?Error(`react-stack-top-frame`):F,r?M(i(e)):I)},e.jsxs=function(e,t,n){var r=1e4>k.recentlyCreatedOwnerStacks++;return d(e,t,n,!0,r?Error(`react-stack-top-frame`):F,r?M(i(e)):I)}})()})),d=o(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=l():t.exports=u()})),f=d(),p=e=>(0,f.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,width:`1em`,height:`1em`,...e,children:[(0,f.jsx)(`line`,{x1:12,y1:5,x2:12,y2:19}),(0,f.jsx)(`line`,{x1:5,y1:12,x2:19,y2:12})]}),m=p,h=e=>(0,f.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,width:`1em`,height:`1em`,...e,children:[(0,f.jsx)(`polyline`,{points:`3 6 5 6 21 6`}),(0,f.jsx)(`path`,{d:`m19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}),(0,f.jsx)(`line`,{x1:10,y1:11,x2:10,y2:17}),(0,f.jsx)(`line`,{x1:14,y1:11,x2:14,y2:17})]}),g=h,_={"./icons/add.svg":m,"./icons/delete.svg":g};const v={};Object.entries(_).forEach(([e,t])=>{let n=(e.split(`/`).pop()||``).replace(`.svg`,``),r=t?.default||t;n&&r&&typeof r==`function`&&(v[n]=r)});var y=({name:e,size:t=24,color:n,className:r,style:i,...a})=>{let o=v[e];return o?(0,f.jsx)(o,{width:t,height:t,className:r,style:{display:`inline-block`,verticalAlign:`middle`,...i,...n&&{color:n}},"aria-hidden":`true`,...a}):null},b=y;exports.Icon=b,exports.default=b;
@@ -0,0 +1,254 @@
1
+ import "react";
2
+ var __commonJSMin = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), __require = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
3
+ if (typeof require < "u") return require.apply(this, arguments);
4
+ throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function.");
5
+ }), require_react_jsx_runtime_production = /* @__PURE__ */ __commonJSMin(((e) => {
6
+ var t = Symbol.for("react.transitional.element");
7
+ function n(e, n, r) {
8
+ var i = null;
9
+ if (r !== void 0 && (i = "" + r), n.key !== void 0 && (i = "" + n.key), "key" in n) for (var a in r = {}, n) a !== "key" && (r[a] = n[a]);
10
+ else r = n;
11
+ return n = r.ref, {
12
+ $$typeof: t,
13
+ type: e,
14
+ key: i,
15
+ ref: n === void 0 ? null : n,
16
+ props: r
17
+ };
18
+ }
19
+ e.jsx = n, e.jsxs = n;
20
+ })), require_react_jsx_runtime_development = /* @__PURE__ */ __commonJSMin(((e) => {
21
+ process.env.NODE_ENV !== "production" && (function() {
22
+ function n(e) {
23
+ if (e == null) return null;
24
+ if (typeof e == "function") return e.$$typeof === k ? null : e.displayName || e.name || null;
25
+ if (typeof e == "string") return e;
26
+ switch (e) {
27
+ case v: return "Fragment";
28
+ case b: return "Profiler";
29
+ case y: return "StrictMode";
30
+ case w: return "Suspense";
31
+ case T: return "SuspenseList";
32
+ case O: return "Activity";
33
+ }
34
+ if (typeof e == "object") switch (typeof e.tag == "number" && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), e.$$typeof) {
35
+ case _: return "Portal";
36
+ case S: return e.displayName || "Context";
37
+ case x: return (e._context.displayName || "Context") + ".Consumer";
38
+ case C:
39
+ var t = e.render;
40
+ return e = e.displayName, e ||= (e = t.displayName || t.name || "", e === "" ? "ForwardRef" : "ForwardRef(" + e + ")"), e;
41
+ case E: return t = e.displayName || null, t === null ? n(e.type) || "Memo" : t;
42
+ case D:
43
+ t = e._payload, e = e._init;
44
+ try {
45
+ return n(e(t));
46
+ } catch {}
47
+ }
48
+ return null;
49
+ }
50
+ function r(e) {
51
+ return "" + e;
52
+ }
53
+ function i(e) {
54
+ try {
55
+ r(e);
56
+ var t = !1;
57
+ } catch {
58
+ t = !0;
59
+ }
60
+ if (t) {
61
+ t = console;
62
+ var n = t.error, i = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
63
+ return n.call(t, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", i), r(e);
64
+ }
65
+ }
66
+ function a(e) {
67
+ if (e === v) return "<>";
68
+ if (typeof e == "object" && e && e.$$typeof === D) return "<...>";
69
+ try {
70
+ var t = n(e);
71
+ return t ? "<" + t + ">" : "<...>";
72
+ } catch {
73
+ return "<...>";
74
+ }
75
+ }
76
+ function o() {
77
+ var e = A.A;
78
+ return e === null ? null : e.getOwner();
79
+ }
80
+ function s() {
81
+ return Error("react-stack-top-frame");
82
+ }
83
+ function c(e) {
84
+ if (j.call(e, "key")) {
85
+ var t = Object.getOwnPropertyDescriptor(e, "key").get;
86
+ if (t && t.isReactWarning) return !1;
87
+ }
88
+ return e.key !== void 0;
89
+ }
90
+ function l(e, t) {
91
+ function n() {
92
+ P || (P = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", t));
93
+ }
94
+ n.isReactWarning = !0, Object.defineProperty(e, "key", {
95
+ get: n,
96
+ configurable: !0
97
+ });
98
+ }
99
+ function u() {
100
+ var e = n(this.type);
101
+ return F[e] || (F[e] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")), e = this.props.ref, e === void 0 ? null : e;
102
+ }
103
+ function d(e, t, n, r, i, a) {
104
+ var o = n.ref;
105
+ return e = {
106
+ $$typeof: g,
107
+ type: e,
108
+ key: t,
109
+ props: n,
110
+ _owner: r
111
+ }, (o === void 0 ? null : o) === null ? Object.defineProperty(e, "ref", {
112
+ enumerable: !1,
113
+ value: null
114
+ }) : Object.defineProperty(e, "ref", {
115
+ enumerable: !1,
116
+ get: u
117
+ }), e._store = {}, Object.defineProperty(e._store, "validated", {
118
+ configurable: !1,
119
+ enumerable: !1,
120
+ writable: !0,
121
+ value: 0
122
+ }), Object.defineProperty(e, "_debugInfo", {
123
+ configurable: !1,
124
+ enumerable: !1,
125
+ writable: !0,
126
+ value: null
127
+ }), Object.defineProperty(e, "_debugStack", {
128
+ configurable: !1,
129
+ enumerable: !1,
130
+ writable: !0,
131
+ value: i
132
+ }), Object.defineProperty(e, "_debugTask", {
133
+ configurable: !1,
134
+ enumerable: !1,
135
+ writable: !0,
136
+ value: a
137
+ }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
138
+ }
139
+ function f(e, t, r, a, s, u) {
140
+ var f = t.children;
141
+ if (f !== void 0) if (a) if (M(f)) {
142
+ for (a = 0; a < f.length; a++) p(f[a]);
143
+ Object.freeze && Object.freeze(f);
144
+ } else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
145
+ else p(f);
146
+ if (j.call(t, "key")) {
147
+ f = n(e);
148
+ var m = Object.keys(t).filter(function(e) {
149
+ return e !== "key";
150
+ });
151
+ a = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", R[f + a] || (m = 0 < m.length ? "{" + m.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", a, f, m, f), R[f + a] = !0);
152
+ }
153
+ if (f = null, r !== void 0 && (i(r), f = "" + r), c(t) && (i(t.key), f = "" + t.key), "key" in t) for (var h in r = {}, t) h !== "key" && (r[h] = t[h]);
154
+ else r = t;
155
+ return f && l(r, typeof e == "function" ? e.displayName || e.name || "Unknown" : e), d(e, f, r, o(), s, u);
156
+ }
157
+ function p(e) {
158
+ m(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e && e.$$typeof === D && (e._payload.status === "fulfilled" ? m(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
159
+ }
160
+ function m(e) {
161
+ return typeof e == "object" && !!e && e.$$typeof === g;
162
+ }
163
+ var h = __require("react"), g = Symbol.for("react.transitional.element"), _ = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), x = Symbol.for("react.consumer"), S = Symbol.for("react.context"), C = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), T = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), k = Symbol.for("react.client.reference"), A = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, j = Object.prototype.hasOwnProperty, M = Array.isArray, N = console.createTask ? console.createTask : function() {
164
+ return null;
165
+ };
166
+ h = { react_stack_bottom_frame: function(e) {
167
+ return e();
168
+ } };
169
+ var P, F = {}, I = h.react_stack_bottom_frame.bind(h, s)(), L = N(a(s)), R = {};
170
+ e.Fragment = v, e.jsx = function(e, t, n) {
171
+ var r = 1e4 > A.recentlyCreatedOwnerStacks++;
172
+ return f(e, t, n, !1, r ? Error("react-stack-top-frame") : I, r ? N(a(e)) : L);
173
+ }, e.jsxs = function(e, t, n) {
174
+ var r = 1e4 > A.recentlyCreatedOwnerStacks++;
175
+ return f(e, t, n, !0, r ? Error("react-stack-top-frame") : I, r ? N(a(e)) : L);
176
+ };
177
+ })();
178
+ })), import_jsx_runtime = (/* @__PURE__ */ __commonJSMin(((e, t) => {
179
+ process.env.NODE_ENV === "production" ? t.exports = require_react_jsx_runtime_production() : t.exports = require_react_jsx_runtime_development();
180
+ })))(), add_default = (e) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
181
+ xmlns: "http://www.w3.org/2000/svg",
182
+ viewBox: "0 0 24 24",
183
+ fill: "none",
184
+ stroke: "currentColor",
185
+ strokeWidth: 2,
186
+ strokeLinecap: "round",
187
+ strokeLinejoin: "round",
188
+ width: "1em",
189
+ height: "1em",
190
+ ...e,
191
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", {
192
+ x1: 12,
193
+ y1: 5,
194
+ x2: 12,
195
+ y2: 19
196
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", {
197
+ x1: 5,
198
+ y1: 12,
199
+ x2: 19,
200
+ y2: 12
201
+ })]
202
+ }), delete_default = (e) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
203
+ xmlns: "http://www.w3.org/2000/svg",
204
+ viewBox: "0 0 24 24",
205
+ fill: "none",
206
+ stroke: "currentColor",
207
+ strokeWidth: 2,
208
+ strokeLinecap: "round",
209
+ strokeLinejoin: "round",
210
+ width: "1em",
211
+ height: "1em",
212
+ ...e,
213
+ children: [
214
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("polyline", { points: "3 6 5 6 21 6" }),
215
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }),
216
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", {
217
+ x1: 10,
218
+ y1: 11,
219
+ x2: 10,
220
+ y2: 17
221
+ }),
222
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", {
223
+ x1: 14,
224
+ y1: 11,
225
+ x2: 14,
226
+ y2: 17
227
+ })
228
+ ]
229
+ }), iconModules = {
230
+ "./icons/add.svg": add_default,
231
+ "./icons/delete.svg": delete_default
232
+ };
233
+ const iconMap = {};
234
+ Object.entries(iconModules).forEach(([e, t]) => {
235
+ let n = (e.split("/").pop() || "").replace(".svg", ""), r = t?.default || t;
236
+ n && r && typeof r == "function" && (iconMap[n] = r);
237
+ });
238
+ var Icon_default = ({ name: e, size: t = 24, color: n, className: r, style: a, ...o }) => {
239
+ let s = iconMap[e];
240
+ return s ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(s, {
241
+ width: t,
242
+ height: t,
243
+ className: r,
244
+ style: {
245
+ display: "inline-block",
246
+ verticalAlign: "middle",
247
+ ...a,
248
+ ...n && { color: n }
249
+ },
250
+ "aria-hidden": "true",
251
+ ...o
252
+ }) : null;
253
+ };
254
+ export { Icon_default as Icon, Icon_default as default };
package/dist/vite.svg ADDED
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
package/package.json ADDED
@@ -0,0 +1,110 @@
1
+ {
2
+ "name": "firebird-icon-lib",
3
+ "version": "1.0.0",
4
+ "description": "A lightweight React icon library with TypeScript support, featuring dynamic SVG icon loading",
5
+ "keywords": [
6
+ "react",
7
+ "icon",
8
+ "icons",
9
+ "svg",
10
+ "typescript",
11
+ "component",
12
+ "ui",
13
+ "library"
14
+ ],
15
+ "author": "",
16
+ "license": "MIT",
17
+ "type": "module",
18
+ "main": "./dist/my-icon-lib.cjs",
19
+ "module": "./dist/my-icon-lib.js",
20
+ "types": "./dist/index.d.ts",
21
+ "exports": {
22
+ ".": {
23
+ "import": {
24
+ "types": "./dist/index.d.ts",
25
+ "default": "./dist/my-icon-lib.js"
26
+ },
27
+ "require": {
28
+ "types": "./dist/index.d.ts",
29
+ "default": "./dist/my-icon-lib.cjs"
30
+ }
31
+ },
32
+ "./icons/*": "./dist/icons/*"
33
+ },
34
+ "files": [
35
+ "dist",
36
+ "README.md",
37
+ "LICENSE"
38
+ ],
39
+ "repository": {
40
+ "type": "git",
41
+ "url": ""
42
+ },
43
+ "bugs": {
44
+ "url": ""
45
+ },
46
+ "homepage": "",
47
+ "scripts": {
48
+ "dev": "vite",
49
+ "build": "vite build && tsc -p tsconfig.build.json",
50
+ "lint": "eslint .",
51
+ "format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,css,md}\"",
52
+ "format:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx,json,css,md}\"",
53
+ "test": "vitest",
54
+ "test:ui": "vitest --ui",
55
+ "test:run": "vitest run",
56
+ "test:coverage": "vitest run --coverage",
57
+ "preview": "vite preview",
58
+ "prepare": "husky",
59
+ "prepublishOnly": "npm run build"
60
+ },
61
+ "lint-staged": {
62
+ "*.{ts,tsx,js,jsx}": [
63
+ "eslint --fix",
64
+ "prettier --write"
65
+ ],
66
+ "*.{json,css,md}": [
67
+ "prettier --write"
68
+ ]
69
+ },
70
+ "peerDependencies": {
71
+ "react": ">=16.8.0",
72
+ "react-dom": ">=16.8.0"
73
+ },
74
+ "peerDependenciesMeta": {
75
+ "react": {
76
+ "optional": false
77
+ },
78
+ "react-dom": {
79
+ "optional": false
80
+ }
81
+ },
82
+ "devDependencies": {
83
+ "@eslint/js": "^9.39.1",
84
+ "@testing-library/jest-dom": "^6.9.1",
85
+ "@testing-library/react": "^16.3.1",
86
+ "@testing-library/user-event": "^14.6.1",
87
+ "@types/node": "^24.10.1",
88
+ "@types/react": "^19.2.5",
89
+ "@types/react-dom": "^19.2.3",
90
+ "@vitejs/plugin-react": "^5.1.1",
91
+ "eslint": "^9.39.1",
92
+ "eslint-plugin-react-hooks": "^7.0.1",
93
+ "eslint-plugin-react-refresh": "^0.4.24",
94
+ "globals": "^16.5.0",
95
+ "husky": "^9.1.7",
96
+ "jsdom": "^27.3.0",
97
+ "lint-staged": "^16.2.7",
98
+ "prettier": "^3.7.4",
99
+ "typescript": "~5.9.3",
100
+ "typescript-eslint": "^8.46.4",
101
+ "vite": "npm:rolldown-vite@7.2.5",
102
+ "vite-plugin-dts": "^4.5.4",
103
+ "vite-plugin-static-copy": "^3.1.4",
104
+ "vite-plugin-svgr": "^4.5.0",
105
+ "vitest": "^4.0.16"
106
+ },
107
+ "overrides": {
108
+ "vite": "npm:rolldown-vite@7.2.5"
109
+ }
110
+ }