huspy-icons 0.0.1 → 0.1.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/README.md CHANGED
@@ -168,15 +168,6 @@ npm publish --access public
168
168
 
169
169
  > Filenames become component names: `arrow-left.svg` → `ArrowLeft.tsx`.
170
170
 
171
- ---
172
-
173
- ## 🧪 Testing
174
-
175
- * Snapshot a subset of icons to detect accidental path changes.
176
- * `tsd` tests for prop typing.
177
- * Lint rule to ensure all icons export from the barrel.
178
-
179
- ---
180
171
 
181
172
  ## 🧰 Troubleshooting
182
173
 
@@ -38,4 +38,26 @@ declare const SvgArrowUpRight: ({ size, ...props }: NativeIconProps) => React.JS
38
38
 
39
39
  declare const SvgIconSlot: ({ size, ...props }: NativeIconProps) => React.JSX.Element;
40
40
 
41
- export { SvgArrowLeft as ArrowLeft, SvgArrowUpRight as ArrowUpRight, ICON_SIZES, type IconSize, type IconSizeToken, SvgIconSlot as IconSlot, type NativeIconProps, resolveSize };
41
+ /**
42
+ * Icon imports - using dynamic imports for tree-shaking
43
+ * Auto-generated - do not edit manually
44
+ */
45
+ /**
46
+ * Available icon names
47
+ */
48
+ type IconName = 'arrow-left' | 'arrow-up-right' | 'icon-slot';
49
+ /**
50
+ * Props for the unified Icon component (React Native)
51
+ */
52
+ interface IconProps extends Omit<NativeIconProps, 'size'> {
53
+ name: IconName;
54
+ size?: NativeIconProps['size'];
55
+ color?: string;
56
+ }
57
+ /**
58
+ * Unified Icon component that renders icons by name (React Native)
59
+ * Uses dynamic imports for tree-shaking support
60
+ */
61
+ declare const Icon: ({ name, size, color, ...props }: IconProps) => React.JSX.Element | null;
62
+
63
+ export { SvgArrowLeft as ArrowLeft, SvgArrowUpRight as ArrowUpRight, ICON_SIZES, Icon, type IconName, type IconProps, type IconSize, type IconSizeToken, SvgIconSlot as IconSlot, type NativeIconProps, resolveSize };
@@ -5,6 +5,9 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __esm = (fn, res) => function __init() {
9
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
10
+ };
8
11
  var __export = (target, all) => {
9
12
  for (var name in all)
10
13
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -27,103 +30,188 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
30
  ));
28
31
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
32
 
33
+ // src/shared/types.ts
34
+ function resolveSize(size = "lg") {
35
+ if (typeof size === "number") {
36
+ return size;
37
+ }
38
+ return ICON_SIZES[size] ?? ICON_SIZES.lg;
39
+ }
40
+ var ICON_SIZES;
41
+ var init_types = __esm({
42
+ "src/shared/types.ts"() {
43
+ "use strict";
44
+ ICON_SIZES = {
45
+ xs: 8,
46
+ sm: 12,
47
+ md: 16,
48
+ lg: 20,
49
+ xl: 24
50
+ };
51
+ }
52
+ });
53
+
54
+ // src/native/ArrowLeft.tsx
55
+ var ArrowLeft_exports = {};
56
+ __export(ArrowLeft_exports, {
57
+ default: () => ArrowLeft_default
58
+ });
59
+ var React, import_react_native_svg, SvgArrowLeft, ArrowLeft_default;
60
+ var init_ArrowLeft = __esm({
61
+ "src/native/ArrowLeft.tsx"() {
62
+ "use strict";
63
+ React = __toESM(require("react"));
64
+ import_react_native_svg = __toESM(require("react-native-svg"));
65
+ init_types();
66
+ SvgArrowLeft = ({ size = 16, ...props }) => {
67
+ const sizeValue = resolveSize(size);
68
+ return /* @__PURE__ */ React.createElement(import_react_native_svg.default, { width: sizeValue, height: sizeValue, viewBox: "0 0 24 24", fill: "none", ...props }, /* @__PURE__ */ React.createElement(
69
+ import_react_native_svg.Path,
70
+ {
71
+ fillRule: "evenodd",
72
+ clipRule: "evenodd",
73
+ d: "M12.7071 4.29289C13.0976 4.68342 13.0976 5.31658 12.7071 5.70711L6.41421 12L12.7071 18.2929C13.0976 18.6834 13.0976 19.3166 12.7071 19.7071C12.3166 20.0976 11.6834 20.0976 11.2929 19.7071L4.29289 12.7071C3.90237 12.3166 3.90237 11.6834 4.29289 11.2929L11.2929 4.29289C11.6834 3.90237 12.3166 3.90237 12.7071 4.29289Z",
74
+ fill: "currentColor"
75
+ }
76
+ ), /* @__PURE__ */ React.createElement(
77
+ import_react_native_svg.Path,
78
+ {
79
+ fillRule: "evenodd",
80
+ clipRule: "evenodd",
81
+ d: "M4 12C4 11.4477 4.44772 11 5 11H19C19.5523 11 20 11.4477 20 12C20 12.5523 19.5523 13 19 13H5C4.44772 13 4 12.5523 4 12Z",
82
+ fill: "currentColor"
83
+ }
84
+ ));
85
+ };
86
+ ArrowLeft_default = SvgArrowLeft;
87
+ }
88
+ });
89
+
90
+ // src/native/ArrowUpRight.tsx
91
+ var ArrowUpRight_exports = {};
92
+ __export(ArrowUpRight_exports, {
93
+ default: () => ArrowUpRight_default
94
+ });
95
+ var React2, import_react_native_svg2, SvgArrowUpRight, ArrowUpRight_default;
96
+ var init_ArrowUpRight = __esm({
97
+ "src/native/ArrowUpRight.tsx"() {
98
+ "use strict";
99
+ React2 = __toESM(require("react"));
100
+ import_react_native_svg2 = __toESM(require("react-native-svg"));
101
+ init_types();
102
+ SvgArrowUpRight = ({ size = 16, ...props }) => {
103
+ const sizeValue = resolveSize(size);
104
+ return /* @__PURE__ */ React2.createElement(import_react_native_svg2.default, { width: sizeValue, height: sizeValue, viewBox: "0 0 24 24", fill: "none", ...props }, /* @__PURE__ */ React2.createElement(
105
+ import_react_native_svg2.Path,
106
+ {
107
+ fillRule: "evenodd",
108
+ clipRule: "evenodd",
109
+ d: "M6 7C6 6.44772 6.44772 6 7 6H17C17.5523 6 18 6.44772 18 7V17C18 17.5523 17.5523 18 17 18C16.4477 18 16 17.5523 16 17V8H7C6.44772 8 6 7.55228 6 7Z",
110
+ fill: "currentColor"
111
+ }
112
+ ), /* @__PURE__ */ React2.createElement(
113
+ import_react_native_svg2.Path,
114
+ {
115
+ fillRule: "evenodd",
116
+ clipRule: "evenodd",
117
+ d: "M17.7071 6.29289C18.0976 6.68342 18.0976 7.31658 17.7071 7.70711L7.70711 17.7071C7.31658 18.0976 6.68342 18.0976 6.29289 17.7071C5.90237 17.3166 5.90237 16.6834 6.29289 16.2929L16.2929 6.29289C16.6834 5.90237 17.3166 5.90237 17.7071 6.29289Z",
118
+ fill: "currentColor"
119
+ }
120
+ ));
121
+ };
122
+ ArrowUpRight_default = SvgArrowUpRight;
123
+ }
124
+ });
125
+
126
+ // src/native/IconSlot.tsx
127
+ var IconSlot_exports = {};
128
+ __export(IconSlot_exports, {
129
+ default: () => IconSlot_default
130
+ });
131
+ var React3, import_react_native_svg3, SvgIconSlot, IconSlot_default;
132
+ var init_IconSlot = __esm({
133
+ "src/native/IconSlot.tsx"() {
134
+ "use strict";
135
+ React3 = __toESM(require("react"));
136
+ import_react_native_svg3 = __toESM(require("react-native-svg"));
137
+ init_types();
138
+ SvgIconSlot = ({ size = 16, ...props }) => {
139
+ const sizeValue = resolveSize(size);
140
+ return /* @__PURE__ */ React3.createElement(import_react_native_svg3.default, { width: sizeValue, height: sizeValue, viewBox: "0 0 15 15", fill: "none", ...props }, /* @__PURE__ */ React3.createElement(
141
+ import_react_native_svg3.Path,
142
+ {
143
+ d: "M13.3333 7.33333C13.3333 4.01962 10.647 1.33333 7.33333 1.33333C4.01962 1.33333 1.33333 4.01962 1.33333 7.33333C1.33333 10.647 4.01962 13.3333 7.33333 13.3333C10.647 13.3333 13.3333 10.647 13.3333 7.33333ZM14.6667 7.33333C14.6667 11.3834 11.3834 14.6667 7.33333 14.6667C3.28325 14.6667 0 11.3834 0 7.33333C0 3.28325 3.28325 0 7.33333 0C11.3834 0 14.6667 3.28325 14.6667 7.33333Z",
144
+ fill: "currentColor"
145
+ }
146
+ ));
147
+ };
148
+ IconSlot_default = SvgIconSlot;
149
+ }
150
+ });
151
+
30
152
  // src/native/index.ts
31
153
  var native_exports = {};
32
154
  __export(native_exports, {
33
155
  ArrowLeft: () => ArrowLeft_default,
34
156
  ArrowUpRight: () => ArrowUpRight_default,
35
157
  ICON_SIZES: () => ICON_SIZES,
158
+ Icon: () => Icon_default,
36
159
  IconSlot: () => IconSlot_default,
37
160
  resolveSize: () => resolveSize
38
161
  });
39
162
  module.exports = __toCommonJS(native_exports);
163
+ init_ArrowLeft();
164
+ init_ArrowUpRight();
165
+ init_IconSlot();
40
166
 
41
- // src/native/ArrowLeft.tsx
42
- var React = __toESM(require("react"));
43
- var import_react_native_svg = __toESM(require("react-native-svg"));
44
-
45
- // src/shared/types.ts
46
- var ICON_SIZES = {
47
- xs: 8,
48
- sm: 12,
49
- md: 16,
50
- lg: 20,
51
- xl: 24
52
- };
53
- function resolveSize(size = "lg") {
54
- if (typeof size === "number") {
55
- return size;
167
+ // src/native/Icon.tsx
168
+ var React4 = __toESM(require("react"));
169
+ function loadIcon(name) {
170
+ switch (name) {
171
+ case "arrow-left":
172
+ return Promise.resolve().then(() => (init_ArrowLeft(), ArrowLeft_exports)).then((m) => m.default);
173
+ case "arrow-up-right":
174
+ return Promise.resolve().then(() => (init_ArrowUpRight(), ArrowUpRight_exports)).then((m) => m.default);
175
+ case "icon-slot":
176
+ return Promise.resolve().then(() => (init_IconSlot(), IconSlot_exports)).then((m) => m.default);
177
+ default:
178
+ return Promise.reject(new Error(`Icon "${name}" not found`));
56
179
  }
57
- return ICON_SIZES[size] ?? ICON_SIZES.lg;
58
180
  }
59
-
60
- // src/native/ArrowLeft.tsx
61
- var SvgArrowLeft = ({ size = 16, ...props }) => {
62
- const sizeValue = resolveSize(size);
63
- return /* @__PURE__ */ React.createElement(import_react_native_svg.default, { width: sizeValue, height: sizeValue, viewBox: "0 0 24 24", fill: "none", ...props }, /* @__PURE__ */ React.createElement(
64
- import_react_native_svg.Path,
65
- {
66
- fillRule: "evenodd",
67
- clipRule: "evenodd",
68
- d: "M12.7071 4.29289C13.0976 4.68342 13.0976 5.31658 12.7071 5.70711L6.41421 12L12.7071 18.2929C13.0976 18.6834 13.0976 19.3166 12.7071 19.7071C12.3166 20.0976 11.6834 20.0976 11.2929 19.7071L4.29289 12.7071C3.90237 12.3166 3.90237 11.6834 4.29289 11.2929L11.2929 4.29289C11.6834 3.90237 12.3166 3.90237 12.7071 4.29289Z",
69
- fill: "currentColor"
70
- }
71
- ), /* @__PURE__ */ React.createElement(
72
- import_react_native_svg.Path,
73
- {
74
- fillRule: "evenodd",
75
- clipRule: "evenodd",
76
- d: "M4 12C4 11.4477 4.44772 11 5 11H19C19.5523 11 20 11.4477 20 12C20 12.5523 19.5523 13 19 13H5C4.44772 13 4 12.5523 4 12Z",
77
- fill: "currentColor"
78
- }
79
- ));
80
- };
81
- var ArrowLeft_default = SvgArrowLeft;
82
-
83
- // src/native/ArrowUpRight.tsx
84
- var React2 = __toESM(require("react"));
85
- var import_react_native_svg2 = __toESM(require("react-native-svg"));
86
- var SvgArrowUpRight = ({ size = 16, ...props }) => {
87
- const sizeValue = resolveSize(size);
88
- return /* @__PURE__ */ React2.createElement(import_react_native_svg2.default, { width: sizeValue, height: sizeValue, viewBox: "0 0 24 24", fill: "none", ...props }, /* @__PURE__ */ React2.createElement(
89
- import_react_native_svg2.Path,
90
- {
91
- fillRule: "evenodd",
92
- clipRule: "evenodd",
93
- d: "M6 7C6 6.44772 6.44772 6 7 6H17C17.5523 6 18 6.44772 18 7V17C18 17.5523 17.5523 18 17 18C16.4477 18 16 17.5523 16 17V8H7C6.44772 8 6 7.55228 6 7Z",
94
- fill: "currentColor"
95
- }
96
- ), /* @__PURE__ */ React2.createElement(
97
- import_react_native_svg2.Path,
98
- {
99
- fillRule: "evenodd",
100
- clipRule: "evenodd",
101
- d: "M17.7071 6.29289C18.0976 6.68342 18.0976 7.31658 17.7071 7.70711L7.70711 17.7071C7.31658 18.0976 6.68342 18.0976 6.29289 17.7071C5.90237 17.3166 5.90237 16.6834 6.29289 16.2929L16.2929 6.29289C16.6834 5.90237 17.3166 5.90237 17.7071 6.29289Z",
102
- fill: "currentColor"
103
- }
104
- ));
181
+ var Icon = ({ name, size = 16, color, ...props }) => {
182
+ const [IconComponent, setIconComponent] = React4.useState(null);
183
+ const [loading, setLoading] = React4.useState(true);
184
+ const [error, setError] = React4.useState(null);
185
+ React4.useEffect(() => {
186
+ setLoading(true);
187
+ setError(null);
188
+ loadIcon(name).then((Component) => {
189
+ setIconComponent(() => Component);
190
+ setLoading(false);
191
+ }).catch((err) => {
192
+ console.warn(err.message);
193
+ setError(err.message);
194
+ setLoading(false);
195
+ });
196
+ }, [name]);
197
+ if (loading) {
198
+ return null;
199
+ }
200
+ if (error || !IconComponent) {
201
+ return null;
202
+ }
203
+ return /* @__PURE__ */ React4.createElement(IconComponent, { size, color, ...props });
105
204
  };
106
- var ArrowUpRight_default = SvgArrowUpRight;
205
+ var Icon_default = Icon;
107
206
 
108
- // src/native/IconSlot.tsx
109
- var React3 = __toESM(require("react"));
110
- var import_react_native_svg3 = __toESM(require("react-native-svg"));
111
- var SvgIconSlot = ({ size = 16, ...props }) => {
112
- const sizeValue = resolveSize(size);
113
- return /* @__PURE__ */ React3.createElement(import_react_native_svg3.default, { width: sizeValue, height: sizeValue, viewBox: "0 0 15 15", fill: "none", ...props }, /* @__PURE__ */ React3.createElement(
114
- import_react_native_svg3.Path,
115
- {
116
- d: "M13.3333 7.33333C13.3333 4.01962 10.647 1.33333 7.33333 1.33333C4.01962 1.33333 1.33333 4.01962 1.33333 7.33333C1.33333 10.647 4.01962 13.3333 7.33333 13.3333C10.647 13.3333 13.3333 10.647 13.3333 7.33333ZM14.6667 7.33333C14.6667 11.3834 11.3834 14.6667 7.33333 14.6667C3.28325 14.6667 0 11.3834 0 7.33333C0 3.28325 3.28325 0 7.33333 0C11.3834 0 14.6667 3.28325 14.6667 7.33333Z",
117
- fill: "currentColor"
118
- }
119
- ));
120
- };
121
- var IconSlot_default = SvgIconSlot;
207
+ // src/native/index.ts
208
+ init_types();
122
209
  // Annotate the CommonJS export names for ESM import in node:
123
210
  0 && (module.exports = {
124
211
  ArrowLeft,
125
212
  ArrowUpRight,
126
213
  ICON_SIZES,
214
+ Icon,
127
215
  IconSlot,
128
216
  resolveSize
129
217
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/native/index.ts","../../src/native/ArrowLeft.tsx","../../src/shared/types.ts","../../src/native/ArrowUpRight.tsx","../../src/native/IconSlot.tsx"],"sourcesContent":["// Auto-generated exports\nexport { default as ArrowLeft } from './ArrowLeft';\nexport { default as ArrowUpRight } from './ArrowUpRight';\nexport { default as IconSlot } from './IconSlot';\n\n// Export types\nexport type {\n IconSize,\n IconSizeToken,\n NativeIconProps,\n} from '../shared/types';\n\nexport { ICON_SIZES, resolveSize } from '../shared/types';\n","import * as React from 'react';\nimport Svg, { Path } from 'react-native-svg';\nimport type { NativeIconProps } from '../shared/types';\nimport { resolveSize } from '../shared/types';\n\nconst SvgArrowLeft = ({ size = 16, ...props }: NativeIconProps) => {\n const sizeValue = resolveSize(size);\n \n return (\n <Svg width={sizeValue} height={sizeValue} viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n <Path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M12.7071 4.29289C13.0976 4.68342 13.0976 5.31658 12.7071 5.70711L6.41421 12L12.7071 18.2929C13.0976 18.6834 13.0976 19.3166 12.7071 19.7071C12.3166 20.0976 11.6834 20.0976 11.2929 19.7071L4.29289 12.7071C3.90237 12.3166 3.90237 11.6834 4.29289 11.2929L11.2929 4.29289C11.6834 3.90237 12.3166 3.90237 12.7071 4.29289Z\"\n fill=\"currentColor\"\n />\n <Path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M4 12C4 11.4477 4.44772 11 5 11H19C19.5523 11 20 11.4477 20 12C20 12.5523 19.5523 13 19 13H5C4.44772 13 4 12.5523 4 12Z\"\n fill=\"currentColor\"\n />\n </Svg>\n );\n};\n\nexport default SvgArrowLeft;\n","export type IconSize = number | 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/**\n * Icon size presets\n */\nexport const ICON_SIZES = {\n xs: 8,\n sm: 12,\n md: 16,\n lg: 20,\n xl: 24,\n} as const;\n\n/**\n * Icon size token type\n */\nexport type IconSizeToken = keyof typeof ICON_SIZES;\n\n/**\n * Props for React (web) icons\n */\nexport interface ReactIconProps extends React.SVGProps<SVGSVGElement> {\n size?: IconSize;\n}\n\n/**\n * Props for React Native icons\n */\nexport interface NativeIconProps {\n size?: IconSize;\n width?: number;\n height?: number;\n color?: string;\n style?: any;\n}\n\n/**\n * Resolves an icon size to a numeric value\n * @param size - Size value or token\n * @returns Numeric size in pixels\n */\nexport function resolveSize(size: IconSize = 'lg'): number {\n if (typeof size === 'number') {\n return size;\n }\n \n return ICON_SIZES[size] ?? ICON_SIZES.lg;\n}\n","import * as React from 'react';\nimport Svg, { Path } from 'react-native-svg';\nimport type { NativeIconProps } from '../shared/types';\nimport { resolveSize } from '../shared/types';\n\nconst SvgArrowUpRight = ({ size = 16, ...props }: NativeIconProps) => {\n const sizeValue = resolveSize(size);\n \n return (\n <Svg width={sizeValue} height={sizeValue} viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n <Path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M6 7C6 6.44772 6.44772 6 7 6H17C17.5523 6 18 6.44772 18 7V17C18 17.5523 17.5523 18 17 18C16.4477 18 16 17.5523 16 17V8H7C6.44772 8 6 7.55228 6 7Z\"\n fill=\"currentColor\"\n />\n <Path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M17.7071 6.29289C18.0976 6.68342 18.0976 7.31658 17.7071 7.70711L7.70711 17.7071C7.31658 18.0976 6.68342 18.0976 6.29289 17.7071C5.90237 17.3166 5.90237 16.6834 6.29289 16.2929L16.2929 6.29289C16.6834 5.90237 17.3166 5.90237 17.7071 6.29289Z\"\n fill=\"currentColor\"\n />\n </Svg>\n );\n};\n\nexport default SvgArrowUpRight;\n","import * as React from 'react';\nimport Svg, { Path } from 'react-native-svg';\nimport type { NativeIconProps } from '../shared/types';\nimport { resolveSize } from '../shared/types';\n\nconst SvgIconSlot = ({ size = 16, ...props }: NativeIconProps) => {\n const sizeValue = resolveSize(size);\n \n return (\n <Svg width={sizeValue} height={sizeValue} viewBox=\"0 0 15 15\" fill=\"none\" {...props}>\n <Path\n d=\"M13.3333 7.33333C13.3333 4.01962 10.647 1.33333 7.33333 1.33333C4.01962 1.33333 1.33333 4.01962 1.33333 7.33333C1.33333 10.647 4.01962 13.3333 7.33333 13.3333C10.647 13.3333 13.3333 10.647 13.3333 7.33333ZM14.6667 7.33333C14.6667 11.3834 11.3834 14.6667 7.33333 14.6667C3.28325 14.6667 0 11.3834 0 7.33333C0 3.28325 3.28325 0 7.33333 0C11.3834 0 14.6667 3.28325 14.6667 7.33333Z\"\n fill=\"currentColor\"\n />\n </Svg>\n );\n};\n\nexport default SvgIconSlot;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,8BAA0B;;;ACInB,IAAM,aAAa;AAAA,EACxB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AA8BO,SAAS,YAAY,OAAiB,MAAc;AACzD,MAAI,OAAO,SAAS,UAAU;AAC5B,WAAO;AAAA,EACT;AAEA,SAAO,WAAW,IAAI,KAAK,WAAW;AACxC;;;AD1CA,IAAM,eAAe,CAAC,EAAE,OAAO,IAAI,GAAG,MAAM,MAAuB;AACjE,QAAM,YAAY,YAAY,IAAI;AAElC,SACE,oCAAC,wBAAAA,SAAA,EAAI,OAAO,WAAW,QAAQ,WAAW,SAAQ,aAAY,MAAK,QAAQ,GAAG,SAC9E;AAAA,IAAC;AAAA;AAAA,MACC,UAAS;AAAA,MACT,UAAS;AAAA,MACT,GAAE;AAAA,MACF,MAAK;AAAA;AAAA,EACP,GACA;AAAA,IAAC;AAAA;AAAA,MACC,UAAS;AAAA,MACT,UAAS;AAAA,MACT,GAAE;AAAA,MACF,MAAK;AAAA;AAAA,EACP,CACF;AAEF;AAEA,IAAO,oBAAQ;;;AE1Bf,IAAAC,SAAuB;AACvB,IAAAC,2BAA0B;AAI1B,IAAM,kBAAkB,CAAC,EAAE,OAAO,IAAI,GAAG,MAAM,MAAuB;AACpE,QAAM,YAAY,YAAY,IAAI;AAElC,SACE,qCAAC,yBAAAC,SAAA,EAAI,OAAO,WAAW,QAAQ,WAAW,SAAQ,aAAY,MAAK,QAAQ,GAAG,SAC9E;AAAA,IAAC;AAAA;AAAA,MACC,UAAS;AAAA,MACT,UAAS;AAAA,MACT,GAAE;AAAA,MACF,MAAK;AAAA;AAAA,EACP,GACA;AAAA,IAAC;AAAA;AAAA,MACC,UAAS;AAAA,MACT,UAAS;AAAA,MACT,GAAE;AAAA,MACF,MAAK;AAAA;AAAA,EACP,CACF;AAEF;AAEA,IAAO,uBAAQ;;;AC1Bf,IAAAC,SAAuB;AACvB,IAAAC,2BAA0B;AAI1B,IAAM,cAAc,CAAC,EAAE,OAAO,IAAI,GAAG,MAAM,MAAuB;AAChE,QAAM,YAAY,YAAY,IAAI;AAElC,SACE,qCAAC,yBAAAC,SAAA,EAAI,OAAO,WAAW,QAAQ,WAAW,SAAQ,aAAY,MAAK,QAAQ,GAAG,SAC9E;AAAA,IAAC;AAAA;AAAA,MACC,GAAE;AAAA,MACF,MAAK;AAAA;AAAA,EACP,CACF;AAEF;AAEA,IAAO,mBAAQ;","names":["Svg","React","import_react_native_svg","Svg","React","import_react_native_svg","Svg"]}
1
+ {"version":3,"sources":["../../src/shared/types.ts","../../src/native/ArrowLeft.tsx","../../src/native/ArrowUpRight.tsx","../../src/native/IconSlot.tsx","../../src/native/index.ts","../../src/native/Icon.tsx"],"sourcesContent":["export type IconSize = number | 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/**\n * Icon size presets\n */\nexport const ICON_SIZES = {\n xs: 8,\n sm: 12,\n md: 16,\n lg: 20,\n xl: 24,\n} as const;\n\n/**\n * Icon size token type\n */\nexport type IconSizeToken = keyof typeof ICON_SIZES;\n\n/**\n * Props for React (web) icons\n */\nexport interface ReactIconProps extends React.SVGProps<SVGSVGElement> {\n size?: IconSize;\n}\n\n/**\n * Props for React Native icons\n */\nexport interface NativeIconProps {\n size?: IconSize;\n width?: number;\n height?: number;\n color?: string;\n style?: any;\n}\n\n/**\n * Resolves an icon size to a numeric value\n * @param size - Size value or token\n * @returns Numeric size in pixels\n */\nexport function resolveSize(size: IconSize = 'lg'): number {\n if (typeof size === 'number') {\n return size;\n }\n \n return ICON_SIZES[size] ?? ICON_SIZES.lg;\n}\n","import * as React from 'react';\nimport Svg, { Path } from 'react-native-svg';\nimport type { NativeIconProps } from '../shared/types';\nimport { resolveSize } from '../shared/types';\n\nconst SvgArrowLeft = ({ size = 16, ...props }: NativeIconProps) => {\n const sizeValue = resolveSize(size);\n \n return (\n <Svg width={sizeValue} height={sizeValue} viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n <Path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M12.7071 4.29289C13.0976 4.68342 13.0976 5.31658 12.7071 5.70711L6.41421 12L12.7071 18.2929C13.0976 18.6834 13.0976 19.3166 12.7071 19.7071C12.3166 20.0976 11.6834 20.0976 11.2929 19.7071L4.29289 12.7071C3.90237 12.3166 3.90237 11.6834 4.29289 11.2929L11.2929 4.29289C11.6834 3.90237 12.3166 3.90237 12.7071 4.29289Z\"\n fill=\"currentColor\"\n />\n <Path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M4 12C4 11.4477 4.44772 11 5 11H19C19.5523 11 20 11.4477 20 12C20 12.5523 19.5523 13 19 13H5C4.44772 13 4 12.5523 4 12Z\"\n fill=\"currentColor\"\n />\n </Svg>\n );\n};\n\nexport default SvgArrowLeft;\n","import * as React from 'react';\nimport Svg, { Path } from 'react-native-svg';\nimport type { NativeIconProps } from '../shared/types';\nimport { resolveSize } from '../shared/types';\n\nconst SvgArrowUpRight = ({ size = 16, ...props }: NativeIconProps) => {\n const sizeValue = resolveSize(size);\n \n return (\n <Svg width={sizeValue} height={sizeValue} viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n <Path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M6 7C6 6.44772 6.44772 6 7 6H17C17.5523 6 18 6.44772 18 7V17C18 17.5523 17.5523 18 17 18C16.4477 18 16 17.5523 16 17V8H7C6.44772 8 6 7.55228 6 7Z\"\n fill=\"currentColor\"\n />\n <Path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M17.7071 6.29289C18.0976 6.68342 18.0976 7.31658 17.7071 7.70711L7.70711 17.7071C7.31658 18.0976 6.68342 18.0976 6.29289 17.7071C5.90237 17.3166 5.90237 16.6834 6.29289 16.2929L16.2929 6.29289C16.6834 5.90237 17.3166 5.90237 17.7071 6.29289Z\"\n fill=\"currentColor\"\n />\n </Svg>\n );\n};\n\nexport default SvgArrowUpRight;\n","import * as React from 'react';\nimport Svg, { Path } from 'react-native-svg';\nimport type { NativeIconProps } from '../shared/types';\nimport { resolveSize } from '../shared/types';\n\nconst SvgIconSlot = ({ size = 16, ...props }: NativeIconProps) => {\n const sizeValue = resolveSize(size);\n \n return (\n <Svg width={sizeValue} height={sizeValue} viewBox=\"0 0 15 15\" fill=\"none\" {...props}>\n <Path\n d=\"M13.3333 7.33333C13.3333 4.01962 10.647 1.33333 7.33333 1.33333C4.01962 1.33333 1.33333 4.01962 1.33333 7.33333C1.33333 10.647 4.01962 13.3333 7.33333 13.3333C10.647 13.3333 13.3333 10.647 13.3333 7.33333ZM14.6667 7.33333C14.6667 11.3834 11.3834 14.6667 7.33333 14.6667C3.28325 14.6667 0 11.3834 0 7.33333C0 3.28325 3.28325 0 7.33333 0C11.3834 0 14.6667 3.28325 14.6667 7.33333Z\"\n fill=\"currentColor\"\n />\n </Svg>\n );\n};\n\nexport default SvgIconSlot;\n","// Auto-generated exports\nexport { default as ArrowLeft } from './ArrowLeft';\nexport { default as ArrowUpRight } from './ArrowUpRight';\nexport { default as IconSlot } from './IconSlot';\n\n// Unified Icon component\nexport { default as Icon } from './Icon';\nexport type { IconName, IconProps } from './Icon';\n\n// Export types\nexport type {\n IconSize,\n IconSizeToken,\n NativeIconProps,\n} from '../shared/types';\n\nexport { ICON_SIZES, resolveSize } from '../shared/types';\n","import * as React from 'react';\nimport type { NativeIconProps } from '../shared/types';\n\n/**\n * Icon imports - using dynamic imports for tree-shaking\n * Auto-generated - do not edit manually\n */\n// Icon: arrow-left\n// Icon: arrow-up-right\n// Icon: icon-slot\n\n/**\n * Available icon names\n */\nexport type IconName = 'arrow-left' | 'arrow-up-right' | 'icon-slot';\n\n/**\n * Props for the unified Icon component (React Native)\n */\nexport interface IconProps extends Omit<NativeIconProps, 'size'> {\n name: IconName;\n size?: NativeIconProps['size'];\n color?: string;\n}\n\n/**\n * Loads an icon component dynamically\n * This pattern allows bundlers to tree-shake unused icons\n * Note: React Native bundlers may handle this differently\n */\nfunction loadIcon(name: IconName): Promise<React.ComponentType<any>> {\n switch (name) {\n case 'arrow-left':\n return import('./ArrowLeft').then(m => m.default);\n case 'arrow-up-right':\n return import('./ArrowUpRight').then(m => m.default);\n case 'icon-slot':\n return import('./IconSlot').then(m => m.default);\n default:\n return Promise.reject(new Error(`Icon \"${name}\" not found`));\n }\n}\n\n/**\n * Unified Icon component that renders icons by name (React Native)\n * Uses dynamic imports for tree-shaking support\n */\nconst Icon = ({ name, size = 16, color, ...props }: IconProps) => {\n const [IconComponent, setIconComponent] = React.useState<React.ComponentType<any> | null>(null);\n const [loading, setLoading] = React.useState(true);\n const [error, setError] = React.useState<string | null>(null);\n\n React.useEffect(() => {\n setLoading(true);\n setError(null);\n \n loadIcon(name)\n .then((Component) => {\n setIconComponent(() => Component);\n setLoading(false);\n })\n .catch((err) => {\n console.warn(err.message);\n setError(err.message);\n setLoading(false);\n });\n }, [name]);\n\n if (loading) {\n return null;\n }\n\n if (error || !IconComponent) {\n return null;\n }\n\n return <IconComponent size={size} color={color} {...props} />;\n};\n\nexport default Icon;"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCO,SAAS,YAAY,OAAiB,MAAc;AACzD,MAAI,OAAO,SAAS,UAAU;AAC5B,WAAO;AAAA,EACT;AAEA,SAAO,WAAW,IAAI,KAAK,WAAW;AACxC;AA/CA,IAKa;AALb;AAAA;AAAA;AAKO,IAAM,aAAa;AAAA,MACxB,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA;AAAA;;;ACXA;AAAA;AAAA;AAAA;AAAA,WACA,yBAIM,cAqBC;AA1BP;AAAA;AAAA;AAAA,YAAuB;AACvB,8BAA0B;AAE1B;AAEA,IAAM,eAAe,CAAC,EAAE,OAAO,IAAI,GAAG,MAAM,MAAuB;AACjE,YAAM,YAAY,YAAY,IAAI;AAElC,aACE,oCAAC,wBAAAA,SAAA,EAAI,OAAO,WAAW,QAAQ,WAAW,SAAQ,aAAY,MAAK,QAAQ,GAAG,SAC9E;AAAA,QAAC;AAAA;AAAA,UACC,UAAS;AAAA,UACT,UAAS;AAAA,UACT,GAAE;AAAA,UACF,MAAK;AAAA;AAAA,MACP,GACA;AAAA,QAAC;AAAA;AAAA,UACC,UAAS;AAAA,UACT,UAAS;AAAA,UACT,GAAE;AAAA,UACF,MAAK;AAAA;AAAA,MACP,CACF;AAAA,IAEF;AAEA,IAAO,oBAAQ;AAAA;AAAA;;;AC1Bf;AAAA;AAAA;AAAA;AAAA,IAAAC,QACAC,0BAIM,iBAqBC;AA1BP;AAAA;AAAA;AAAA,IAAAD,SAAuB;AACvB,IAAAC,2BAA0B;AAE1B;AAEA,I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D;AACE,aAAO,QAAQ,OAAO,IAAI,MAAM,SAAS,IAAI,aAAa,CAAC;AAAA,EAC/D;AACF;AAMA,IAAM,OAAO,CAAC,EAAE,MAAM,OAAO,IAAI,OAAO,GAAG,MAAM,MAAiB;AAChE,QAAM,CAAC,eAAe,gBAAgB,IAAU,gBAA0C,IAAI;AAC9F,QAAM,CAAC,SAAS,UAAU,IAAU,gBAAS,IAAI;AACjD,QAAM,CAAC,OAAO,QAAQ,IAAU,gBAAwB,IAAI;AAE5D,EAAM,iBAAU,MAAM;AACpB,eAAW,IAAI;AACf,aAAS,IAAI;AAEb,aAAS,IAAI,EACV,KAAK,CAAC,cAAc;AACnB,uBAAiB,MAAM,SAAS;AAChC,iBAAW,KAAK;AAAA,IAClB,CAAC,EACA,MAAM,CAAC,QAAQ;AACd,cAAQ,KAAK,IAAI,OAAO;AACxB,eAAS,IAAI,OAAO;AACpB,iBAAW,KAAK;AAAA,IAClB,CAAC;AAAA,EACL,GAAG,CAAC,IAAI,CAAC;AAET,MAAI,SAAS;AACX,WAAO;AAAA,EACT;AAEA,MAAI,SAAS,CAAC,eAAe;AAC3B,WAAO;AAAA,EACT;AAEA,SAAO,qCAAC,iBAAc,MAAY,OAAe,GAAG,OAAO;AAC7D;AAEA,IAAO,eAAQ;;;AD/Df;","names":["Svg","React","import_react_native_svg","Svg","React","import_react_native_svg","Svg","React"]}
@@ -34,4 +34,26 @@ declare const SvgArrowUpRight: ({ size, ...props }: ReactIconProps) => React$1.J
34
34
 
35
35
  declare const SvgIconSlot: ({ size, ...props }: ReactIconProps) => React$1.JSX.Element;
36
36
 
37
- export { SvgArrowLeft as ArrowLeft, SvgArrowUpRight as ArrowUpRight, ICON_SIZES, type IconSize, type IconSizeToken, SvgIconSlot as IconSlot, type ReactIconProps, resolveSize };
37
+ /**
38
+ * Icon imports - using dynamic imports for tree-shaking
39
+ * Auto-generated - do not edit manually
40
+ */
41
+ /**
42
+ * Available icon names
43
+ */
44
+ type IconName = 'arrow-left' | 'arrow-up-right' | 'icon-slot';
45
+ /**
46
+ * Props for the unified Icon component
47
+ */
48
+ interface IconProps extends Omit<ReactIconProps, 'size'> {
49
+ name: IconName;
50
+ size?: ReactIconProps['size'];
51
+ color?: string;
52
+ }
53
+ /**
54
+ * Unified Icon component that renders icons by name
55
+ * Uses dynamic imports for tree-shaking support
56
+ */
57
+ declare const Icon: ({ name, size, color, ...props }: IconProps) => React$1.JSX.Element | null;
58
+
59
+ export { SvgArrowLeft as ArrowLeft, SvgArrowUpRight as ArrowUpRight, ICON_SIZES, Icon, type IconName, type IconProps, type IconSize, type IconSizeToken, SvgIconSlot as IconSlot, type ReactIconProps, resolveSize };
@@ -34,4 +34,26 @@ declare const SvgArrowUpRight: ({ size, ...props }: ReactIconProps) => React$1.J
34
34
 
35
35
  declare const SvgIconSlot: ({ size, ...props }: ReactIconProps) => React$1.JSX.Element;
36
36
 
37
- export { SvgArrowLeft as ArrowLeft, SvgArrowUpRight as ArrowUpRight, ICON_SIZES, type IconSize, type IconSizeToken, SvgIconSlot as IconSlot, type ReactIconProps, resolveSize };
37
+ /**
38
+ * Icon imports - using dynamic imports for tree-shaking
39
+ * Auto-generated - do not edit manually
40
+ */
41
+ /**
42
+ * Available icon names
43
+ */
44
+ type IconName = 'arrow-left' | 'arrow-up-right' | 'icon-slot';
45
+ /**
46
+ * Props for the unified Icon component
47
+ */
48
+ interface IconProps extends Omit<ReactIconProps, 'size'> {
49
+ name: IconName;
50
+ size?: ReactIconProps['size'];
51
+ color?: string;
52
+ }
53
+ /**
54
+ * Unified Icon component that renders icons by name
55
+ * Uses dynamic imports for tree-shaking support
56
+ */
57
+ declare const Icon: ({ name, size, color, ...props }: IconProps) => React$1.JSX.Element | null;
58
+
59
+ export { SvgArrowLeft as ArrowLeft, SvgArrowUpRight as ArrowUpRight, ICON_SIZES, Icon, type IconName, type IconProps, type IconSize, type IconSizeToken, SvgIconSlot as IconSlot, type ReactIconProps, resolveSize };
@@ -5,6 +5,9 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __esm = (fn, res) => function __init() {
9
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
10
+ };
8
11
  var __export = (target, all) => {
9
12
  for (var name in all)
10
13
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -27,93 +30,178 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
30
  ));
28
31
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
32
 
33
+ // src/shared/types.ts
34
+ function resolveSize(size = "lg") {
35
+ if (typeof size === "number") {
36
+ return size;
37
+ }
38
+ return ICON_SIZES[size] ?? ICON_SIZES.lg;
39
+ }
40
+ var ICON_SIZES;
41
+ var init_types = __esm({
42
+ "src/shared/types.ts"() {
43
+ "use strict";
44
+ ICON_SIZES = {
45
+ xs: 8,
46
+ sm: 12,
47
+ md: 16,
48
+ lg: 20,
49
+ xl: 24
50
+ };
51
+ }
52
+ });
53
+
54
+ // src/react/ArrowLeft.tsx
55
+ var ArrowLeft_exports = {};
56
+ __export(ArrowLeft_exports, {
57
+ default: () => ArrowLeft_default
58
+ });
59
+ var React, SvgArrowLeft, ArrowLeft_default;
60
+ var init_ArrowLeft = __esm({
61
+ "src/react/ArrowLeft.tsx"() {
62
+ "use strict";
63
+ React = __toESM(require("react"));
64
+ init_types();
65
+ SvgArrowLeft = ({ size = 16, ...props }) => {
66
+ const sizeValue = resolveSize(size);
67
+ return /* @__PURE__ */ React.createElement("svg", { width: sizeValue, height: sizeValue, viewBox: "0 0 24 24", fill: "none", ...props }, /* @__PURE__ */ React.createElement(
68
+ "path",
69
+ {
70
+ fillRule: "evenodd",
71
+ clipRule: "evenodd",
72
+ d: "M12.7071 4.29289C13.0976 4.68342 13.0976 5.31658 12.7071 5.70711L6.41421 12L12.7071 18.2929C13.0976 18.6834 13.0976 19.3166 12.7071 19.7071C12.3166 20.0976 11.6834 20.0976 11.2929 19.7071L4.29289 12.7071C3.90237 12.3166 3.90237 11.6834 4.29289 11.2929L11.2929 4.29289C11.6834 3.90237 12.3166 3.90237 12.7071 4.29289Z",
73
+ fill: "currentColor"
74
+ }
75
+ ), /* @__PURE__ */ React.createElement(
76
+ "path",
77
+ {
78
+ fillRule: "evenodd",
79
+ clipRule: "evenodd",
80
+ d: "M4 12C4 11.4477 4.44772 11 5 11H19C19.5523 11 20 11.4477 20 12C20 12.5523 19.5523 13 19 13H5C4.44772 13 4 12.5523 4 12Z",
81
+ fill: "currentColor"
82
+ }
83
+ ));
84
+ };
85
+ ArrowLeft_default = SvgArrowLeft;
86
+ }
87
+ });
88
+
89
+ // src/react/ArrowUpRight.tsx
90
+ var ArrowUpRight_exports = {};
91
+ __export(ArrowUpRight_exports, {
92
+ default: () => ArrowUpRight_default
93
+ });
94
+ var React2, SvgArrowUpRight, ArrowUpRight_default;
95
+ var init_ArrowUpRight = __esm({
96
+ "src/react/ArrowUpRight.tsx"() {
97
+ "use strict";
98
+ React2 = __toESM(require("react"));
99
+ init_types();
100
+ SvgArrowUpRight = ({ size = 16, ...props }) => {
101
+ const sizeValue = resolveSize(size);
102
+ return /* @__PURE__ */ React2.createElement("svg", { width: sizeValue, height: sizeValue, viewBox: "0 0 24 24", fill: "none", ...props }, /* @__PURE__ */ React2.createElement(
103
+ "path",
104
+ {
105
+ fillRule: "evenodd",
106
+ clipRule: "evenodd",
107
+ d: "M6 7C6 6.44772 6.44772 6 7 6H17C17.5523 6 18 6.44772 18 7V17C18 17.5523 17.5523 18 17 18C16.4477 18 16 17.5523 16 17V8H7C6.44772 8 6 7.55228 6 7Z",
108
+ fill: "currentColor"
109
+ }
110
+ ), /* @__PURE__ */ React2.createElement(
111
+ "path",
112
+ {
113
+ fillRule: "evenodd",
114
+ clipRule: "evenodd",
115
+ d: "M17.7071 6.29289C18.0976 6.68342 18.0976 7.31658 17.7071 7.70711L7.70711 17.7071C7.31658 18.0976 6.68342 18.0976 6.29289 17.7071C5.90237 17.3166 5.90237 16.6834 6.29289 16.2929L16.2929 6.29289C16.6834 5.90237 17.3166 5.90237 17.7071 6.29289Z",
116
+ fill: "currentColor"
117
+ }
118
+ ));
119
+ };
120
+ ArrowUpRight_default = SvgArrowUpRight;
121
+ }
122
+ });
123
+
124
+ // src/react/IconSlot.tsx
125
+ var IconSlot_exports = {};
126
+ __export(IconSlot_exports, {
127
+ default: () => IconSlot_default
128
+ });
129
+ var React3, SvgIconSlot, IconSlot_default;
130
+ var init_IconSlot = __esm({
131
+ "src/react/IconSlot.tsx"() {
132
+ "use strict";
133
+ React3 = __toESM(require("react"));
134
+ init_types();
135
+ SvgIconSlot = ({ size = 16, ...props }) => {
136
+ const sizeValue = resolveSize(size);
137
+ return /* @__PURE__ */ React3.createElement("svg", { width: sizeValue, height: sizeValue, viewBox: "0 0 15 15", fill: "none", ...props }, /* @__PURE__ */ React3.createElement(
138
+ "path",
139
+ {
140
+ d: "M13.3333 7.33333C13.3333 4.01962 10.647 1.33333 7.33333 1.33333C4.01962 1.33333 1.33333 4.01962 1.33333 7.33333C1.33333 10.647 4.01962 13.3333 7.33333 13.3333C10.647 13.3333 13.3333 10.647 13.3333 7.33333ZM14.6667 7.33333C14.6667 11.3834 11.3834 14.6667 7.33333 14.6667C3.28325 14.6667 0 11.3834 0 7.33333C0 3.28325 3.28325 0 7.33333 0C11.3834 0 14.6667 3.28325 14.6667 7.33333Z",
141
+ fill: "currentColor"
142
+ }
143
+ ));
144
+ };
145
+ IconSlot_default = SvgIconSlot;
146
+ }
147
+ });
148
+
30
149
  // src/react/index.ts
31
150
  var react_exports = {};
32
151
  __export(react_exports, {
33
152
  ArrowLeft: () => ArrowLeft_default,
34
153
  ArrowUpRight: () => ArrowUpRight_default,
35
154
  ICON_SIZES: () => ICON_SIZES,
155
+ Icon: () => Icon_default,
36
156
  IconSlot: () => IconSlot_default,
37
157
  resolveSize: () => resolveSize
38
158
  });
39
159
  module.exports = __toCommonJS(react_exports);
160
+ init_ArrowLeft();
161
+ init_ArrowUpRight();
162
+ init_IconSlot();
40
163
 
41
- // src/react/ArrowLeft.tsx
42
- var React = __toESM(require("react"));
43
-
44
- // src/shared/types.ts
45
- var ICON_SIZES = {
46
- xs: 8,
47
- sm: 12,
48
- md: 16,
49
- lg: 20,
50
- xl: 24
51
- };
52
- function resolveSize(size = "lg") {
53
- if (typeof size === "number") {
54
- return size;
164
+ // src/react/Icon.tsx
165
+ var React4 = __toESM(require("react"));
166
+ function loadIcon(name) {
167
+ switch (name) {
168
+ case "arrow-left":
169
+ return Promise.resolve().then(() => (init_ArrowLeft(), ArrowLeft_exports)).then((m) => m.default);
170
+ case "arrow-up-right":
171
+ return Promise.resolve().then(() => (init_ArrowUpRight(), ArrowUpRight_exports)).then((m) => m.default);
172
+ case "icon-slot":
173
+ return Promise.resolve().then(() => (init_IconSlot(), IconSlot_exports)).then((m) => m.default);
174
+ default:
175
+ return Promise.reject(new Error(`Icon "${name}" not found`));
55
176
  }
56
- return ICON_SIZES[size] ?? ICON_SIZES.lg;
57
177
  }
58
-
59
- // src/react/ArrowLeft.tsx
60
- var SvgArrowLeft = ({ size = 16, ...props }) => {
61
- const sizeValue = resolveSize(size);
62
- return /* @__PURE__ */ React.createElement("svg", { width: sizeValue, height: sizeValue, viewBox: "0 0 24 24", fill: "none", ...props }, /* @__PURE__ */ React.createElement(
63
- "path",
64
- {
65
- fillRule: "evenodd",
66
- clipRule: "evenodd",
67
- d: "M12.7071 4.29289C13.0976 4.68342 13.0976 5.31658 12.7071 5.70711L6.41421 12L12.7071 18.2929C13.0976 18.6834 13.0976 19.3166 12.7071 19.7071C12.3166 20.0976 11.6834 20.0976 11.2929 19.7071L4.29289 12.7071C3.90237 12.3166 3.90237 11.6834 4.29289 11.2929L11.2929 4.29289C11.6834 3.90237 12.3166 3.90237 12.7071 4.29289Z",
68
- fill: "currentColor"
69
- }
70
- ), /* @__PURE__ */ React.createElement(
71
- "path",
72
- {
73
- fillRule: "evenodd",
74
- clipRule: "evenodd",
75
- d: "M4 12C4 11.4477 4.44772 11 5 11H19C19.5523 11 20 11.4477 20 12C20 12.5523 19.5523 13 19 13H5C4.44772 13 4 12.5523 4 12Z",
76
- fill: "currentColor"
77
- }
78
- ));
79
- };
80
- var ArrowLeft_default = SvgArrowLeft;
81
-
82
- // src/react/ArrowUpRight.tsx
83
- var React2 = __toESM(require("react"));
84
- var SvgArrowUpRight = ({ size = 16, ...props }) => {
85
- const sizeValue = resolveSize(size);
86
- return /* @__PURE__ */ React2.createElement("svg", { width: sizeValue, height: sizeValue, viewBox: "0 0 24 24", fill: "none", ...props }, /* @__PURE__ */ React2.createElement(
87
- "path",
88
- {
89
- fillRule: "evenodd",
90
- clipRule: "evenodd",
91
- d: "M6 7C6 6.44772 6.44772 6 7 6H17C17.5523 6 18 6.44772 18 7V17C18 17.5523 17.5523 18 17 18C16.4477 18 16 17.5523 16 17V8H7C6.44772 8 6 7.55228 6 7Z",
92
- fill: "currentColor"
93
- }
94
- ), /* @__PURE__ */ React2.createElement(
95
- "path",
96
- {
97
- fillRule: "evenodd",
98
- clipRule: "evenodd",
99
- d: "M17.7071 6.29289C18.0976 6.68342 18.0976 7.31658 17.7071 7.70711L7.70711 17.7071C7.31658 18.0976 6.68342 18.0976 6.29289 17.7071C5.90237 17.3166 5.90237 16.6834 6.29289 16.2929L16.2929 6.29289C16.6834 5.90237 17.3166 5.90237 17.7071 6.29289Z",
100
- fill: "currentColor"
101
- }
102
- ));
178
+ var Icon = ({ name, size = 16, color, ...props }) => {
179
+ const [IconComponent, setIconComponent] = React4.useState(null);
180
+ const [loading, setLoading] = React4.useState(true);
181
+ const [error, setError] = React4.useState(null);
182
+ React4.useEffect(() => {
183
+ setLoading(true);
184
+ setError(null);
185
+ loadIcon(name).then((Component) => {
186
+ setIconComponent(() => Component);
187
+ setLoading(false);
188
+ }).catch((err) => {
189
+ console.warn(err.message);
190
+ setError(err.message);
191
+ setLoading(false);
192
+ });
193
+ }, [name]);
194
+ if (loading) {
195
+ return null;
196
+ }
197
+ if (error || !IconComponent) {
198
+ return null;
199
+ }
200
+ const style = color ? { ...props.style, color } : props.style;
201
+ return /* @__PURE__ */ React4.createElement(IconComponent, { size, ...props, style });
103
202
  };
104
- var ArrowUpRight_default = SvgArrowUpRight;
203
+ var Icon_default = Icon;
105
204
 
106
- // src/react/IconSlot.tsx
107
- var React3 = __toESM(require("react"));
108
- var SvgIconSlot = ({ size = 16, ...props }) => {
109
- const sizeValue = resolveSize(size);
110
- return /* @__PURE__ */ React3.createElement("svg", { width: sizeValue, height: sizeValue, viewBox: "0 0 15 15", fill: "none", ...props }, /* @__PURE__ */ React3.createElement(
111
- "path",
112
- {
113
- d: "M13.3333 7.33333C13.3333 4.01962 10.647 1.33333 7.33333 1.33333C4.01962 1.33333 1.33333 4.01962 1.33333 7.33333C1.33333 10.647 4.01962 13.3333 7.33333 13.3333C10.647 13.3333 13.3333 10.647 13.3333 7.33333ZM14.6667 7.33333C14.6667 11.3834 11.3834 14.6667 7.33333 14.6667C3.28325 14.6667 0 11.3834 0 7.33333C0 3.28325 3.28325 0 7.33333 0C11.3834 0 14.6667 3.28325 14.6667 7.33333Z",
114
- fill: "currentColor"
115
- }
116
- ));
117
- };
118
- var IconSlot_default = SvgIconSlot;
205
+ // src/react/index.ts
206
+ init_types();
119
207
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/index.ts","../../src/react/ArrowLeft.tsx","../../src/shared/types.ts","../../src/react/ArrowUpRight.tsx","../../src/react/IconSlot.tsx"],"sourcesContent":["// Auto-generated exports\nexport { default as ArrowLeft } from './ArrowLeft';\nexport { default as ArrowUpRight } from './ArrowUpRight';\nexport { default as IconSlot } from './IconSlot';\n\n// Export types\nexport type {\n IconSize,\n IconSizeToken,\n ReactIconProps,\n} from '../shared/types';\n\nexport { ICON_SIZES, resolveSize } from '../shared/types';\n","import * as React from 'react';\nimport type { ReactIconProps } from '../shared/types';\nimport { resolveSize } from '../shared/types';\n\nconst SvgArrowLeft = ({ size = 16, ...props }: ReactIconProps) => {\n const sizeValue = resolveSize(size);\n \n return (\n <svg width={sizeValue} height={sizeValue} viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M12.7071 4.29289C13.0976 4.68342 13.0976 5.31658 12.7071 5.70711L6.41421 12L12.7071 18.2929C13.0976 18.6834 13.0976 19.3166 12.7071 19.7071C12.3166 20.0976 11.6834 20.0976 11.2929 19.7071L4.29289 12.7071C3.90237 12.3166 3.90237 11.6834 4.29289 11.2929L11.2929 4.29289C11.6834 3.90237 12.3166 3.90237 12.7071 4.29289Z\"\n fill=\"currentColor\"\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M4 12C4 11.4477 4.44772 11 5 11H19C19.5523 11 20 11.4477 20 12C20 12.5523 19.5523 13 19 13H5C4.44772 13 4 12.5523 4 12Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\n\nexport default SvgArrowLeft;\n","export type IconSize = number | 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/**\n * Icon size presets\n */\nexport const ICON_SIZES = {\n xs: 8,\n sm: 12,\n md: 16,\n lg: 20,\n xl: 24,\n} as const;\n\n/**\n * Icon size token type\n */\nexport type IconSizeToken = keyof typeof ICON_SIZES;\n\n/**\n * Props for React (web) icons\n */\nexport interface ReactIconProps extends React.SVGProps<SVGSVGElement> {\n size?: IconSize;\n}\n\n/**\n * Props for React Native icons\n */\nexport interface NativeIconProps {\n size?: IconSize;\n width?: number;\n height?: number;\n color?: string;\n style?: any;\n}\n\n/**\n * Resolves an icon size to a numeric value\n * @param size - Size value or token\n * @returns Numeric size in pixels\n */\nexport function resolveSize(size: IconSize = 'lg'): number {\n if (typeof size === 'number') {\n return size;\n }\n \n return ICON_SIZES[size] ?? ICON_SIZES.lg;\n}\n","import * as React from 'react';\nimport type { ReactIconProps } from '../shared/types';\nimport { resolveSize } from '../shared/types';\n\nconst SvgArrowUpRight = ({ size = 16, ...props }: ReactIconProps) => {\n const sizeValue = resolveSize(size);\n \n return (\n <svg width={sizeValue} height={sizeValue} viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M6 7C6 6.44772 6.44772 6 7 6H17C17.5523 6 18 6.44772 18 7V17C18 17.5523 17.5523 18 17 18C16.4477 18 16 17.5523 16 17V8H7C6.44772 8 6 7.55228 6 7Z\"\n fill=\"currentColor\"\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M17.7071 6.29289C18.0976 6.68342 18.0976 7.31658 17.7071 7.70711L7.70711 17.7071C7.31658 18.0976 6.68342 18.0976 6.29289 17.7071C5.90237 17.3166 5.90237 16.6834 6.29289 16.2929L16.2929 6.29289C16.6834 5.90237 17.3166 5.90237 17.7071 6.29289Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\n\nexport default SvgArrowUpRight;\n","import * as React from 'react';\nimport type { ReactIconProps } from '../shared/types';\nimport { resolveSize } from '../shared/types';\n\nconst SvgIconSlot = ({ size = 16, ...props }: ReactIconProps) => {\n const sizeValue = resolveSize(size);\n \n return (\n <svg width={sizeValue} height={sizeValue} viewBox=\"0 0 15 15\" fill=\"none\" {...props}>\n <path\n d=\"M13.3333 7.33333C13.3333 4.01962 10.647 1.33333 7.33333 1.33333C4.01962 1.33333 1.33333 4.01962 1.33333 7.33333C1.33333 10.647 4.01962 13.3333 7.33333 13.3333C10.647 13.3333 13.3333 10.647 13.3333 7.33333ZM14.6667 7.33333C14.6667 11.3834 11.3834 14.6667 7.33333 14.6667C3.28325 14.6667 0 11.3834 0 7.33333C0 3.28325 3.28325 0 7.33333 0C11.3834 0 14.6667 3.28325 14.6667 7.33333Z\"\n fill=\"current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AA;AAAA,EACP,CACF;AAEF;AAEA,IAAO,uBAAQ;;;ACzBf,IAAAC,SAAuB;AAIvB,IAAM,cAAc,CAAC,EAAE,OAAO,IAAI,GAAG,MAAM,MAAsB;AAC/D,QAAM,YAAY,YAAY,IAAI;AAElC,SACE,qCAAC,SAAI,OAAO,WAAW,QAAQ,WAAW,SAAQ,aAAY,MAAK,QAAQ,GAAG,SAC9E;AAAA,IAAC;AAAA;AAAA,MACC,GAAE;AAAA,MACF,MAAK;AAAA;AAAA,EACP,CACF;AAEF;AAEA,IAAO,mBAAQ;","names":["React","React"]}
1
+ {"version":3,"sources":["../../src/shared/types.ts","../../src/react/ArrowLeft.tsx","../../src/react/ArrowUpRight.tsx","../../src/react/IconSlot.tsx","../../src/react/index.ts","../../src/react/Icon.tsx"],"sourcesContent":["export type IconSize = number | 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/**\n * Icon size presets\n */\nexport const ICON_SIZES = {\n xs: 8,\n sm: 12,\n md: 16,\n lg: 20,\n xl: 24,\n} as const;\n\n/**\n * Icon size token type\n */\nexport type IconSizeToken = keyof typeof ICON_SIZES;\n\n/**\n * Props for React (web) icons\n */\nexport interface ReactIconProps extends React.SVGProps<SVGSVGElement> {\n size?: IconSize;\n}\n\n/**\n * Props for React Native icons\n */\nexport interface NativeIconProps {\n size?: IconSize;\n width?: number;\n height?: number;\n color?: string;\n style?: any;\n}\n\n/**\n * Resolves an icon size to a numeric value\n * @param size - Size value or token\n * @returns Numeric size in pixels\n */\nexport function resolveSize(size: IconSize = 'lg'): number {\n if (typeof size === 'number') {\n return size;\n }\n \n return ICON_SIZES[size] ?? ICON_SIZES.lg;\n}\n","import * as React from 'react';\nimport type { ReactIconProps } from '../shared/types';\nimport { resolveSize } from '../shared/types';\n\nconst SvgArrowLeft = ({ size = 16, ...props }: ReactIconProps) => {\n const sizeValue = resolveSize(size);\n \n return (\n <svg width={sizeValue} height={sizeValue} viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M12.7071 4.29289C13.0976 4.68342 13.0976 5.31658 12.7071 5.70711L6.41421 12L12.7071 18.2929C13.0976 18.6834 13.0976 19.3166 12.7071 19.7071C12.3166 20.0976 11.6834 20.0976 11.2929 19.7071L4.29289 12.7071C3.90237 12.3166 3.90237 11.6834 4.29289 11.2929L11.2929 4.29289C11.6834 3.90237 12.3166 3.90237 12.7071 4.29289Z\"\n fill=\"currentColor\"\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M4 12C4 11.4477 4.44772 11 5 11H19C19.5523 11 20 11.4477 20 12C20 12.5523 19.5523 13 19 13H5C4.44772 13 4 12.5523 4 12Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\n\nexport default SvgArrowLeft;\n","import * as React from 'react';\nimport type { ReactIconProps } from '../shared/types';\nimport { resolveSize } from '../shared/types';\n\nconst SvgArrowUpRight = ({ size = 16, ...props }: ReactIconProps) => {\n const sizeValue = resolveSize(size);\n \n return (\n <svg width={sizeValue} height={sizeValue} viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M6 7C6 6.44772 6.44772 6 7 6H17C17.5523 6 18 6.44772 18 7V17C18 17.5523 17.5523 18 17 18C16.4477 18 16 17.5523 16 17V8H7C6.44772 8 6 7.55228 6 7Z\"\n fill=\"currentColor\"\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M17.7071 6.29289C18.0976 6.68342 18.0976 7.31658 17.7071 7.70711L7.70711 17.7071C7.31658 18.0976 6.68342 18.0976 6.29289 17.7071C5.90237 17.3166 5.90237 16.6834 6.29289 16.2929L16.2929 6.29289C16.6834 5.90237 17.3166 5.90237 17.7071 6.29289Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\n\nexport default SvgArrowUpRight;\n","import * as React from 'react';\nimport type { ReactIconProps } from '../shared/types';\nimport { resolveSize } from '../shared/types';\n\nconst SvgIconSlot = ({ size = 16, ...props }: ReactIconProps) => {\n const sizeValue = resolveSize(size);\n \n return (\n <svg width={sizeValue} height={sizeValue} viewBox=\"0 0 15 15\" fill=\"none\" {...props}>\n <path\n d=\"M13.3333 7.33333C13.3333 4.01962 10.647 1.33333 7.33333 1.33333C4.01962 1.33333 1.33333 4.01962 1.33333 7.33333C1.33333 10.647 4.01962 13.3333 7.33333 13.3333C10.647 13.3333 13.3333 10.647 13.3333 7.33333ZM14.6667 7.33333C14.6667 11.3834 11.3834 14.6667 7.33333 14.6667C3.28325 14.6667 0 11.3834 0 7.33333C0 3.28325 3.28325 0 7.33333 0C11.3834 0 14.6667 3.28325 14.6667 7.33333Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\n\nexport default SvgIconSlot;\n","// Auto-generated exports\nexport { default as ArrowLeft } from './ArrowLeft';\nexport { default as ArrowUpRight } from './ArrowUpRight';\nexport { default as IconSlot } from './IconSlot';\n\n// Unified Icon component\nexport { default as Icon } from './Icon';\nexport type { IconName, IconProps } from './Icon';\n\n // Export types\nexport type {\n IconSize,\n IconSizeToken,\n ReactIconProps,\n} from '../shared/types';\n\nexport { ICON_SIZES, resolveSize } from '../shared/types';\n","import * as React from 'react';\nimport type { ReactIconProps } from '../shared/types';\n\n/**\n * Icon imports - using dynamic imports for tree-shaking\n * Auto-generated - do not edit manually\n */\n// Icon: arrow-left\n// Icon: arrow-up-right\n// Icon: icon-slot\n\n/**\n * Available icon names\n */\nexport type IconName = 'arrow-left' | 'arrow-up-right' | 'icon-slot';\n\n/**\n * Props for the unified Icon component\n */\nexport interface IconProps extends Omit<ReactIconProps, 'size'> {\n name: IconName;\n size?: ReactIconProps['size'];\n color?: string;\n}\n\n/**\n * Loads an icon component dynamically\n * This pattern allows bundlers to tree-shake unused icons\n * \n * Icons use default exports (export default SvgIconName),\n * so we access .default from the dynamic import result\n */\nfunction loadIcon(name: IconName): Promise<React.ComponentType<any>> {\n switch (name) {\n case 'arrow-left':\n return import('./ArrowLeft').then(m => m.default);\n case 'arrow-up-right':\n return import('./ArrowUpRight').then(m => m.default);\n case 'icon-slot':\n return import('./IconSlot').then(m => m.default);\n default:\n return Promise.reject(new Error(`Icon \"${name}\" not found`));\n }\n}\n\n/**\n * Unified Icon component that renders icons by name\n * Uses dynamic imports for tree-shaking support\n */\nconst Icon = ({ name, size = 16, color, ...props }: IconProps) => {\n const [IconComponent, setIconComponent] = React.useState<React.ComponentType<any> | null>(null);\n const [loading, setLoading] = React.useState(true);\n const [error, setError] = React.useState<string | null>(null);\n\n React.useEffect(() => {\n setLoading(true);\n setError(null);\n \n loadIcon(name)\n .then((Component) => {\n setIconComponent(() => Component);\n setLoading(false);\n })\n .catch((err) => {\n console.warn(err.message);\n setError(err.message);\n setLoading(false);\n });\n }, [name]);\n\n if (loading) {\n return null; // Consider showing a placeholder\n }\n\n if (error || !IconComponent) {\n return null;\n }\n\n // Apply color via style prop if provided (SVGs use fill=\"currentColor\")\n const style = color \n ? { ...props.style, color } \n : props.style;\n\n return <IconComponent size={size} {...props} style={style} />;\n};\n\nexport default Icon;"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCO,SAAS,YAAY,OAAiB,MAAc;AACzD,MAAI,OAAO,SAAS,UAAU;AAC5B,WAAO;AAAA,EACT;AAEA,SAAO,WAAW,IAAI,KAAK,WAAW;AACxC;AA/CA,IAKa;AALb;AAAA;AAAA;AAKO,IAAM,aAAa;AAAA,MACxB,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA;AAAA;;;ACXA;AAAA;AAAA;AAAA;AAAA,WAIM,cAqBC;AAzBP;AAAA;AAAA;AAAA,YAAuB;AAEvB;AAEA,IAAM,eAAe,CAAC,EAAE,OAAO,IAAI,GAAG,MAAM,MAAsB;AAChE,YAAM,YAAY,YAAY,IAAI;AAElC,aACE,o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AEA,IAAO,eAAQ;;;ADtEf;","names":["React","React","React"]}
@@ -1,85 +1,182 @@
1
- // src/react/ArrowLeft.tsx
2
- import * as React from "react";
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropNames = Object.getOwnPropertyNames;
3
+ var __esm = (fn, res) => function __init() {
4
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
5
+ };
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
3
10
 
4
11
  // src/shared/types.ts
5
- var ICON_SIZES = {
6
- xs: 8,
7
- sm: 12,
8
- md: 16,
9
- lg: 20,
10
- xl: 24
11
- };
12
12
  function resolveSize(size = "lg") {
13
13
  if (typeof size === "number") {
14
14
  return size;
15
15
  }
16
16
  return ICON_SIZES[size] ?? ICON_SIZES.lg;
17
17
  }
18
+ var ICON_SIZES;
19
+ var init_types = __esm({
20
+ "src/shared/types.ts"() {
21
+ "use strict";
22
+ ICON_SIZES = {
23
+ xs: 8,
24
+ sm: 12,
25
+ md: 16,
26
+ lg: 20,
27
+ xl: 24
28
+ };
29
+ }
30
+ });
18
31
 
19
32
  // src/react/ArrowLeft.tsx
20
- var SvgArrowLeft = ({ size = 16, ...props }) => {
21
- const sizeValue = resolveSize(size);
22
- return /* @__PURE__ */ React.createElement("svg", { width: sizeValue, height: sizeValue, viewBox: "0 0 24 24", fill: "none", ...props }, /* @__PURE__ */ React.createElement(
23
- "path",
24
- {
25
- fillRule: "evenodd",
26
- clipRule: "evenodd",
27
- d: "M12.7071 4.29289C13.0976 4.68342 13.0976 5.31658 12.7071 5.70711L6.41421 12L12.7071 18.2929C13.0976 18.6834 13.0976 19.3166 12.7071 19.7071C12.3166 20.0976 11.6834 20.0976 11.2929 19.7071L4.29289 12.7071C3.90237 12.3166 3.90237 11.6834 4.29289 11.2929L11.2929 4.29289C11.6834 3.90237 12.3166 3.90237 12.7071 4.29289Z",
28
- fill: "currentColor"
29
- }
30
- ), /* @__PURE__ */ React.createElement(
31
- "path",
32
- {
33
- fillRule: "evenodd",
34
- clipRule: "evenodd",
35
- d: "M4 12C4 11.4477 4.44772 11 5 11H19C19.5523 11 20 11.4477 20 12C20 12.5523 19.5523 13 19 13H5C4.44772 13 4 12.5523 4 12Z",
36
- fill: "currentColor"
37
- }
38
- ));
39
- };
40
- var ArrowLeft_default = SvgArrowLeft;
33
+ var ArrowLeft_exports = {};
34
+ __export(ArrowLeft_exports, {
35
+ default: () => ArrowLeft_default
36
+ });
37
+ import * as React from "react";
38
+ var SvgArrowLeft, ArrowLeft_default;
39
+ var init_ArrowLeft = __esm({
40
+ "src/react/ArrowLeft.tsx"() {
41
+ "use strict";
42
+ init_types();
43
+ SvgArrowLeft = ({ size = 16, ...props }) => {
44
+ const sizeValue = resolveSize(size);
45
+ return /* @__PURE__ */ React.createElement("svg", { width: sizeValue, height: sizeValue, viewBox: "0 0 24 24", fill: "none", ...props }, /* @__PURE__ */ React.createElement(
46
+ "path",
47
+ {
48
+ fillRule: "evenodd",
49
+ clipRule: "evenodd",
50
+ d: "M12.7071 4.29289C13.0976 4.68342 13.0976 5.31658 12.7071 5.70711L6.41421 12L12.7071 18.2929C13.0976 18.6834 13.0976 19.3166 12.7071 19.7071C12.3166 20.0976 11.6834 20.0976 11.2929 19.7071L4.29289 12.7071C3.90237 12.3166 3.90237 11.6834 4.29289 11.2929L11.2929 4.29289C11.6834 3.90237 12.3166 3.90237 12.7071 4.29289Z",
51
+ fill: "currentColor"
52
+ }
53
+ ), /* @__PURE__ */ React.createElement(
54
+ "path",
55
+ {
56
+ fillRule: "evenodd",
57
+ clipRule: "evenodd",
58
+ d: "M4 12C4 11.4477 4.44772 11 5 11H19C19.5523 11 20 11.4477 20 12C20 12.5523 19.5523 13 19 13H5C4.44772 13 4 12.5523 4 12Z",
59
+ fill: "currentColor"
60
+ }
61
+ ));
62
+ };
63
+ ArrowLeft_default = SvgArrowLeft;
64
+ }
65
+ });
41
66
 
42
67
  // src/react/ArrowUpRight.tsx
68
+ var ArrowUpRight_exports = {};
69
+ __export(ArrowUpRight_exports, {
70
+ default: () => ArrowUpRight_default
71
+ });
43
72
  import * as React2 from "react";
44
- var SvgArrowUpRight = ({ size = 16, ...props }) => {
45
- const sizeValue = resolveSize(size);
46
- return /* @__PURE__ */ React2.createElement("svg", { width: sizeValue, height: sizeValue, viewBox: "0 0 24 24", fill: "none", ...props }, /* @__PURE__ */ React2.createElement(
47
- "path",
48
- {
49
- fillRule: "evenodd",
50
- clipRule: "evenodd",
51
- d: "M6 7C6 6.44772 6.44772 6 7 6H17C17.5523 6 18 6.44772 18 7V17C18 17.5523 17.5523 18 17 18C16.4477 18 16 17.5523 16 17V8H7C6.44772 8 6 7.55228 6 7Z",
52
- fill: "currentColor"
53
- }
54
- ), /* @__PURE__ */ React2.createElement(
55
- "path",
56
- {
57
- fillRule: "evenodd",
58
- clipRule: "evenodd",
59
- d: "M17.7071 6.29289C18.0976 6.68342 18.0976 7.31658 17.7071 7.70711L7.70711 17.7071C7.31658 18.0976 6.68342 18.0976 6.29289 17.7071C5.90237 17.3166 5.90237 16.6834 6.29289 16.2929L16.2929 6.29289C16.6834 5.90237 17.3166 5.90237 17.7071 6.29289Z",
60
- fill: "currentColor"
61
- }
62
- ));
63
- };
64
- var ArrowUpRight_default = SvgArrowUpRight;
73
+ var SvgArrowUpRight, ArrowUpRight_default;
74
+ var init_ArrowUpRight = __esm({
75
+ "src/react/ArrowUpRight.tsx"() {
76
+ "use strict";
77
+ init_types();
78
+ SvgArrowUpRight = ({ size = 16, ...props }) => {
79
+ const sizeValue = resolveSize(size);
80
+ return /* @__PURE__ */ React2.createElement("svg", { width: sizeValue, height: sizeValue, viewBox: "0 0 24 24", fill: "none", ...props }, /* @__PURE__ */ React2.createElement(
81
+ "path",
82
+ {
83
+ fillRule: "evenodd",
84
+ clipRule: "evenodd",
85
+ d: "M6 7C6 6.44772 6.44772 6 7 6H17C17.5523 6 18 6.44772 18 7V17C18 17.5523 17.5523 18 17 18C16.4477 18 16 17.5523 16 17V8H7C6.44772 8 6 7.55228 6 7Z",
86
+ fill: "currentColor"
87
+ }
88
+ ), /* @__PURE__ */ React2.createElement(
89
+ "path",
90
+ {
91
+ fillRule: "evenodd",
92
+ clipRule: "evenodd",
93
+ d: "M17.7071 6.29289C18.0976 6.68342 18.0976 7.31658 17.7071 7.70711L7.70711 17.7071C7.31658 18.0976 6.68342 18.0976 6.29289 17.7071C5.90237 17.3166 5.90237 16.6834 6.29289 16.2929L16.2929 6.29289C16.6834 5.90237 17.3166 5.90237 17.7071 6.29289Z",
94
+ fill: "currentColor"
95
+ }
96
+ ));
97
+ };
98
+ ArrowUpRight_default = SvgArrowUpRight;
99
+ }
100
+ });
65
101
 
66
102
  // src/react/IconSlot.tsx
103
+ var IconSlot_exports = {};
104
+ __export(IconSlot_exports, {
105
+ default: () => IconSlot_default
106
+ });
67
107
  import * as React3 from "react";
68
- var SvgIconSlot = ({ size = 16, ...props }) => {
69
- const sizeValue = resolveSize(size);
70
- return /* @__PURE__ */ React3.createElement("svg", { width: sizeValue, height: sizeValue, viewBox: "0 0 15 15", fill: "none", ...props }, /* @__PURE__ */ React3.createElement(
71
- "path",
72
- {
73
- d: "M13.3333 7.33333C13.3333 4.01962 10.647 1.33333 7.33333 1.33333C4.01962 1.33333 1.33333 4.01962 1.33333 7.33333C1.33333 10.647 4.01962 13.3333 7.33333 13.3333C10.647 13.3333 13.3333 10.647 13.3333 7.33333ZM14.6667 7.33333C14.6667 11.3834 11.3834 14.6667 7.33333 14.6667C3.28325 14.6667 0 11.3834 0 7.33333C0 3.28325 3.28325 0 7.33333 0C11.3834 0 14.6667 3.28325 14.6667 7.33333Z",
74
- fill: "currentColor"
75
- }
76
- ));
108
+ var SvgIconSlot, IconSlot_default;
109
+ var init_IconSlot = __esm({
110
+ "src/react/IconSlot.tsx"() {
111
+ "use strict";
112
+ init_types();
113
+ SvgIconSlot = ({ size = 16, ...props }) => {
114
+ const sizeValue = resolveSize(size);
115
+ return /* @__PURE__ */ React3.createElement("svg", { width: sizeValue, height: sizeValue, viewBox: "0 0 15 15", fill: "none", ...props }, /* @__PURE__ */ React3.createElement(
116
+ "path",
117
+ {
118
+ d: "M13.3333 7.33333C13.3333 4.01962 10.647 1.33333 7.33333 1.33333C4.01962 1.33333 1.33333 4.01962 1.33333 7.33333C1.33333 10.647 4.01962 13.3333 7.33333 13.3333C10.647 13.3333 13.3333 10.647 13.3333 7.33333ZM14.6667 7.33333C14.6667 11.3834 11.3834 14.6667 7.33333 14.6667C3.28325 14.6667 0 11.3834 0 7.33333C0 3.28325 3.28325 0 7.33333 0C11.3834 0 14.6667 3.28325 14.6667 7.33333Z",
119
+ fill: "currentColor"
120
+ }
121
+ ));
122
+ };
123
+ IconSlot_default = SvgIconSlot;
124
+ }
125
+ });
126
+
127
+ // src/react/index.ts
128
+ init_ArrowLeft();
129
+ init_ArrowUpRight();
130
+ init_IconSlot();
131
+
132
+ // src/react/Icon.tsx
133
+ import * as React4 from "react";
134
+ function loadIcon(name) {
135
+ switch (name) {
136
+ case "arrow-left":
137
+ return Promise.resolve().then(() => (init_ArrowLeft(), ArrowLeft_exports)).then((m) => m.default);
138
+ case "arrow-up-right":
139
+ return Promise.resolve().then(() => (init_ArrowUpRight(), ArrowUpRight_exports)).then((m) => m.default);
140
+ case "icon-slot":
141
+ return Promise.resolve().then(() => (init_IconSlot(), IconSlot_exports)).then((m) => m.default);
142
+ default:
143
+ return Promise.reject(new Error(`Icon "${name}" not found`));
144
+ }
145
+ }
146
+ var Icon = ({ name, size = 16, color, ...props }) => {
147
+ const [IconComponent, setIconComponent] = React4.useState(null);
148
+ const [loading, setLoading] = React4.useState(true);
149
+ const [error, setError] = React4.useState(null);
150
+ React4.useEffect(() => {
151
+ setLoading(true);
152
+ setError(null);
153
+ loadIcon(name).then((Component) => {
154
+ setIconComponent(() => Component);
155
+ setLoading(false);
156
+ }).catch((err) => {
157
+ console.warn(err.message);
158
+ setError(err.message);
159
+ setLoading(false);
160
+ });
161
+ }, [name]);
162
+ if (loading) {
163
+ return null;
164
+ }
165
+ if (error || !IconComponent) {
166
+ return null;
167
+ }
168
+ const style = color ? { ...props.style, color } : props.style;
169
+ return /* @__PURE__ */ React4.createElement(IconComponent, { size, ...props, style });
77
170
  };
78
- var IconSlot_default = SvgIconSlot;
171
+ var Icon_default = Icon;
172
+
173
+ // src/react/index.ts
174
+ init_types();
79
175
  export {
80
176
  ArrowLeft_default as ArrowLeft,
81
177
  ArrowUpRight_default as ArrowUpRight,
82
178
  ICON_SIZES,
179
+ Icon_default as Icon,
83
180
  IconSlot_default as IconSlot,
84
181
  resolveSize
85
182
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/ArrowLeft.tsx","../../src/shared/types.ts","../../src/react/ArrowUpRight.tsx","../../src/react/IconSlot.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ReactIconProps } from '../shared/types';\nimport { resolveSize } from '../shared/types';\n\nconst SvgArrowLeft = ({ size = 16, ...props }: ReactIconProps) => {\n const sizeValue = resolveSize(size);\n \n return (\n <svg width={sizeValue} height={sizeValue} viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M12.7071 4.29289C13.0976 4.68342 13.0976 5.31658 12.7071 5.70711L6.41421 12L12.7071 18.2929C13.0976 18.6834 13.0976 19.3166 12.7071 19.7071C12.3166 20.0976 11.6834 20.0976 11.2929 19.7071L4.29289 12.7071C3.90237 12.3166 3.90237 11.6834 4.29289 11.2929L11.2929 4.29289C11.6834 3.90237 12.3166 3.90237 12.7071 4.29289Z\"\n fill=\"currentColor\"\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M4 12C4 11.4477 4.44772 11 5 11H19C19.5523 11 20 11.4477 20 12C20 12.5523 19.5523 13 19 13H5C4.44772 13 4 12.5523 4 12Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\n\nexport default SvgArrowLeft;\n","export type IconSize = number | 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/**\n * Icon size presets\n */\nexport const ICON_SIZES = {\n xs: 8,\n sm: 12,\n md: 16,\n lg: 20,\n xl: 24,\n} as const;\n\n/**\n * Icon size token type\n */\nexport type IconSizeToken = keyof typeof ICON_SIZES;\n\n/**\n * Props for React (web) icons\n */\nexport interface ReactIconProps extends React.SVGProps<SVGSVGElement> {\n size?: IconSize;\n}\n\n/**\n * Props for React Native icons\n */\nexport interface NativeIconProps {\n size?: IconSize;\n width?: number;\n height?: number;\n color?: string;\n style?: any;\n}\n\n/**\n * Resolves an icon size to a numeric value\n * @param size - Size value or token\n * @returns Numeric size in pixels\n */\nexport function resolveSize(size: IconSize = 'lg'): number {\n if (typeof size === 'number') {\n return size;\n }\n \n return ICON_SIZES[size] ?? ICON_SIZES.lg;\n}\n","import * as React from 'react';\nimport type { ReactIconProps } from '../shared/types';\nimport { resolveSize } from '../shared/types';\n\nconst SvgArrowUpRight = ({ size = 16, ...props }: ReactIconProps) => {\n const sizeValue = resolveSize(size);\n \n return (\n <svg width={sizeValue} height={sizeValue} viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M6 7C6 6.44772 6.44772 6 7 6H17C17.5523 6 18 6.44772 18 7V17C18 17.5523 17.5523 18 17 18C16.4477 18 16 17.5523 16 17V8H7C6.44772 8 6 7.55228 6 7Z\"\n fill=\"currentColor\"\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M17.7071 6.29289C18.0976 6.68342 18.0976 7.31658 17.7071 7.70711L7.70711 17.7071C7.31658 18.0976 6.68342 18.0976 6.29289 17.7071C5.90237 17.3166 5.90237 16.6834 6.29289 16.2929L16.2929 6.29289C16.6834 5.90237 17.3166 5.90237 17.7071 6.29289Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\n\nexport default SvgArrowUpRight;\n","import * as React from 'react';\nimport type { ReactIconProps } from '../shared/types';\nimport { resolveSize } from '../shared/types';\n\nconst SvgIconSlot = ({ size = 16, ...props }: ReactIconProps) => {\n const sizeValue = resolveSize(size);\n \n return (\n <svg width={sizeValue} height={sizeValue} viewBox=\"0 0 15 15\" fill=\"none\" {...props}>\n <path\n d=\"M13.3333 7.33333C13.3333 4.01962 10.647 1.33333 7.33333 1.33333C4.01962 1.33333 1.33333 4.01962 1.33333 7.33333C1.33333 10.647 4.01962 13.3333 7.33333 13.3333C10.647 13.3333 13.3333 10.647 13.3333 7.33333ZM14.6667 7.33333C14.6667 11.3834 11.3834 14.6667 7.33333 14.6667C3.28325 14.6667 0 11.3834 0 7.33333C0 3.28325 3.28325 0 7.33333 0C11.3834 0 14.6667 3.28325 14.6667 7.33333Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\n\nexport default SvgIconSlot;\n"],"mappings":";AAAA,YAAY,WAAW;;;ACKhB,IAAM,aAAa;AAAA,EACxB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AA8BO,SAAS,YAAY,OAAiB,MAAc;AACzD,MAAI,OAAO,SAAS,UAAU;AAC5B,WAAO;AAAA,EACT;AAEA,SAAO,WAAW,IAAI,KAAK,WAAW;AACxC;;;AD3CA,IAAM,eAAe,CAAC,EAAE,OAAO,IAAI,GAAG,MAAM,MAAsB;AAChE,QAAM,YAAY,YAAY,IAAI;AAElC,SACE,oCAAC,SAAI,OAAO,WAAW,QAAQ,WAAW,SAAQ,aAAY,MAAK,QAAQ,GAAG,SAC9E;AAAA,IAAC;AAAA;AAAA,MACC,UAAS;AAAA,MACT,UAAS;AAAA,MACT,GAAE;AAAA,MACF,MAAK;AAAA;AAAA,EACP,GACA;AAAA,IAAC;AAAA;AAAA,MACC,UAAS;AAAA,MACT,UAAS;AAAA,MACT,GAAE;AAAA,MACF,MAAK;AAAA;AAAA,EACP,CACF;AAEF;AAEA,IAAO,oBAAQ;;;AEzBf,YAAYA,YAAW;AAIvB,IAAM,kBAAkB,CAAC,EAAE,OAAO,IAAI,GAAG,MAAM,MAAsB;AACnE,QAAM,YAAY,YAAY,IAAI;AAElC,SACE,qCAAC,SAAI,OAAO,WAAW,QAAQ,WAAW,SAAQ,aAAY,MAAK,QAAQ,GAAG,SAC9E;AAAA,IAAC;AAAA;AAAA,MACC,UAAS;AAAA,MACT,UAAS;AAAA,MACT,GAAE;AAAA,MACF,MAAK;AAAA;AAAA,EACP,GACA;AAAA,IAAC;AAAA;AAAA,MACC,UAAS;AAAA,MACT,UAAS;AAAA,MACT,GAAE;AAAA,MACF,MAAK;AAAA;AAAA,EACP,CACF;AAEF;AAEA,IAAO,uBAAQ;;;ACzBf,YAAYC,YAAW;AAIvB,IAAM,cAAc,CAAC,EAAE,OAAO,IAAI,GAAG,MAAM,MAAsB;AAC/D,QAAM,YAAY,YAAY,IAAI;AAElC,SACE,qCAAC,SAAI,OAAO,WAAW,QAAQ,WAAW,SAAQ,aAAY,MAAK,QAAQ,GAAG,SAC9E;AAAA,IAAC;AAAA;AAAA,MACC,GAAE;AAAA,MACF,MAAK;AAAA;AAAA,EACP,CACF;AAEF;AAEA,IAAO,mBAAQ;","names":["React","React"]}
1
+ {"version":3,"sources":["../../src/shared/types.ts","../../src/react/ArrowLeft.tsx","../../src/react/ArrowUpRight.tsx","../../src/react/IconSlot.tsx","../../src/react/index.ts","../../src/react/Icon.tsx"],"sourcesContent":["export type IconSize = number | 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/**\n * Icon size presets\n */\nexport const ICON_SIZES = {\n xs: 8,\n sm: 12,\n md: 16,\n lg: 20,\n xl: 24,\n} as const;\n\n/**\n * Icon size token type\n */\nexport type IconSizeToken = keyof typeof ICON_SIZES;\n\n/**\n * Props for React (web) icons\n */\nexport interface ReactIconProps extends React.SVGProps<SVGSVGElement> {\n size?: IconSize;\n}\n\n/**\n * Props for React Native icons\n */\nexport interface NativeIconProps {\n size?: IconSize;\n width?: number;\n height?: number;\n color?: string;\n style?: any;\n}\n\n/**\n * Resolves an icon size to a numeric value\n * @param size - Size value or token\n * @returns Numeric size in pixels\n */\nexport function resolveSize(size: IconSize = 'lg'): number {\n if (typeof size === 'number') {\n return size;\n }\n \n return ICON_SIZES[size] ?? ICON_SIZES.lg;\n}\n","import * as React from 'react';\nimport type { ReactIconProps } from '../shared/types';\nimport { resolveSize } from '../shared/types';\n\nconst SvgArrowLeft = ({ size = 16, ...props }: ReactIconProps) => {\n const sizeValue = resolveSize(size);\n \n return (\n <svg width={sizeValue} height={sizeValue} viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M12.7071 4.29289C13.0976 4.68342 13.0976 5.31658 12.7071 5.70711L6.41421 12L12.7071 18.2929C13.0976 18.6834 13.0976 19.3166 12.7071 19.7071C12.3166 20.0976 11.6834 20.0976 11.2929 19.7071L4.29289 12.7071C3.90237 12.3166 3.90237 11.6834 4.29289 11.2929L11.2929 4.29289C11.6834 3.90237 12.3166 3.90237 12.7071 4.29289Z\"\n fill=\"currentColor\"\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M4 12C4 11.4477 4.44772 11 5 11H19C19.5523 11 20 11.4477 20 12C20 12.5523 19.5523 13 19 13H5C4.44772 13 4 12.5523 4 12Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\n\nexport default SvgArrowLeft;\n","import * as React from 'react';\nimport type { ReactIconProps } from '../shared/types';\nimport { resolveSize } from '../shared/types';\n\nconst SvgArrowUpRight = ({ size = 16, ...props }: ReactIconProps) => {\n const sizeValue = resolveSize(size);\n \n return (\n <svg width={sizeValue} height={sizeValue} viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M6 7C6 6.44772 6.44772 6 7 6H17C17.5523 6 18 6.44772 18 7V17C18 17.5523 17.5523 18 17 18C16.4477 18 16 17.5523 16 17V8H7C6.44772 8 6 7.55228 6 7Z\"\n fill=\"currentColor\"\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M17.7071 6.29289C18.0976 6.68342 18.0976 7.31658 17.7071 7.70711L7.70711 17.7071C7.31658 18.0976 6.68342 18.0976 6.29289 17.7071C5.90237 17.3166 5.90237 16.6834 6.29289 16.2929L16.2929 6.29289C16.6834 5.90237 17.3166 5.90237 17.7071 6.29289Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\n\nexport default SvgArrowUpRight;\n","import * as React from 'react';\nimport type { ReactIconProps } from '../shared/types';\nimport { resolveSize } from '../shared/types';\n\nconst SvgIconSlot = ({ size = 16, ...props }: ReactIconProps) => {\n const sizeValue = resolveSize(size);\n \n return (\n <svg width={sizeValue} height={sizeValue} viewBox=\"0 0 15 15\" fill=\"none\" {...props}>\n <path\n d=\"M13.3333 7.33333C13.3333 4.01962 10.647 1.33333 7.33333 1.33333C4.01962 1.33333 1.33333 4.01962 1.33333 7.33333C1.33333 10.647 4.01962 13.3333 7.33333 13.3333C10.647 13.3333 13.3333 10.647 13.3333 7.33333ZM14.6667 7.33333C14.6667 11.3834 11.3834 14.6667 7.33333 14.6667C3.28325 14.6667 0 11.3834 0 7.33333C0 3.28325 3.28325 0 7.33333 0C11.3834 0 14.6667 3.28325 14.6667 7.33333Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\n\nexport default SvgIconSlot;\n","// Auto-generated exports\nexport { default as ArrowLeft } from './ArrowLeft';\nexport { default as ArrowUpRight } from './ArrowUpRight';\nexport { default as IconSlot } from './IconSlot';\n\n// Unified Icon component\nexport { default as Icon } from './Icon';\nexport type { IconName, IconProps } from './Icon';\n\n // Export types\nexport type {\n IconSize,\n IconSizeToken,\n ReactIconProps,\n} from '../shared/types';\n\nexport { ICON_SIZES, resolveSize } from '../shared/types';\n","import * as React from 'react';\nimport type { ReactIconProps } from '../shared/types';\n\n/**\n * Icon imports - using dynamic imports for tree-shaking\n * Auto-generated - do not edit manually\n */\n// Icon: arrow-left\n// Icon: arrow-up-right\n// Icon: icon-slot\n\n/**\n * Available icon names\n */\nexport type IconName = 'arrow-left' | 'arrow-up-right' | 'icon-slot';\n\n/**\n * Props for the unified Icon component\n */\nexport interface IconProps extends Omit<ReactIconProps, 'size'> {\n name: IconName;\n size?: ReactIconProps['size'];\n color?: string;\n}\n\n/**\n * Loads an icon component dynamically\n * This pattern allows bundlers to tree-shake unused icons\n * \n * Icons use default exports (export default SvgIconName),\n * so we access .default from the dynamic import result\n */\nfunction loadIcon(name: IconName): Promise<React.ComponentType<any>> {\n switch (name) {\n case 'arrow-left':\n return import('./ArrowLeft').then(m => m.default);\n case 'arrow-up-right':\n return import('./ArrowUpRight').then(m => m.default);\n case 'icon-slot':\n return import('./IconSlot').then(m => m.default);\n default:\n return Promise.reject(new Error(`Icon \"${name}\" not found`));\n }\n}\n\n/**\n * Unified Icon component that renders icons by name\n * Uses dynamic imports for tree-shaking support\n */\nconst Icon = ({ name, size = 16, color, ...props }: IconProps) => {\n const [IconComponent, setIconComponent] = React.useState<React.ComponentType<any> | null>(null);\n const [loading, setLoading] = React.useState(true);\n const [error, setError] = React.useState<string | null>(null);\n\n React.useEffect(() => {\n setLoading(true);\n setError(null);\n \n loadIcon(name)\n .then((Component) => {\n setIconComponent(() => Component);\n setLoading(false);\n })\n .catch((err) => {\n console.warn(err.message);\n setError(err.message);\n setLoading(false);\n });\n }, [name]);\n\n if (loading) {\n return null; // Consider showing a placeholder\n }\n\n if (error || !IconComponent) {\n return null;\n }\n\n // Apply color via style prop if provided (SVGs use fill=\"currentColor\")\n const style = color \n ? { ...props.style, color } \n : props.style;\n\n return <IconComponent size={size} {...props} style={style} />;\n};\n\nexport default Icon;"],"mappings":";;;;;;;;;;;AAyCO,SAAS,YAAY,OAAiB,MAAc;AACzD,MAAI,OAAO,SAAS,UAAU;AAC5B,WAAO;AAAA,EACT;AA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O;AACxB,eAAS,IAAI,OAAO;AACpB,iBAAW,KAAK;AAAA,IAClB,CAAC;AAAA,EACL,GAAG,CAAC,IAAI,CAAC;AAET,MAAI,SAAS;AACX,WAAO;AAAA,EACT;AAEA,MAAI,SAAS,CAAC,eAAe;AAC3B,WAAO;AAAA,EACT;AAGA,QAAM,QAAQ,QACV,EAAE,GAAG,MAAM,OAAO,MAAM,IACxB,MAAM;AAEV,SAAO,qCAAC,iBAAc,MAAa,GAAG,OAAO,OAAc;AAC7D;AAEA,IAAO,eAAQ;;;ADtEf;","names":["React","React","React"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "huspy-icons",
3
- "version": "0.0.1",
3
+ "version": "0.1.1",
4
4
  "description": "Cross-platform icon package for Huspy - React and React Native compatible",
5
5
  "author": "Huspy",
6
6
  "license": "MIT",
@@ -0,0 +1,80 @@
1
+ import * as React from 'react';
2
+ import type { NativeIconProps } from '../shared/types';
3
+
4
+ /**
5
+ * Icon imports - using dynamic imports for tree-shaking
6
+ * Auto-generated - do not edit manually
7
+ */
8
+ // Icon: arrow-left
9
+ // Icon: arrow-up-right
10
+ // Icon: icon-slot
11
+
12
+ /**
13
+ * Available icon names
14
+ */
15
+ export type IconName = 'arrow-left' | 'arrow-up-right' | 'icon-slot';
16
+
17
+ /**
18
+ * Props for the unified Icon component (React Native)
19
+ */
20
+ export interface IconProps extends Omit<NativeIconProps, 'size'> {
21
+ name: IconName;
22
+ size?: NativeIconProps['size'];
23
+ color?: string;
24
+ }
25
+
26
+ /**
27
+ * Loads an icon component dynamically
28
+ * This pattern allows bundlers to tree-shake unused icons
29
+ * Note: React Native bundlers may handle this differently
30
+ */
31
+ function loadIcon(name: IconName): Promise<React.ComponentType<any>> {
32
+ switch (name) {
33
+ case 'arrow-left':
34
+ return import('./ArrowLeft').then(m => m.default);
35
+ case 'arrow-up-right':
36
+ return import('./ArrowUpRight').then(m => m.default);
37
+ case 'icon-slot':
38
+ return import('./IconSlot').then(m => m.default);
39
+ default:
40
+ return Promise.reject(new Error(`Icon "${name}" not found`));
41
+ }
42
+ }
43
+
44
+ /**
45
+ * Unified Icon component that renders icons by name (React Native)
46
+ * Uses dynamic imports for tree-shaking support
47
+ */
48
+ const Icon = ({ name, size = 16, color, ...props }: IconProps) => {
49
+ const [IconComponent, setIconComponent] = React.useState<React.ComponentType<any> | null>(null);
50
+ const [loading, setLoading] = React.useState(true);
51
+ const [error, setError] = React.useState<string | null>(null);
52
+
53
+ React.useEffect(() => {
54
+ setLoading(true);
55
+ setError(null);
56
+
57
+ loadIcon(name)
58
+ .then((Component) => {
59
+ setIconComponent(() => Component);
60
+ setLoading(false);
61
+ })
62
+ .catch((err) => {
63
+ console.warn(err.message);
64
+ setError(err.message);
65
+ setLoading(false);
66
+ });
67
+ }, [name]);
68
+
69
+ if (loading) {
70
+ return null;
71
+ }
72
+
73
+ if (error || !IconComponent) {
74
+ return null;
75
+ }
76
+
77
+ return <IconComponent size={size} color={color} {...props} />;
78
+ };
79
+
80
+ export default Icon;
@@ -3,6 +3,10 @@ export { default as ArrowLeft } from './ArrowLeft';
3
3
  export { default as ArrowUpRight } from './ArrowUpRight';
4
4
  export { default as IconSlot } from './IconSlot';
5
5
 
6
+ // Unified Icon component
7
+ export { default as Icon } from './Icon';
8
+ export type { IconName, IconProps } from './Icon';
9
+
6
10
  // Export types
7
11
  export type {
8
12
  IconSize,
@@ -0,0 +1,87 @@
1
+ import * as React from 'react';
2
+ import type { ReactIconProps } from '../shared/types';
3
+
4
+ /**
5
+ * Icon imports - using dynamic imports for tree-shaking
6
+ * Auto-generated - do not edit manually
7
+ */
8
+ // Icon: arrow-left
9
+ // Icon: arrow-up-right
10
+ // Icon: icon-slot
11
+
12
+ /**
13
+ * Available icon names
14
+ */
15
+ export type IconName = 'arrow-left' | 'arrow-up-right' | 'icon-slot';
16
+
17
+ /**
18
+ * Props for the unified Icon component
19
+ */
20
+ export interface IconProps extends Omit<ReactIconProps, 'size'> {
21
+ name: IconName;
22
+ size?: ReactIconProps['size'];
23
+ color?: string;
24
+ }
25
+
26
+ /**
27
+ * Loads an icon component dynamically
28
+ * This pattern allows bundlers to tree-shake unused icons
29
+ *
30
+ * Icons use default exports (export default SvgIconName),
31
+ * so we access .default from the dynamic import result
32
+ */
33
+ function loadIcon(name: IconName): Promise<React.ComponentType<any>> {
34
+ switch (name) {
35
+ case 'arrow-left':
36
+ return import('./ArrowLeft').then(m => m.default);
37
+ case 'arrow-up-right':
38
+ return import('./ArrowUpRight').then(m => m.default);
39
+ case 'icon-slot':
40
+ return import('./IconSlot').then(m => m.default);
41
+ default:
42
+ return Promise.reject(new Error(`Icon "${name}" not found`));
43
+ }
44
+ }
45
+
46
+ /**
47
+ * Unified Icon component that renders icons by name
48
+ * Uses dynamic imports for tree-shaking support
49
+ */
50
+ const Icon = ({ name, size = 16, color, ...props }: IconProps) => {
51
+ const [IconComponent, setIconComponent] = React.useState<React.ComponentType<any> | null>(null);
52
+ const [loading, setLoading] = React.useState(true);
53
+ const [error, setError] = React.useState<string | null>(null);
54
+
55
+ React.useEffect(() => {
56
+ setLoading(true);
57
+ setError(null);
58
+
59
+ loadIcon(name)
60
+ .then((Component) => {
61
+ setIconComponent(() => Component);
62
+ setLoading(false);
63
+ })
64
+ .catch((err) => {
65
+ console.warn(err.message);
66
+ setError(err.message);
67
+ setLoading(false);
68
+ });
69
+ }, [name]);
70
+
71
+ if (loading) {
72
+ return null; // Consider showing a placeholder
73
+ }
74
+
75
+ if (error || !IconComponent) {
76
+ return null;
77
+ }
78
+
79
+ // Apply color via style prop if provided (SVGs use fill="currentColor")
80
+ const style = color
81
+ ? { ...props.style, color }
82
+ : props.style;
83
+
84
+ return <IconComponent size={size} {...props} style={style} />;
85
+ };
86
+
87
+ export default Icon;
@@ -3,7 +3,11 @@ export { default as ArrowLeft } from './ArrowLeft';
3
3
  export { default as ArrowUpRight } from './ArrowUpRight';
4
4
  export { default as IconSlot } from './IconSlot';
5
5
 
6
- // Export types
6
+ // Unified Icon component
7
+ export { default as Icon } from './Icon';
8
+ export type { IconName, IconProps } from './Icon';
9
+
10
+ // Export types
7
11
  export type {
8
12
  IconSize,
9
13
  IconSizeToken,