huspy-icons 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Huspy
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,232 @@
1
+ # huspy-icons
2
+
3
+ A cross-platform icon package generated from raw SVGs. Ships separate builds for **web (React / Next.js)** and **native (Expo / React Native)** with a consistent API and first-class tree-shaking.
4
+
5
+ ---
6
+
7
+ ## ✨ Features
8
+
9
+ * **Single source of truth**: raw SVGs → codegen → typed components
10
+ * **Two targets**: `huspy-icons/react` (web) and `huspy-icons/native` (expo)
11
+ * **Tree-shakable** per-icon files for optimal bundle size
12
+ * **Theming ready**: `color="currentColor"` by default; size tokens
13
+ * **A11y** for web (`title`, `aria-hidden`) and native (`accessibilityLabel`)
14
+ * **Scales** to hundreds of icons with auto-generated exports and types
15
+
16
+ ---
17
+
18
+ ## 📦 Install
19
+
20
+ > Publish this package to your registry (npm/GitHub Packages) and install in each app.
21
+
22
+ **Next.js (web):**
23
+
24
+ ```bash
25
+ npm install huspy-icons
26
+ ```
27
+
28
+ **Expo (native):**
29
+
30
+ ```bash
31
+ npx expo install react-native-svg
32
+ npm install huspy-icons
33
+ ```
34
+
35
+ > `react` build has no extra peer deps. `native` build peers `react-native-svg`.
36
+
37
+ ---
38
+
39
+ ## 🚀 Quick Start
40
+
41
+ **Web (React / Next.js)**
42
+
43
+ ```tsx
44
+ import { ArrowLeft } from 'huspy-icons/react';
45
+
46
+ export default function Example() {
47
+ return (
48
+ <div style={{ color: '#111' }}>
49
+ <ArrowLeft size="md" />
50
+ </div>
51
+ );
52
+ }
53
+ ```
54
+
55
+ **Expo (React Native)**
56
+
57
+ ```tsx
58
+ import { ArrowLeft } from 'huspy-icons/native';
59
+
60
+ export default function Example() {
61
+ return <ArrowLeft size={20} color="#111" accessibilityLabel="Back" />;
62
+ }
63
+ ```
64
+
65
+ ---
66
+
67
+ ## 🗂️ Repo Structure (package)
68
+
69
+ ```
70
+ packages/huspy-icons/
71
+ icons-src/ # raw .svg files (single source of truth)
72
+ src/
73
+ react/ # generated TSX for web
74
+ native/ # generated TSX for expo
75
+ shared/ # helper types/utilities (createIcon, resolveSize)
76
+ scripts/ # codegen utilities (svgr, registry, typedefs)
77
+ svgo.config.js
78
+ package.json
79
+ tsconfig.json
80
+ ```
81
+
82
+ ---
83
+
84
+ ## ⚙️ Scripts
85
+
86
+ ```json
87
+ {
88
+ "scripts": {
89
+ "svgo": "svgo -f icons-src -o icons-src --config=svgo.config.js",
90
+ "gen:react": "svgr icons-src -d src/react --ext tsx --typescript --icon",
91
+ "gen:native": "svgr --native icons-src -d src/native --ext tsx --typescript --icon",
92
+ "gen": "npm run svgo && npm run gen:react && npm run gen:native",
93
+ "build": "tsup src/**/index.ts --format esm,cjs --dts --out-dir dist --clean",
94
+ "prepare": "npm run gen && npm run build"
95
+ }
96
+ }
97
+ ```
98
+
99
+ * **`svgo`**: normalize SVGs (remove width/height, hardcoded colors).
100
+ * **`gen:*`**: generate typed components for each target using SVGR.
101
+ * **`build`**: bundle per-target outputs with types.
102
+
103
+ ---
104
+
105
+ ## 🔁 Usage Patterns
106
+
107
+ ### Named components (preferred)
108
+
109
+ ```tsx
110
+ import { ArrowLeft, ArrowUpRight } from 'huspy-icons/react';
111
+ <ArrowLeft size="lg" />
112
+ <ArrowUpRight size={20} color="#6b7280" />
113
+ ```
114
+
115
+ * Best **tree-shaking**, great DX, no runtime lookup.
116
+
117
+ ---
118
+
119
+ ## 🎨 Props & Theming
120
+
121
+ All icons share a consistent API:
122
+
123
+ * `size`: `number | 'xs' | 'sm' | 'md' | 'lg' | 'xl'` (defaults to `lg` ≈ 20)
124
+ * `color`: any CSS color (web) or string color (native), defaults to `currentColor`
125
+ * Web a11y: `title?`, `aria-hidden?` (decorative by default)
126
+ * Native a11y: `accessibilityLabel?`
127
+
128
+ > Because paths default to `currentColor`, icons inherit text color out of the box. Style a parent `color` (web) or pass `color` directly.
129
+
130
+ ---
131
+
132
+ ## ↔️ RTL & Logical Directions
133
+
134
+ Icons are designed with logical naming. For RTL support:
135
+
136
+ ```tsx
137
+ // web
138
+ <div dir="rtl">
139
+ <ArrowLeft />
140
+ </div>
141
+
142
+ // native
143
+ <View style={{ transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }] }}>
144
+ <ArrowLeft />
145
+ </View>
146
+ ```
147
+
148
+ You can also add a `rtlFlip` prop or generate RTL variants if your design system requires them.
149
+
150
+ ---
151
+
152
+ ## 🧩 Adding Icons
153
+
154
+ 1. Drop raw SVGs into `icons-src/` (use 24×24 viewBox if possible).
155
+
156
+ 2. Run codegen:
157
+
158
+ ```bash
159
+ npm run gen
160
+ ```
161
+
162
+ 3. Commit, version, and publish:
163
+
164
+ ```bash
165
+ npm version minor
166
+ npm publish --access public
167
+ ```
168
+
169
+ > Filenames become component names: `arrow-left.svg` → `ArrowLeft.tsx`.
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
+
181
+ ## 🧰 Troubleshooting
182
+
183
+ ### Next.js
184
+
185
+ * If using the **prebuilt** components (recommended), you **don't** need SVGR in the app.
186
+ * Ensure the package exports are ESM/CJS as shipped by `tsup`. If you see "Cannot use import statement outside a module", align your Next.js transpilation or stick to ESM imports.
187
+
188
+ ### Expo
189
+
190
+ * Ensure `react-native-svg` is installed via `npx expo install react-native-svg`.
191
+ * If tree-shaking seems off in web builds via Expo Router, prefer the `react` entry for web.
192
+
193
+ ---
194
+
195
+ ## 📦 Exports
196
+
197
+ ```json
198
+ {
199
+ "exports": {
200
+ "./react": "./dist/react/index.js",
201
+ "./native": "./dist/native/index.js"
202
+ }
203
+ }
204
+ ```
205
+
206
+ * Web: `import { ArrowLeft, ArrowUpRight } from 'huspy-icons/react'`
207
+ * Native: `import { ArrowLeft, ArrowUpRight } from 'huspy-icons/native'`
208
+
209
+ ---
210
+
211
+ ## 🔒 Versioning
212
+
213
+ * **Patch**: path tweaks, metadata fixes
214
+ * **Minor**: new icons, non-breaking props
215
+ * **Major**: removals/renames, breaking prop changes
216
+
217
+ Use Changesets or Conventional Commits to automate changelog and release tags.
218
+
219
+ ---
220
+
221
+ ## 📄 License
222
+
223
+ MIT © Huspy
224
+
225
+ ---
226
+
227
+ ## 💡 Notes
228
+
229
+ * Keep `icons-src/` clean and consistent (same stroke width family, grid).
230
+ * Default to outlines; if you ship `filled` variants, namespace as `HomeIcon` / `HomeFilledIcon` or `HomeIcon` with a `variant="filled"` prop (generated).
231
+ * Consider publishing a Storybook or gallery page in your web app to preview all icons.
232
+
@@ -0,0 +1,41 @@
1
+ import * as React from 'react';
2
+
3
+ type IconSize = number | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
4
+ /**
5
+ * Icon size presets
6
+ */
7
+ declare const ICON_SIZES: {
8
+ readonly xs: 8;
9
+ readonly sm: 12;
10
+ readonly md: 16;
11
+ readonly lg: 20;
12
+ readonly xl: 24;
13
+ };
14
+ /**
15
+ * Icon size token type
16
+ */
17
+ type IconSizeToken = keyof typeof ICON_SIZES;
18
+ /**
19
+ * Props for React Native icons
20
+ */
21
+ interface NativeIconProps {
22
+ size?: IconSize;
23
+ width?: number;
24
+ height?: number;
25
+ color?: string;
26
+ style?: any;
27
+ }
28
+ /**
29
+ * Resolves an icon size to a numeric value
30
+ * @param size - Size value or token
31
+ * @returns Numeric size in pixels
32
+ */
33
+ declare function resolveSize(size?: IconSize): number;
34
+
35
+ declare const SvgArrowLeft: ({ size, ...props }: NativeIconProps) => React.JSX.Element;
36
+
37
+ declare const SvgArrowUpRight: ({ size, ...props }: NativeIconProps) => React.JSX.Element;
38
+
39
+ declare const SvgIconSlot: ({ size, ...props }: NativeIconProps) => React.JSX.Element;
40
+
41
+ export { SvgArrowLeft as ArrowLeft, SvgArrowUpRight as ArrowUpRight, ICON_SIZES, type IconSize, type IconSizeToken, SvgIconSlot as IconSlot, type NativeIconProps, resolveSize };
@@ -0,0 +1,130 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/native/index.ts
31
+ var native_exports = {};
32
+ __export(native_exports, {
33
+ ArrowLeft: () => ArrowLeft_default,
34
+ ArrowUpRight: () => ArrowUpRight_default,
35
+ ICON_SIZES: () => ICON_SIZES,
36
+ IconSlot: () => IconSlot_default,
37
+ resolveSize: () => resolveSize
38
+ });
39
+ module.exports = __toCommonJS(native_exports);
40
+
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;
56
+ }
57
+ return ICON_SIZES[size] ?? ICON_SIZES.lg;
58
+ }
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
+ ));
105
+ };
106
+ var ArrowUpRight_default = SvgArrowUpRight;
107
+
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;
122
+ // Annotate the CommonJS export names for ESM import in node:
123
+ 0 && (module.exports = {
124
+ ArrowLeft,
125
+ ArrowUpRight,
126
+ ICON_SIZES,
127
+ IconSlot,
128
+ resolveSize
129
+ });
130
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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"]}
@@ -0,0 +1,37 @@
1
+ import * as React$1 from 'react';
2
+
3
+ type IconSize = number | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
4
+ /**
5
+ * Icon size presets
6
+ */
7
+ declare const ICON_SIZES: {
8
+ readonly xs: 8;
9
+ readonly sm: 12;
10
+ readonly md: 16;
11
+ readonly lg: 20;
12
+ readonly xl: 24;
13
+ };
14
+ /**
15
+ * Icon size token type
16
+ */
17
+ type IconSizeToken = keyof typeof ICON_SIZES;
18
+ /**
19
+ * Props for React (web) icons
20
+ */
21
+ interface ReactIconProps extends React.SVGProps<SVGSVGElement> {
22
+ size?: IconSize;
23
+ }
24
+ /**
25
+ * Resolves an icon size to a numeric value
26
+ * @param size - Size value or token
27
+ * @returns Numeric size in pixels
28
+ */
29
+ declare function resolveSize(size?: IconSize): number;
30
+
31
+ declare const SvgArrowLeft: ({ size, ...props }: ReactIconProps) => React$1.JSX.Element;
32
+
33
+ declare const SvgArrowUpRight: ({ size, ...props }: ReactIconProps) => React$1.JSX.Element;
34
+
35
+ declare const SvgIconSlot: ({ size, ...props }: ReactIconProps) => React$1.JSX.Element;
36
+
37
+ export { SvgArrowLeft as ArrowLeft, SvgArrowUpRight as ArrowUpRight, ICON_SIZES, type IconSize, type IconSizeToken, SvgIconSlot as IconSlot, type ReactIconProps, resolveSize };
@@ -0,0 +1,37 @@
1
+ import * as React$1 from 'react';
2
+
3
+ type IconSize = number | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
4
+ /**
5
+ * Icon size presets
6
+ */
7
+ declare const ICON_SIZES: {
8
+ readonly xs: 8;
9
+ readonly sm: 12;
10
+ readonly md: 16;
11
+ readonly lg: 20;
12
+ readonly xl: 24;
13
+ };
14
+ /**
15
+ * Icon size token type
16
+ */
17
+ type IconSizeToken = keyof typeof ICON_SIZES;
18
+ /**
19
+ * Props for React (web) icons
20
+ */
21
+ interface ReactIconProps extends React.SVGProps<SVGSVGElement> {
22
+ size?: IconSize;
23
+ }
24
+ /**
25
+ * Resolves an icon size to a numeric value
26
+ * @param size - Size value or token
27
+ * @returns Numeric size in pixels
28
+ */
29
+ declare function resolveSize(size?: IconSize): number;
30
+
31
+ declare const SvgArrowLeft: ({ size, ...props }: ReactIconProps) => React$1.JSX.Element;
32
+
33
+ declare const SvgArrowUpRight: ({ size, ...props }: ReactIconProps) => React$1.JSX.Element;
34
+
35
+ declare const SvgIconSlot: ({ size, ...props }: ReactIconProps) => React$1.JSX.Element;
36
+
37
+ export { SvgArrowLeft as ArrowLeft, SvgArrowUpRight as ArrowUpRight, ICON_SIZES, type IconSize, type IconSizeToken, SvgIconSlot as IconSlot, type ReactIconProps, resolveSize };
@@ -0,0 +1,119 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/react/index.ts
31
+ var react_exports = {};
32
+ __export(react_exports, {
33
+ ArrowLeft: () => ArrowLeft_default,
34
+ ArrowUpRight: () => ArrowUpRight_default,
35
+ ICON_SIZES: () => ICON_SIZES,
36
+ IconSlot: () => IconSlot_default,
37
+ resolveSize: () => resolveSize
38
+ });
39
+ module.exports = __toCommonJS(react_exports);
40
+
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;
55
+ }
56
+ return ICON_SIZES[size] ?? ICON_SIZES.lg;
57
+ }
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
+ ));
103
+ };
104
+ var ArrowUpRight_default = SvgArrowUpRight;
105
+
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;
119
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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=\"currentColor\"\n />\n </svg>\n );\n};\n\nexport default SvgIconSlot;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;;;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,IAAAA,SAAuB;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,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"]}
@@ -0,0 +1,86 @@
1
+ // src/react/ArrowLeft.tsx
2
+ import * as React from "react";
3
+
4
+ // 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
+ function resolveSize(size = "lg") {
13
+ if (typeof size === "number") {
14
+ return size;
15
+ }
16
+ return ICON_SIZES[size] ?? ICON_SIZES.lg;
17
+ }
18
+
19
+ // 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;
41
+
42
+ // src/react/ArrowUpRight.tsx
43
+ 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;
65
+
66
+ // src/react/IconSlot.tsx
67
+ 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
+ ));
77
+ };
78
+ var IconSlot_default = SvgIconSlot;
79
+ export {
80
+ ArrowLeft_default as ArrowLeft,
81
+ ArrowUpRight_default as ArrowUpRight,
82
+ ICON_SIZES,
83
+ IconSlot_default as IconSlot,
84
+ resolveSize
85
+ };
86
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +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"]}
package/package.json ADDED
@@ -0,0 +1,74 @@
1
+ {
2
+ "name": "huspy-icons",
3
+ "version": "0.0.1",
4
+ "description": "Cross-platform icon package for Huspy - React and React Native compatible",
5
+ "author": "Huspy",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/huspy/huspy-icons.git"
10
+ },
11
+ "keywords": [
12
+ "icons",
13
+ "react",
14
+ "react-native",
15
+ "expo",
16
+ "svg"
17
+ ],
18
+ "main": "./dist/react/index.js",
19
+ "module": "./dist/react/index.mjs",
20
+ "types": "./dist/react/index.d.ts",
21
+ "exports": {
22
+ "./react": {
23
+ "types": "./dist/react/index.d.ts",
24
+ "import": "./dist/react/index.mjs",
25
+ "require": "./dist/react/index.js"
26
+ },
27
+ "./native": {
28
+ "types": "./dist/native/index.d.ts",
29
+ "require": "./dist/native/index.js",
30
+ "default": "./dist/native/index.js"
31
+ }
32
+ },
33
+ "files": [
34
+ "dist",
35
+ "src"
36
+ ],
37
+ "scripts": {
38
+ "svgo": "svgo -f icons-src -o icons-src --config=svgo.config.js",
39
+ "gen:react": "svgr icons-src -d src/react --ext tsx --typescript --icon && node scripts/add-size-prop.js --react",
40
+ "gen:native": "svgr --native icons-src -d src/native --ext tsx --typescript --icon && node scripts/add-size-prop.js --native",
41
+ "gen:types": "node scripts/generate-types.js",
42
+ "gen": "npm run svgo && npm run gen:react && npm run gen:native && npm run gen:types",
43
+ "build": "tsup",
44
+ "prepare": "npm run svgo && npm run gen:react && npm run gen:native && npm run gen:types && npm run build",
45
+ "typecheck": "tsc --noEmit"
46
+ },
47
+ "devDependencies": {
48
+ "@svgr/cli": "^8.1.0",
49
+ "@svgr/core": "^8.1.0",
50
+ "@types/node": "^20.11.0",
51
+ "@types/react": "^18.2.48",
52
+ "@types/react-native": "^0.73.0",
53
+ "esbuild": "^0.19.11",
54
+ "svgo": "^3.3.2",
55
+ "tsup": "^8.0.1",
56
+ "typescript": "^5.3.3"
57
+ },
58
+ "peerDependencies": {
59
+ "react": ">=16.8.0",
60
+ "react-native": ">=0.73.0",
61
+ "react-native-svg": "^15.14.0"
62
+ },
63
+ "peerDependenciesMeta": {
64
+ "react-native": {
65
+ "optional": true
66
+ },
67
+ "react-native-svg": {
68
+ "optional": true
69
+ }
70
+ },
71
+ "publishConfig": {
72
+ "access": "public"
73
+ }
74
+ }
@@ -0,0 +1,27 @@
1
+ import * as React from 'react';
2
+ import Svg, { Path } from 'react-native-svg';
3
+ import type { NativeIconProps } from '../shared/types';
4
+ import { resolveSize } from '../shared/types';
5
+
6
+ const SvgArrowLeft = ({ size = 16, ...props }: NativeIconProps) => {
7
+ const sizeValue = resolveSize(size);
8
+
9
+ return (
10
+ <Svg width={sizeValue} height={sizeValue} viewBox="0 0 24 24" fill="none" {...props}>
11
+ <Path
12
+ fillRule="evenodd"
13
+ clipRule="evenodd"
14
+ 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"
15
+ fill="currentColor"
16
+ />
17
+ <Path
18
+ fillRule="evenodd"
19
+ clipRule="evenodd"
20
+ 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"
21
+ fill="currentColor"
22
+ />
23
+ </Svg>
24
+ );
25
+ };
26
+
27
+ export default SvgArrowLeft;
@@ -0,0 +1,27 @@
1
+ import * as React from 'react';
2
+ import Svg, { Path } from 'react-native-svg';
3
+ import type { NativeIconProps } from '../shared/types';
4
+ import { resolveSize } from '../shared/types';
5
+
6
+ const SvgArrowUpRight = ({ size = 16, ...props }: NativeIconProps) => {
7
+ const sizeValue = resolveSize(size);
8
+
9
+ return (
10
+ <Svg width={sizeValue} height={sizeValue} viewBox="0 0 24 24" fill="none" {...props}>
11
+ <Path
12
+ fillRule="evenodd"
13
+ clipRule="evenodd"
14
+ 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"
15
+ fill="currentColor"
16
+ />
17
+ <Path
18
+ fillRule="evenodd"
19
+ clipRule="evenodd"
20
+ 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"
21
+ fill="currentColor"
22
+ />
23
+ </Svg>
24
+ );
25
+ };
26
+
27
+ export default SvgArrowUpRight;
@@ -0,0 +1,19 @@
1
+ import * as React from 'react';
2
+ import Svg, { Path } from 'react-native-svg';
3
+ import type { NativeIconProps } from '../shared/types';
4
+ import { resolveSize } from '../shared/types';
5
+
6
+ const SvgIconSlot = ({ size = 16, ...props }: NativeIconProps) => {
7
+ const sizeValue = resolveSize(size);
8
+
9
+ return (
10
+ <Svg width={sizeValue} height={sizeValue} viewBox="0 0 15 15" fill="none" {...props}>
11
+ <Path
12
+ 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"
13
+ fill="currentColor"
14
+ />
15
+ </Svg>
16
+ );
17
+ };
18
+
19
+ export default SvgIconSlot;
@@ -0,0 +1,13 @@
1
+ // Auto-generated exports
2
+ export { default as ArrowLeft } from './ArrowLeft';
3
+ export { default as ArrowUpRight } from './ArrowUpRight';
4
+ export { default as IconSlot } from './IconSlot';
5
+
6
+ // Export types
7
+ export type {
8
+ IconSize,
9
+ IconSizeToken,
10
+ NativeIconProps,
11
+ } from '../shared/types';
12
+
13
+ export { ICON_SIZES, resolveSize } from '../shared/types';
@@ -0,0 +1,3 @@
1
+ export { default as ArrowLeft } from './ArrowLeft';
2
+ export { default as ArrowUpRight } from './ArrowUpRight';
3
+ export { default as IconSlot } from './IconSlot';
@@ -0,0 +1,26 @@
1
+ import * as React from 'react';
2
+ import type { ReactIconProps } from '../shared/types';
3
+ import { resolveSize } from '../shared/types';
4
+
5
+ const SvgArrowLeft = ({ size = 16, ...props }: ReactIconProps) => {
6
+ const sizeValue = resolveSize(size);
7
+
8
+ return (
9
+ <svg width={sizeValue} height={sizeValue} viewBox="0 0 24 24" fill="none" {...props}>
10
+ <path
11
+ fillRule="evenodd"
12
+ clipRule="evenodd"
13
+ 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"
14
+ fill="currentColor"
15
+ />
16
+ <path
17
+ fillRule="evenodd"
18
+ clipRule="evenodd"
19
+ 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"
20
+ fill="currentColor"
21
+ />
22
+ </svg>
23
+ );
24
+ };
25
+
26
+ export default SvgArrowLeft;
@@ -0,0 +1,26 @@
1
+ import * as React from 'react';
2
+ import type { ReactIconProps } from '../shared/types';
3
+ import { resolveSize } from '../shared/types';
4
+
5
+ const SvgArrowUpRight = ({ size = 16, ...props }: ReactIconProps) => {
6
+ const sizeValue = resolveSize(size);
7
+
8
+ return (
9
+ <svg width={sizeValue} height={sizeValue} viewBox="0 0 24 24" fill="none" {...props}>
10
+ <path
11
+ fillRule="evenodd"
12
+ clipRule="evenodd"
13
+ 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"
14
+ fill="currentColor"
15
+ />
16
+ <path
17
+ fillRule="evenodd"
18
+ clipRule="evenodd"
19
+ 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"
20
+ fill="currentColor"
21
+ />
22
+ </svg>
23
+ );
24
+ };
25
+
26
+ export default SvgArrowUpRight;
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import type { ReactIconProps } from '../shared/types';
3
+ import { resolveSize } from '../shared/types';
4
+
5
+ const SvgIconSlot = ({ size = 16, ...props }: ReactIconProps) => {
6
+ const sizeValue = resolveSize(size);
7
+
8
+ return (
9
+ <svg width={sizeValue} height={sizeValue} viewBox="0 0 15 15" fill="none" {...props}>
10
+ <path
11
+ 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"
12
+ fill="currentColor"
13
+ />
14
+ </svg>
15
+ );
16
+ };
17
+
18
+ export default SvgIconSlot;
@@ -0,0 +1,13 @@
1
+ // Auto-generated exports
2
+ export { default as ArrowLeft } from './ArrowLeft';
3
+ export { default as ArrowUpRight } from './ArrowUpRight';
4
+ export { default as IconSlot } from './IconSlot';
5
+
6
+ // Export types
7
+ export type {
8
+ IconSize,
9
+ IconSizeToken,
10
+ ReactIconProps,
11
+ } from '../shared/types';
12
+
13
+ export { ICON_SIZES, resolveSize } from '../shared/types';
@@ -0,0 +1,3 @@
1
+ export { default as ArrowLeft } from './ArrowLeft';
2
+ export { default as ArrowUpRight } from './ArrowUpRight';
3
+ export { default as IconSlot } from './IconSlot';
@@ -0,0 +1,48 @@
1
+ export type IconSize = number | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
2
+
3
+ /**
4
+ * Icon size presets
5
+ */
6
+ export const ICON_SIZES = {
7
+ xs: 8,
8
+ sm: 12,
9
+ md: 16,
10
+ lg: 20,
11
+ xl: 24,
12
+ } as const;
13
+
14
+ /**
15
+ * Icon size token type
16
+ */
17
+ export type IconSizeToken = keyof typeof ICON_SIZES;
18
+
19
+ /**
20
+ * Props for React (web) icons
21
+ */
22
+ export interface ReactIconProps extends React.SVGProps<SVGSVGElement> {
23
+ size?: IconSize;
24
+ }
25
+
26
+ /**
27
+ * Props for React Native icons
28
+ */
29
+ export interface NativeIconProps {
30
+ size?: IconSize;
31
+ width?: number;
32
+ height?: number;
33
+ color?: string;
34
+ style?: any;
35
+ }
36
+
37
+ /**
38
+ * Resolves an icon size to a numeric value
39
+ * @param size - Size value or token
40
+ * @returns Numeric size in pixels
41
+ */
42
+ export function resolveSize(size: IconSize = 'lg'): number {
43
+ if (typeof size === 'number') {
44
+ return size;
45
+ }
46
+
47
+ return ICON_SIZES[size] ?? ICON_SIZES.lg;
48
+ }