@developershre/icona 1.0.6

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.
Files changed (43) hide show
  1. package/LICENSE +56 -0
  2. package/README.md +261 -0
  3. package/dist/index.d.ts +2 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +106 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/react/feather/heart.tsx +44 -0
  8. package/dist/react/feather/star.tsx +44 -0
  9. package/dist/react/maker.d.ts +5 -0
  10. package/dist/react/maker.d.ts.map +1 -0
  11. package/dist/react/maker.js +57 -0
  12. package/dist/react/maker.js.map +1 -0
  13. package/dist/react/tabler/outline/home.tsx +45 -0
  14. package/dist/react/tabler/outline/search.tsx +45 -0
  15. package/dist/react/tabler/outline/user.tsx +45 -0
  16. package/dist/react-native/feather/heart.tsx +35 -0
  17. package/dist/react-native/feather/star.tsx +35 -0
  18. package/dist/react-native/maker.d.ts +5 -0
  19. package/dist/react-native/maker.d.ts.map +1 -0
  20. package/dist/react-native/maker.js +48 -0
  21. package/dist/react-native/maker.js.map +1 -0
  22. package/dist/react-native/tabler/outline/home.tsx +36 -0
  23. package/dist/react-native/tabler/outline/search.tsx +36 -0
  24. package/dist/react-native/tabler/outline/user.tsx +36 -0
  25. package/dist/utils/pascal.d.ts +8 -0
  26. package/dist/utils/pascal.d.ts.map +1 -0
  27. package/dist/utils/pascal.js +22 -0
  28. package/dist/utils/pascal.js.map +1 -0
  29. package/dist/vue/feather/heart.vue +43 -0
  30. package/dist/vue/feather/star.vue +43 -0
  31. package/dist/vue/maker.d.ts +5 -0
  32. package/dist/vue/maker.d.ts.map +1 -0
  33. package/dist/vue/maker.js +56 -0
  34. package/dist/vue/maker.js.map +1 -0
  35. package/dist/vue/tabler/outline/home.vue +44 -0
  36. package/dist/vue/tabler/outline/search.vue +44 -0
  37. package/dist/vue/tabler/outline/user.vue +44 -0
  38. package/icons/feather/heart.svg +3 -0
  39. package/icons/feather/star.svg +3 -0
  40. package/icons/tabler/outline/home.svg +4 -0
  41. package/icons/tabler/outline/search.svg +4 -0
  42. package/icons/tabler/outline/user.svg +4 -0
  43. package/package.json +63 -0
package/LICENSE ADDED
@@ -0,0 +1,56 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Icona
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
+ **ADDITIONAL ATTRIBUTION REQUIREMENT:**
16
+ If you use this software for production purposes or replicate this project,
17
+ you MUST provide full credits to the original developers and designers of the
18
+ icons included in this library. This includes but is not limited to:
19
+
20
+ - Tabler Icons (https://tabler-icons.io/) - providing beautiful outline icons
21
+ - Feather Icons (https://feathericons.com/) - providing simple and beautiful icons
22
+ - Figma Community Icons - when using icons sourced from Figma, provide credits to the original Figma creators/designers
23
+ - Any other icon libraries or individual icon designers whose work is included
24
+
25
+ When using icons in production applications, appropriate attribution should be
26
+ provided in one of the following ways:
27
+ 1. In your application's credits/about section
28
+ 2. In your project's README or documentation
29
+ 3. In the footer or licensing section of your application
30
+ 4. In any other prominent and accessible location
31
+
32
+ For Figma-sourced icons, include the creator's name and Figma profile link when possible.
33
+
34
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
35
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
36
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
37
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
38
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
39
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
40
+ SOFTWARE.
41
+
42
+ ---
43
+
44
+ ## Icon Attribution
45
+
46
+ This project may include icons from various sources. Please ensure you comply
47
+ with the individual licenses of the icon libraries you use:
48
+
49
+ - **Tabler Icons**: MIT License - https://github.com/tabler/tabler-icons
50
+ - **Feather Icons**: MIT License - https://github.com/feathericons/feather
51
+ - **Figma Community Icons**: Various licenses - Please check individual creator's terms and provide proper attribution to the original Figma designers
52
+ - **Other Icons**: Please check individual icon library licenses
53
+
54
+ By using this software, you agree to respect and acknowledge the work of all
55
+ icon designers, including Figma community creators, and maintain proper attribution
56
+ as required by their respective licenses and terms of use.
package/README.md ADDED
@@ -0,0 +1,261 @@
1
+ # Icona - Modern Icon Library
2
+
3
+ A TypeScript-powered icon library that generates React, React Native, and Vue components from SVG files with support for nested folder structures.
4
+
5
+ ## ✨ Features
6
+
7
+ - 🎨 **Nested Folder Support**: Organize icons in nested directories (e.g., `icons/tabler/outline/`)
8
+ - ⚛️ **React Components**: Auto-generated TypeScript React components
9
+ - � **React Native Components**: Auto-generated React Native components with react-native-svg
10
+ - �🟢 **Vue Components**: Auto-generated Vue 3 components with TypeScript
11
+ - 📦 **TypeScript**: Full TypeScript support with strict type checking
12
+ - 🎭 **SVG Optimization**: Automatic SVG parsing and optimization
13
+ - 🔧 **Component Naming**: Smart PascalCase naming from folder structure
14
+
15
+ ## 🚀 Quick Start
16
+
17
+ ### Installation
18
+
19
+ ```bash
20
+ npm install
21
+ ```
22
+
23
+ ### Adding Icons
24
+
25
+ 1. Create your folder structure in the `icons/` directory:
26
+ ```
27
+ icons/
28
+ ├── tabler/
29
+ │ └── outline/
30
+ │ ├── home.svg
31
+ │ ├── user.svg
32
+ │ └── search.svg
33
+ └── feather/
34
+ ├── heart.svg
35
+ └── star.svg
36
+ ```
37
+
38
+ 2. Generate components:
39
+ ```bash
40
+ npm run build
41
+ npm run generate
42
+ ```
43
+
44
+ 3. Use the generated components in your projects!
45
+
46
+ ## 📁 Project Structure
47
+
48
+ ```
49
+ icona/
50
+ ├── icons/ # Source SVG files (nested folders supported)
51
+ ├── src/
52
+ │ ├── index.ts # Main icon processor
53
+ │ ├── react/maker.ts # React component generator
54
+ │ ├── react-native/maker.ts # React Native component generator
55
+ │ ├── vue/maker.ts # Vue component generator
56
+ │ └── utils/pascal.ts # PascalCase converter
57
+ ├── dist/
58
+ │ ├── react/ # Generated React components
59
+ │ ├── react-native/ # Generated React Native components
60
+ │ └── vue/ # Generated Vue components
61
+ └── types/index.d.ts # TypeScript definitions
62
+ ```
63
+
64
+ ## 🛠️ Usage
65
+
66
+ ### React Components
67
+
68
+ ```tsx
69
+ import { TablerOutlineHome } from './dist/react/tabler/outline/home';
70
+ import { FeatherHeart } from './dist/react/feather/heart';
71
+
72
+ function App() {
73
+ return (
74
+ <div>
75
+ <TablerOutlineHome size={32} color="blue" />
76
+ <FeatherHeart size={24} className="text-red-500" />
77
+ </div>
78
+ );
79
+ }
80
+ ```
81
+
82
+ ### React Native Components
83
+
84
+ ```tsx
85
+ import { TablerOutlineHome } from './dist/react-native/tabler/outline/home';
86
+ import { FeatherHeart } from './dist/react-native/feather/heart';
87
+
88
+ function App() {
89
+ return (
90
+ <View>
91
+ <TablerOutlineHome size={32} color="blue" />
92
+ <FeatherHeart size={24} color="red" />
93
+ </View>
94
+ );
95
+ }
96
+ ```
97
+
98
+ > **Note**: React Native components require `react-native-svg` to be installed in your project:
99
+ > ```bash
100
+ > npm install react-native-svg
101
+ > # For iOS
102
+ > cd ios && pod install
103
+ > ```
104
+
105
+ ### Vue Components
106
+
107
+ ```vue
108
+ <template>
109
+ <div>
110
+ <TablerOutlineHome :size="32" />
111
+ <FeatherHeart :size="24" className="text-red-500" />
112
+ </div>
113
+ </template>
114
+
115
+ <script setup>
116
+ import TablerOutlineHome from './dist/vue/tabler/outline/home.vue';
117
+ import FeatherHeart from './dist/vue/feather/heart.vue';
118
+ </script>
119
+ ```
120
+
121
+ ### Direct SVG Usage
122
+
123
+ ```html
124
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
125
+ <path d="m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>
126
+ <polyline points="9,22 9,12 15,12 15,22"/>
127
+ </svg>
128
+ ```
129
+
130
+ ## 📝 Scripts
131
+
132
+ | Command | Description |
133
+ |---------|-------------|
134
+ | `npm run build` | Compile TypeScript to JavaScript |
135
+ | `npm run dev` | Watch mode for development |
136
+ | `npm run generate` | Process SVG files and generate components |
137
+ | `npm run clean` | Remove dist directory |
138
+ | `npm run release:patch` | Local release with patch version bump |
139
+ | `npm run release:minor` | Local release with minor version bump |
140
+ | `npm run release:major` | Local release with major version bump |
141
+
142
+ ## 🚀 Automated Publishing
143
+
144
+ This project is configured for automatic npm publishing via GitHub Actions:
145
+
146
+ - **Auto-publish**: Every push to `main` branch automatically publishes to npm
147
+ - **Auto-versioning**: If the current version already exists on npm, it auto-bumps to the next patch version
148
+ - **GitHub Releases**: Automatically creates GitHub releases with generated components
149
+ - **Component Generation**: All React, Vue, and React Native components are generated before publishing
150
+
151
+ ### Manual Release (Local)
152
+
153
+ ```bash
154
+ # Set your NPM token in .env file
155
+ echo "NPM_TOKEN=your_npm_token_here" > .env
156
+
157
+ # Release with version bump
158
+ npm run release:patch # 1.0.0 → 1.0.1
159
+ npm run release:minor # 1.0.0 → 1.1.0
160
+ npm run release:major # 1.0.0 → 2.0.0
161
+ ```
162
+
163
+ ## 🎨 Component Props
164
+
165
+ ### React Components
166
+
167
+ ```tsx
168
+ interface IconProps {
169
+ size?: number | string; // Default: 24
170
+ color?: string; // Default: 'currentColor'
171
+ className?: string; // CSS classes
172
+ title?: string; // Accessibility title
173
+ 'aria-label'?: string; // Accessibility label
174
+ style?: React.CSSProperties; // Inline styles
175
+ }
176
+ ```
177
+
178
+ ### React Native Components
179
+
180
+ ```tsx
181
+ interface IconProps {
182
+ size?: number | string; // Default: 24
183
+ color?: string; // Default: 'currentColor'
184
+ style?: any; // React Native styles
185
+ testID?: string; // Test identifier
186
+ }
187
+ ```
188
+
189
+ ### Vue Components
190
+
191
+ ```typescript
192
+ interface Props {
193
+ size?: number | string; // Default: 24
194
+ className?: string; // CSS classes
195
+ style?: Record<string, any>; // Inline styles
196
+ title?: string; // Accessibility title
197
+ ariaLabel?: string; // Accessibility label
198
+ }
199
+ ```
200
+
201
+ ## 📦 Icon Data Structure
202
+
203
+ Generated icons have the following structure:
204
+
205
+ ```typescript
206
+ interface Icon {
207
+ name: string; // Icon name (filename without .svg)
208
+ path: string; // Full path to SVG file
209
+ category?: string; // Nested folder path (e.g., "tabler/outline")
210
+ content: string; // SVG inner content (paths, circles, etc.)
211
+ viewBox?: string; // SVG viewBox attribute
212
+ width?: number; // SVG width attribute
213
+ height?: number; // SVG height attribute
214
+ }
215
+ ```
216
+
217
+ ## 🔧 Configuration
218
+
219
+ ### TypeScript Configuration
220
+
221
+ The project uses strict TypeScript settings in `tsconfig.json`:
222
+
223
+ - `exactOptionalPropertyTypes: true` - Strict optional property handling
224
+ - `strictNullChecks: true` - Strict null checking
225
+ - `noImplicitAny: true` - No implicit any types
226
+
227
+ ### Folder Structure Rules
228
+
229
+ - Icons must be `.svg` files
230
+ - Nested folders become categories (e.g., `icons/tabler/outline/` → `category: "tabler/outline"`)
231
+ - Component names use PascalCase (e.g., `tabler/outline/home.svg` → `TablerOutlineHome`)
232
+ - Empty categories are handled gracefully
233
+
234
+ ## 🙏 Contributing
235
+
236
+ 1. Add your SVG files to the appropriate nested folders in `icons/`
237
+ 2. Run `npm run generate` to create components
238
+ 3. Ensure TypeScript compilation succeeds with `npm run build`
239
+
240
+ ## 📄 License
241
+
242
+ MIT License - see [LICENSE](LICENSE) file for details.
243
+
244
+ **Important Attribution Requirement**: When using this library in production or replicating this project, you must provide full credits to the original icon developers. This includes:
245
+
246
+ - **Tabler Icons** - https://tabler-icons.io/
247
+ - **Feather Icons** - https://feathericons.com/
248
+ - **Figma Community Icons** - Credit the original Figma creators/designers with their name and profile link
249
+ - Any other icon libraries whose work you include
250
+
251
+ Please include proper attribution in your app's credits, README, or footer section.
252
+
253
+ ## 🔗 Related
254
+
255
+ - [Tabler Icons](https://tabler-icons.io/)
256
+ - [Feather Icons](https://feathericons.com/)
257
+ - [React Icons](https://react-icons.github.io/react-icons/)
258
+
259
+ ---
260
+
261
+ Built with ❤️ using TypeScript, React, React Native, and Vue.
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js ADDED
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const fs_1 = __importDefault(require("fs"));
7
+ const path_1 = __importDefault(require("path"));
8
+ const iconsDir = "./icons";
9
+ const outputDir = "./dist";
10
+ const reactDir = path_1.default.join(outputDir, "react");
11
+ const vueDir = path_1.default.join(outputDir, "vue");
12
+ const reactNativeDir = path_1.default.join(outputDir, "react-native");
13
+ const maker_1 = require("./react/maker");
14
+ const maker_2 = require("./vue/maker");
15
+ const maker_3 = require("./react-native/maker");
16
+ const allIcons = [];
17
+ function extractSVGAttributes(content) {
18
+ const viewBoxMatch = content.match(/viewBox=["']([^"']*)["']/);
19
+ const widthMatch = content.match(/width=["']([^"']*)["']/);
20
+ const heightMatch = content.match(/height=["']([^"']*)["']/);
21
+ const result = {};
22
+ if (viewBoxMatch?.[1]) {
23
+ result.viewBox = viewBoxMatch[1];
24
+ }
25
+ if (widthMatch?.[1]) {
26
+ result.width = parseInt(widthMatch[1], 10);
27
+ }
28
+ if (heightMatch?.[1]) {
29
+ result.height = parseInt(heightMatch[1], 10);
30
+ }
31
+ return result;
32
+ }
33
+ function extractSVGContent(svgContent) {
34
+ // Remove the outer <svg> tags and get inner content
35
+ const match = svgContent.match(/<svg[^>]*>(.*)<\/svg>/s);
36
+ return match?.[1]?.trim() || svgContent.trim();
37
+ }
38
+ function ensureDirectoryExists(dirPath) {
39
+ if (!fs_1.default.existsSync(dirPath)) {
40
+ fs_1.default.mkdirSync(dirPath, { recursive: true });
41
+ }
42
+ }
43
+ function walkDir(dir) {
44
+ if (!fs_1.default.existsSync(dir)) {
45
+ console.log(`Icons directory '${dir}' does not exist. Creating...`);
46
+ fs_1.default.mkdirSync(dir, { recursive: true });
47
+ return;
48
+ }
49
+ fs_1.default.readdirSync(dir).forEach(file => {
50
+ const fullPath = path_1.default.join(dir, file);
51
+ const stat = fs_1.default.statSync(fullPath);
52
+ if (stat.isDirectory()) {
53
+ walkDir(fullPath);
54
+ }
55
+ else if (file.endsWith(".svg")) {
56
+ try {
57
+ const svgContent = fs_1.default.readFileSync(fullPath, "utf-8");
58
+ const iconName = file.replace(".svg", "");
59
+ const category = path_1.default.relative(iconsDir, path_1.default.dirname(fullPath));
60
+ const attributes = extractSVGAttributes(svgContent);
61
+ const content = extractSVGContent(svgContent);
62
+ const icon = {
63
+ name: iconName,
64
+ path: fullPath,
65
+ content,
66
+ ...(category && { category }),
67
+ ...(attributes.viewBox && { viewBox: attributes.viewBox }),
68
+ ...(attributes.width && { width: attributes.width }),
69
+ ...(attributes.height && { height: attributes.height })
70
+ };
71
+ // Add to global icons array
72
+ allIcons.push(icon);
73
+ // Generate React component
74
+ const reactComponent = (0, maker_1.generateReactComponent)(icon);
75
+ const reactCategory = icon.category ? path_1.default.join(reactDir, icon.category) : reactDir;
76
+ ensureDirectoryExists(reactCategory);
77
+ fs_1.default.writeFileSync(path_1.default.join(reactCategory, `${iconName}.tsx`), reactComponent);
78
+ // Generate Vue component
79
+ const vueComponent = (0, maker_2.generateVueComponent)(icon);
80
+ const vueCategory = icon.category ? path_1.default.join(vueDir, icon.category) : vueDir;
81
+ ensureDirectoryExists(vueCategory);
82
+ fs_1.default.writeFileSync(path_1.default.join(vueCategory, `${iconName}.vue`), vueComponent);
83
+ // Generate React Native component
84
+ const reactNativeComponent = (0, maker_3.generateReactNativeComponent)(icon);
85
+ const reactNativeCategory = icon.category ? path_1.default.join(reactNativeDir, icon.category) : reactNativeDir;
86
+ ensureDirectoryExists(reactNativeCategory);
87
+ fs_1.default.writeFileSync(path_1.default.join(reactNativeCategory, `${iconName}.tsx`), reactNativeComponent);
88
+ console.log(`Generated components for ${icon.category ? icon.category + "/" : ""}${iconName}`);
89
+ }
90
+ catch (error) {
91
+ console.error(`Error processing ${fullPath}:`, error);
92
+ }
93
+ }
94
+ });
95
+ }
96
+ // Ensure output directories exist
97
+ ensureDirectoryExists(reactDir);
98
+ ensureDirectoryExists(vueDir);
99
+ ensureDirectoryExists(reactNativeDir);
100
+ // Process all icons
101
+ walkDir(iconsDir);
102
+ console.log(`\nProcessed ${allIcons.length} icons across ${[...new Set(allIcons.map(icon => icon.category).filter(Boolean))].length} categories`);
103
+ console.log("React components saved to dist/react/");
104
+ console.log("Vue components saved to dist/vue/");
105
+ console.log("React Native components saved to dist/react-native/");
106
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,4CAAmB;AACnB,gDAAuB;AAEvB,MAAM,QAAQ,GAAG,SAAS,CAAC;AAC3B,MAAM,SAAS,GAAG,QAAQ,CAAC;AAC3B,MAAM,QAAQ,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AAC/C,MAAM,MAAM,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;AAC3C,MAAM,cAAc,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;AAE5D,yCA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AAC,CAAC"}
@@ -0,0 +1,44 @@
1
+ import React from 'react';
2
+
3
+ interface FeatherHeartProps {
4
+ size?: number | string;
5
+ color?: string;
6
+ className?: string;
7
+ title?: string;
8
+ 'aria-label'?: string;
9
+ style?: React.CSSProperties;
10
+ }
11
+
12
+ const FeatherHeart = React.forwardRef<SVGSVGElement, FeatherHeartProps>(
13
+ ({
14
+ size = 24,
15
+ color = 'currentColor',
16
+ className,
17
+ title,
18
+ 'aria-label': ariaLabel,
19
+ style
20
+ }, ref) => (
21
+ <svg
22
+ ref={ref}
23
+ width={size}
24
+ height={size}
25
+ viewBox="0 0 24 24"
26
+ fill="none"
27
+ stroke={color}
28
+ strokeWidth="2"
29
+ strokeLinecap="round"
30
+ strokeLinejoin="round"
31
+ className={className}
32
+ style={style}
33
+ role="img"
34
+ aria-label={ariaLabel || 'Heart'}
35
+ >
36
+ {title && <title>{title}</title>}
37
+ <path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/>
38
+ </svg>
39
+ )
40
+ );
41
+
42
+ FeatherHeart.displayName = 'FeatherHeart';
43
+
44
+ export default FeatherHeart;
@@ -0,0 +1,44 @@
1
+ import React from 'react';
2
+
3
+ interface FeatherStarProps {
4
+ size?: number | string;
5
+ color?: string;
6
+ className?: string;
7
+ title?: string;
8
+ 'aria-label'?: string;
9
+ style?: React.CSSProperties;
10
+ }
11
+
12
+ const FeatherStar = React.forwardRef<SVGSVGElement, FeatherStarProps>(
13
+ ({
14
+ size = 24,
15
+ color = 'currentColor',
16
+ className,
17
+ title,
18
+ 'aria-label': ariaLabel,
19
+ style
20
+ }, ref) => (
21
+ <svg
22
+ ref={ref}
23
+ width={size}
24
+ height={size}
25
+ viewBox="0 0 24 24"
26
+ fill="none"
27
+ stroke={color}
28
+ strokeWidth="2"
29
+ strokeLinecap="round"
30
+ strokeLinejoin="round"
31
+ className={className}
32
+ style={style}
33
+ role="img"
34
+ aria-label={ariaLabel || 'Star'}
35
+ >
36
+ {title && <title>{title}</title>}
37
+ <polygon points="12,2 15.09,8.26 22,9.27 17,14.14 18.18,21.02 12,17.77 5.82,21.02 7,14.14 2,9.27 8.91,8.26"/>
38
+ </svg>
39
+ )
40
+ );
41
+
42
+ FeatherStar.displayName = 'FeatherStar';
43
+
44
+ export default FeatherStar;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generate a React component from an icon
3
+ */
4
+ export declare function generateReactComponent(icon: Icon): string;
5
+ //# sourceMappingURL=maker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"maker.d.ts","sourceRoot":"","sources":["../../src/react/maker.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAiDzD"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateReactComponent = generateReactComponent;
4
+ const pascal_1 = require("../utils/pascal");
5
+ /**
6
+ * Generate a React component from an icon
7
+ */
8
+ function generateReactComponent(icon) {
9
+ const componentName = (0, pascal_1.toPascalCase)(icon.name);
10
+ const categoryPrefix = icon.category ? (0, pascal_1.toPascalCase)(icon.category) : "";
11
+ const fullComponentName = categoryPrefix ? `${categoryPrefix}${componentName}` : componentName;
12
+ return `import React from 'react';
13
+
14
+ interface ${fullComponentName}Props {
15
+ size?: number | string;
16
+ color?: string;
17
+ className?: string;
18
+ title?: string;
19
+ 'aria-label'?: string;
20
+ style?: React.CSSProperties;
21
+ }
22
+
23
+ const ${fullComponentName} = React.forwardRef<SVGSVGElement, ${fullComponentName}Props>(
24
+ ({
25
+ size = 24,
26
+ color = 'currentColor',
27
+ className,
28
+ title,
29
+ 'aria-label': ariaLabel,
30
+ style
31
+ }, ref) => (
32
+ <svg
33
+ ref={ref}
34
+ width={size}
35
+ height={size}
36
+ viewBox="${icon.viewBox || '0 0 24 24'}"
37
+ fill="none"
38
+ stroke={color}
39
+ strokeWidth="2"
40
+ strokeLinecap="round"
41
+ strokeLinejoin="round"
42
+ className={className}
43
+ style={style}
44
+ role="img"
45
+ aria-label={ariaLabel || '${componentName}'}
46
+ >
47
+ {title && <title>{title}</title>}
48
+ ${icon.content}
49
+ </svg>
50
+ )
51
+ );
52
+
53
+ ${fullComponentName}.displayName = '${fullComponentName}';
54
+
55
+ export default ${fullComponentName};`;
56
+ }
57
+ //# sourceMappingURL=maker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"maker.js","sourceRoot":"","sources":["../../src/react/maker.ts"],"names":[],"mappings":";;AAKA,wDAiDC;AAtDD,4CAA+C;AAE/C;;GAEG;AACH,SAAgB,sBAAsB,CAAC,IAAU;IAC7C,MAAM,aAAa,GAAG,IAAA,qBAAY,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC9C,MAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAA,qBAAY,EAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACxE,MAAM,iBAAiB,GAAG,cAAc,CAAC,CAAC,CAAC,GAAG,cAAc,GAAG,aAAa,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC;IAE/F,OAAO;;YAEC,iBAAiB;;;;;;;;;QASrB,iBAAiB,sCAAsC,iBAAiB;;;;;;;;;;;;;iBAa/D,IAAI,CAAC,OAAO,IAAI,WAAW;;;;;;;;;kCASV,aAAa;;;QAGvC,IAAI,CAAC,OAAO;;;;;EAKlB,iBAAiB,mBAAmB,iBAAiB;;iBAEtC,iBAAiB,GAAG,CAAC;AACtC,CAAC"}
@@ -0,0 +1,45 @@
1
+ import React from 'react';
2
+
3
+ interface TablerOutlineHomeProps {
4
+ size?: number | string;
5
+ color?: string;
6
+ className?: string;
7
+ title?: string;
8
+ 'aria-label'?: string;
9
+ style?: React.CSSProperties;
10
+ }
11
+
12
+ const TablerOutlineHome = React.forwardRef<SVGSVGElement, TablerOutlineHomeProps>(
13
+ ({
14
+ size = 24,
15
+ color = 'currentColor',
16
+ className,
17
+ title,
18
+ 'aria-label': ariaLabel,
19
+ style
20
+ }, ref) => (
21
+ <svg
22
+ ref={ref}
23
+ width={size}
24
+ height={size}
25
+ viewBox="0 0 24 24"
26
+ fill="none"
27
+ stroke={color}
28
+ strokeWidth="2"
29
+ strokeLinecap="round"
30
+ strokeLinejoin="round"
31
+ className={className}
32
+ style={style}
33
+ role="img"
34
+ aria-label={ariaLabel || 'Home'}
35
+ >
36
+ {title && <title>{title}</title>}
37
+ <path d="m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>
38
+ <polyline points="9,22 9,12 15,12 15,22"/>
39
+ </svg>
40
+ )
41
+ );
42
+
43
+ TablerOutlineHome.displayName = 'TablerOutlineHome';
44
+
45
+ export default TablerOutlineHome;