@primeicons/solid 8.0.0-alpha.4 → 8.0.0-alpha.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 (2) hide show
  1. package/README.md +53 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -206,6 +206,59 @@ Each icon automatically includes these CSS classes:
206
206
  }
207
207
  ```
208
208
 
209
+ ## Metadata & Icon Lookup
210
+
211
+ Icon metadata is managed by the `@primeicons/metadata` package and re-exported here for convenience:
212
+
213
+ ```typescript
214
+ import { ICON_MAP, ICON_MAP_BY_NAME, findIcons } from '@primeicons/metadata/solid';
215
+
216
+ // Find icon by name (kebab-case)
217
+ const iconData = ICON_MAP_BY_NAME['check-circle'];
218
+ const CheckCircle = iconData.component; // Already lazy-loaded component
219
+ <CheckCircle size={24} />;
220
+
221
+ // Search and use
222
+ const results = findIcons('arrow');
223
+ results.forEach(icon => {
224
+ const Component = icon.component;
225
+ <Component size={24} />;
226
+ });
227
+ ```
228
+
229
+ Alternatively, import directly from the metadata package:
230
+
231
+ ```typescript
232
+ import { ICON_MAP, findIcons } from '@primeicons/metadata/solid';
233
+ ```
234
+
235
+ ### Metadata API
236
+
237
+ | Variable | Type | Description |
238
+ | ----------------------- | ----------------------------------- | -------------------------- |
239
+ | `ICON_MAP` | `IconMetadataEntry[]` | All icons as array |
240
+ | `ICON_MAP_BY_NAME` | `Record<string, IconMetadataEntry>` | Indexed by kebab-case name |
241
+ | `ICON_MAP_BY_COMPONENT` | `Record<string, IconMetadataEntry>` | Indexed by component name |
242
+ | `ICON_MAP_BY_CAMEL` | `Record<string, IconMetadataEntry>` | Indexed by camelCase name |
243
+ | `TOTAL_ICONS` | `number` | Total icon count |
244
+ | `PACKAGE_INFO` | `object` | Package metadata |
245
+
246
+ | Function | Returns | Description |
247
+ | --------------------- | --------------------- | ----------------------------- |
248
+ | `getIconNames()` | `string[]` | All kebab-case icon names |
249
+ | `getComponentNames()` | `string[]` | All component names |
250
+ | `findIcons(query)` | `IconMetadataEntry[]` | Search icons by partial match |
251
+
252
+ ### JSON Metadata
253
+
254
+ Access the raw JSON metadata directly:
255
+
256
+ ```typescript
257
+ import metadata from '@primeicons/metadata/solid.json';
258
+
259
+ console.log(manifest.icons[0]); // { name: 'address-book', component: 'AddressBook', ... }
260
+ ```
261
+
209
262
  ## Icon List
210
263
 
211
264
  The library includes 300+ icons including:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primeicons/solid",
3
- "version": "8.0.0-alpha.4",
3
+ "version": "8.0.0-alpha.6",
4
4
  "author": "PrimeTek Informatics",
5
5
  "homepage": "https://primeicons.org/",
6
6
  "description": "PrimeIcons for Solid.js - 300+ customizable SVG icons as Solid components",
@@ -54,7 +54,7 @@
54
54
  ],
55
55
  "dependencies": {
56
56
  "@primeuix/utils": "^0.6.4",
57
- "@primeicons/core": "8.0.0-alpha.4"
57
+ "@primeicons/core": "8.0.0-alpha.6"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "solid-js": "^1"