@payfit/unity-icons 2.56.0 → 2.56.2
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/package.json +5 -5
- package/skills/unity-icons/SKILL.md +22 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payfit/unity-icons",
|
|
3
|
-
"version": "2.56.
|
|
3
|
+
"version": "2.56.2",
|
|
4
4
|
"module": "./dist/esm/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -76,17 +76,17 @@
|
|
|
76
76
|
"tsx": "4.20.5",
|
|
77
77
|
"vite": "8.1.4",
|
|
78
78
|
"vitest": "4.1.10",
|
|
79
|
-
"@payfit/hr-app-eslint": "0.0.0-use.local",
|
|
80
79
|
"@payfit/figma-tools": "0.0.0-use.local",
|
|
81
|
-
"@payfit/hr-
|
|
80
|
+
"@payfit/hr-app-eslint": "0.0.0-use.local",
|
|
82
81
|
"@payfit/storybook-config": "0.0.0-use.local",
|
|
83
|
-
"@payfit/
|
|
82
|
+
"@payfit/hr-apps-tsconfigs": "0.0.0-use.local",
|
|
83
|
+
"@payfit/unity-themes": "2.56.2",
|
|
84
84
|
"@payfit/vite-configs": "0.0.0-use.local"
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
87
|
"react": "18.3.1",
|
|
88
88
|
"react-dom": "18.3.1",
|
|
89
|
-
"@payfit/unity-themes": "2.56.
|
|
89
|
+
"@payfit/unity-themes": "2.56.2"
|
|
90
90
|
},
|
|
91
91
|
"peerDependenciesMeta": {
|
|
92
92
|
"storybook": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: unity-icons
|
|
3
|
-
description: Use when selecting a Unity icon, checking Filled/Outlined variants, or rendering an icon in Unity code. Search the canonical icon catalog first and use the source implementation only for usage details.
|
|
3
|
+
description: Use when selecting or migrating a Unity icon, checking Filled/Outlined variants, typing an icon prop, or rendering an icon in Unity code. Search the canonical icon catalog first and use the source implementation only for usage details.
|
|
4
4
|
metadata:
|
|
5
5
|
type: core
|
|
6
6
|
library: '@payfit/unity-icons'
|
|
@@ -8,7 +8,7 @@ metadata:
|
|
|
8
8
|
|
|
9
9
|
## Source of truth
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Read [src/agent-references/icons-catalog.json](../../src/agent-references/icons-catalog.json) first. It contains one entry per `baseName` and a `variants` list with the exact sprite names. Do not use the Storybook MCP projection for discovery when the JSON catalog is available.
|
|
12
12
|
|
|
13
13
|
For a targeted lookup, search the full JSON rather than reading an arbitrary slice:
|
|
14
14
|
|
|
@@ -32,4 +32,24 @@ import { Icon } from '@payfit/unity-components'
|
|
|
32
32
|
|
|
33
33
|
Do not guess lowercase or kebab-case names, and do not cast arbitrary strings to `UnityIcon`; both bypass the typed sprite-id guard and can render an empty SVG.
|
|
34
34
|
|
|
35
|
+
When an icon name crosses a component boundary, type it as `UnityIcon` rather
|
|
36
|
+
than widening it to `string`:
|
|
37
|
+
|
|
38
|
+
```tsx
|
|
39
|
+
import type { UnityIcon } from '@payfit/unity-icons'
|
|
40
|
+
|
|
41
|
+
type Props = { icon: UnityIcon }
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Migrate from Midnight
|
|
45
|
+
|
|
46
|
+
Map both `Icon` and `v2/Icon` to the Unity `Icon` component. Treat the old
|
|
47
|
+
name as search input, not as a guaranteed Unity sprite id: search the catalog,
|
|
48
|
+
select the closest semantic match, and preserve the exact PascalCase
|
|
49
|
+
`Filled`/`Outlined` variant. Never retain a Midnight string through an
|
|
50
|
+
`as UnityIcon` cast.
|
|
51
|
+
|
|
52
|
+
Use `unity-migrate-from-midnight` for the surrounding screen migration and
|
|
53
|
+
return here whenever the target icon is unclear.
|
|
54
|
+
|
|
35
55
|
For broader browsing, use the [Unity icon catalog](https://unity-icons.payfit.io/?path=/docs/reference-find-my-icon--docs).
|