igniteui-angular 22.2.0-rc.0 → 22.2.0-rc.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/README.md +1 -1
- package/button-group/README.md +42 -9
- package/calendar/README.md +30 -20
- package/card/README.md +1 -1
- package/fesm2022/igniteui-angular-accordion.mjs +7 -7
- package/fesm2022/igniteui-angular-action-strip.mjs +11 -22
- package/fesm2022/igniteui-angular-action-strip.mjs.map +1 -1
- package/fesm2022/igniteui-angular-avatar.mjs +7 -7
- package/fesm2022/igniteui-angular-badge.mjs +7 -7
- package/fesm2022/igniteui-angular-banner.mjs +10 -10
- package/fesm2022/igniteui-angular-bottom-nav.mjs +22 -22
- package/fesm2022/igniteui-angular-button-group.mjs +32 -35
- package/fesm2022/igniteui-angular-button-group.mjs.map +1 -1
- package/fesm2022/igniteui-angular-calendar.mjs +132 -180
- package/fesm2022/igniteui-angular-calendar.mjs.map +1 -1
- package/fesm2022/igniteui-angular-card.mjs +47 -58
- package/fesm2022/igniteui-angular-card.mjs.map +1 -1
- package/fesm2022/igniteui-angular-carousel.mjs +22 -22
- package/fesm2022/igniteui-angular-chat-extras.mjs +6 -6
- package/fesm2022/igniteui-angular-chat.mjs +12 -12
- package/fesm2022/igniteui-angular-checkbox.mjs +7 -7
- package/fesm2022/igniteui-angular-chips.mjs +10 -10
- package/fesm2022/igniteui-angular-combo.mjs +69 -67
- package/fesm2022/igniteui-angular-combo.mjs.map +1 -1
- package/fesm2022/igniteui-angular-core.mjs +139 -92
- package/fesm2022/igniteui-angular-core.mjs.map +1 -1
- package/fesm2022/igniteui-angular-date-picker.mjs +53 -70
- package/fesm2022/igniteui-angular-date-picker.mjs.map +1 -1
- package/fesm2022/igniteui-angular-dialog.mjs +13 -13
- package/fesm2022/igniteui-angular-directives.mjs +194 -194
- package/fesm2022/igniteui-angular-drop-down.mjs +29 -29
- package/fesm2022/igniteui-angular-expansion-panel.mjs +28 -28
- package/fesm2022/igniteui-angular-grids-core.mjs +737 -661
- package/fesm2022/igniteui-angular-grids-core.mjs.map +1 -1
- package/fesm2022/igniteui-angular-grids-grid.mjs +49 -49
- package/fesm2022/igniteui-angular-grids-hierarchical-grid.mjs +37 -37
- package/fesm2022/igniteui-angular-grids-lite.mjs +25 -17
- package/fesm2022/igniteui-angular-grids-lite.mjs.map +1 -1
- package/fesm2022/igniteui-angular-grids-pivot-grid.mjs +80 -80
- package/fesm2022/igniteui-angular-grids-pivot-grid.mjs.map +1 -1
- package/fesm2022/igniteui-angular-grids-tree-grid.mjs +55 -55
- package/fesm2022/igniteui-angular-icon.mjs +10 -10
- package/fesm2022/igniteui-angular-input-group.mjs +59 -55
- package/fesm2022/igniteui-angular-input-group.mjs.map +1 -1
- package/fesm2022/igniteui-angular-list.mjs +40 -40
- package/fesm2022/igniteui-angular-navbar.mjs +13 -13
- package/fesm2022/igniteui-angular-navigation-drawer.mjs +43 -38
- package/fesm2022/igniteui-angular-navigation-drawer.mjs.map +1 -1
- package/fesm2022/igniteui-angular-paginator.mjs +19 -19
- package/fesm2022/igniteui-angular-progressbar.mjs +19 -19
- package/fesm2022/igniteui-angular-query-builder.mjs +22 -22
- package/fesm2022/igniteui-angular-radio.mjs +25 -21
- package/fesm2022/igniteui-angular-radio.mjs.map +1 -1
- package/fesm2022/igniteui-angular-select.mjs +29 -33
- package/fesm2022/igniteui-angular-select.mjs.map +1 -1
- package/fesm2022/igniteui-angular-simple-combo.mjs +9 -9
- package/fesm2022/igniteui-angular-simple-combo.mjs.map +1 -1
- package/fesm2022/igniteui-angular-slider.mjs +28 -28
- package/fesm2022/igniteui-angular-snackbar.mjs +7 -7
- package/fesm2022/igniteui-angular-splitter.mjs +13 -13
- package/fesm2022/igniteui-angular-stepper.mjs +34 -34
- package/fesm2022/igniteui-angular-switch.mjs +7 -7
- package/fesm2022/igniteui-angular-tabs.mjs +34 -34
- package/fesm2022/igniteui-angular-time-picker.mjs +26 -36
- package/fesm2022/igniteui-angular-time-picker.mjs.map +1 -1
- package/fesm2022/igniteui-angular-toast.mjs +7 -7
- package/fesm2022/igniteui-angular-tree.mjs +28 -28
- package/fesm2022/igniteui-angular-virtual-scroll.mjs +497 -145
- package/fesm2022/igniteui-angular-virtual-scroll.mjs.map +1 -1
- package/migrations/common/UpdateChanges.d.ts +56 -0
- package/migrations/common/UpdateChanges.js +366 -38
- package/migrations/common/UpdateChanges.spec.js +829 -0
- package/migrations/migration-collection.json +1 -1
- package/migrations/update-22_2_0/index.js +145 -0
- package/migrations/update-22_2_0/index.spec.js +206 -0
- package/navigation-drawer/README.md +1 -1
- package/package.json +3 -3
- package/schematics/tsconfig.tsbuildinfo +1 -1
- package/skills/igniteui-angular-components/SKILL.md +9 -5
- package/skills/igniteui-angular-components/references/form-controls.md +1 -1
- package/skills/igniteui-angular-components/references/mcp-setup.md +14 -2
- package/skills/igniteui-angular-figma-to-app/SKILL.md +112 -525
- package/skills/igniteui-angular-figma-to-app/references/asset-extraction.md +49 -75
- package/skills/igniteui-angular-figma-to-app/references/design-provenance.md +201 -0
- package/skills/igniteui-angular-figma-to-app/references/design-token-bridge.md +175 -52
- package/skills/igniteui-angular-figma-to-app/references/figma-component-map.md +153 -99
- package/skills/igniteui-angular-figma-to-app/references/figma-exploration.md +226 -0
- package/skills/igniteui-angular-figma-to-app/references/mcp-setup.md +71 -105
- package/skills/igniteui-angular-figma-to-app/references/project-setup.md +63 -0
- package/skills/igniteui-angular-figma-to-app/references/theme-generation.md +120 -0
- package/skills/igniteui-angular-figma-to-app/references/validation-patterns.md +48 -50
- package/skills/igniteui-angular-generate-from-image-design/SKILL.md +11 -7
- package/skills/igniteui-angular-grids/SKILL.md +7 -3
- package/skills/igniteui-angular-grids/references/editing.md +1 -2
- package/skills/igniteui-angular-grids/references/grid-migration.md +1 -1
- package/skills/igniteui-angular-theming/SKILL.md +9 -5
- package/skills/igniteui-angular-theming/references/mcp-setup.md +12 -2
- package/types/igniteui-angular-button-group.d.ts +49 -34
- package/types/igniteui-angular-calendar.d.ts +33 -50
- package/types/igniteui-angular-card.d.ts +12 -17
- package/types/igniteui-angular-combo.d.ts +6 -0
- package/types/igniteui-angular-core.d.ts +25 -8
- package/types/igniteui-angular-grids-core.d.ts +48 -4
- package/types/igniteui-angular-grids-lite.d.ts +5 -1
- package/types/igniteui-angular-grids-pivot-grid.d.ts +1 -1
- package/types/igniteui-angular-input-group.d.ts +17 -3
- package/types/igniteui-angular-navigation-drawer.d.ts +1 -0
- package/types/igniteui-angular-radio.d.ts +5 -0
- package/types/igniteui-angular-time-picker.d.ts +0 -1
- package/types/igniteui-angular-virtual-scroll.d.ts +41 -13
- package/virtual-scroll/README.md +32 -1
|
@@ -2,35 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
> **Part of the [`igniteui-angular-figma-to-app`](../SKILL.md) skill.**
|
|
4
4
|
>
|
|
5
|
-
> Use this file in Phase 1h to identify and extract image assets from Figma artboards
|
|
6
|
-
> before implementation. Read in full before calling any extraction tool.
|
|
5
|
+
> Use this file in Phase 1h to identify and extract image assets from Figma artboards before implementation. Read in full before calling any extraction tool.
|
|
7
6
|
>
|
|
8
|
-
> **Zero-placeholder policy:** every image asset visible in the Figma design must be
|
|
9
|
-
> extracted and committed to `src/assets/` before Phase 4 begins. Gradient placeholders
|
|
10
|
-
> and empty `<div>` boxes are not acceptable. If the highest-fidelity method is
|
|
11
|
-
> unavailable, use the next tier — but always extract something real.
|
|
7
|
+
> **Zero-placeholder policy:** every image asset visible in the Figma design must be extracted and committed to `src/assets/` before Phase 4 begins. Gradient placeholders and empty `<div>` boxes are not acceptable. If the highest-fidelity method is unavailable, use the next tier — but always extract something real.
|
|
12
8
|
|
|
13
9
|
---
|
|
14
10
|
|
|
15
11
|
## Step 0 — Acquire the Figma File Key (Required for REST API)
|
|
16
12
|
|
|
17
|
-
The Figma REST API requires a **file key** — the identifier embedded in every Figma
|
|
18
|
-
file URL. Without it, you can still extract assets using Tier 2 and Tier 3 methods
|
|
19
|
-
below, but the REST API (Tier 1) produces the highest quality output and should always
|
|
20
|
-
be the first attempt.
|
|
13
|
+
The Figma REST API requires a **file key** — the identifier embedded in every Figma file URL. Without it, you can still extract assets using Tier 2 and Tier 3 methods below, but the REST API (Tier 1) produces the highest quality output and should always be the first attempt.
|
|
21
14
|
|
|
22
|
-
**
|
|
15
|
+
**Reuse the file key from Phase 1** when you already have it (the remote Figma server always has one). Otherwise, ask the user for it at the start of Phase 1h:
|
|
23
16
|
|
|
24
|
-
> "To extract image assets at the highest quality, I need the Figma file key.
|
|
25
|
-
> In the Figma desktop app:
|
|
17
|
+
> "To extract image assets at the highest quality, I need the Figma file key. In the Figma desktop app:
|
|
26
18
|
>
|
|
27
19
|
> 1. Right-click the file tab at the top → **Copy link** (or go to **File → Share** and copy the URL)
|
|
28
20
|
> 2. The URL looks like: `https://www.figma.com/design/ABCDEF1234567890/My-File-Name`
|
|
29
21
|
> 3. The file key is the segment after `/design/`: **`ABCDEF1234567890`**
|
|
30
22
|
>
|
|
31
|
-
> Please share that key (or the full URL). If you cannot access it right now, I will
|
|
32
|
-
> proceed with the desktop-app extraction methods and note which assets need to be
|
|
33
|
-
> re-exported at higher quality."
|
|
23
|
+
> Please share that key (or the full URL). If you cannot access it right now, I will proceed with the desktop-app extraction methods and note which assets need to be re-exported at higher quality."
|
|
34
24
|
|
|
35
25
|
**Extracting the key from a URL (if the user pastes it):**
|
|
36
26
|
|
|
@@ -43,7 +33,7 @@ echo "https://www.figma.com/design/ABCDEF1234567890/My-App" \
|
|
|
43
33
|
export FILE_KEY="ABCDEF1234567890"
|
|
44
34
|
```
|
|
45
35
|
|
|
46
|
-
**
|
|
36
|
+
**A Figma personal access token** is needed for REST calls. The Figma MCP servers do not use one, so this is a separate token (see `mcp-setup.md § Personal access token`). Ask the user to export it in the agent's shell, and never write it into a project file:
|
|
47
37
|
|
|
48
38
|
```bash
|
|
49
39
|
export FIGMA_TOKEN="your-personal-access-token"
|
|
@@ -82,52 +72,48 @@ Scan the XML returned by `figma_get_metadata` for layer names matching:
|
|
|
82
72
|
|
|
83
73
|
> **Ignore these** — do NOT extract them as image assets:
|
|
84
74
|
>
|
|
85
|
-
> - Any layer whose name starts with `_Button`, `_Input`, `_Grid`, `_Card`, etc.
|
|
86
|
-
>
|
|
87
|
-
> - `igx-icon` glyph nodes (use `<igx-icon>` in Angular instead)
|
|
75
|
+
> - Any layer whose name starts with `_Button`, `_Input`, `_Grid`, `_Card`, etc. (Indigo.Design UI Kit component instances → implement as IgxXxx components), and any other layer that Table A maps to a component — `Button`, `Text field`, … from any kit
|
|
76
|
+
> - Icon glyphs available from a registerable package (Material Icons Extended, Material Symbols, Lucide, Fluent, …; see `figma-component-map.md § Icons from other kits`) — register them with `IgxIconService` and render `<igx-icon>` instead
|
|
88
77
|
> - Artboard/frame boundaries themselves
|
|
89
78
|
|
|
90
79
|
### Size heuristic
|
|
91
80
|
|
|
92
|
-
Large rectangles (width > 200px or height > 200px) at key layout positions (hero area,
|
|
93
|
-
sidebar background, card thumbnail slot) are almost always image fills.
|
|
81
|
+
Large rectangles (width > 200px or height > 200px) at key layout positions (hero area, sidebar background, card thumbnail slot) are almost always image fills.
|
|
94
82
|
|
|
95
83
|
Small nodes (< 48×48px) named with icon-like names are usually SVG icons.
|
|
96
84
|
|
|
97
85
|
### Confirm with design context
|
|
98
86
|
|
|
99
|
-
For ambiguous nodes, look at the `figma_get_design_context` output for the artboard.
|
|
100
|
-
Each image asset appears as either:
|
|
87
|
+
For ambiguous nodes, look at the `figma_get_design_context` output for the artboard. Each image asset appears as either:
|
|
101
88
|
|
|
102
|
-
- An `<img
|
|
89
|
+
- An `<img>` with an asset URL (`http://localhost:3845/assets/...` on desktop, an https URL on remote) — confirms it is a raster fill; note the node ID
|
|
103
90
|
- Inline SVG or an `<img>` with `.svg` extension — confirms it is a vector; note the node ID
|
|
104
91
|
|
|
105
|
-
Note all
|
|
106
|
-
extraction if the REST API is unavailable.
|
|
92
|
+
Note all asset URLs from the design context — these are needed for Tier 2 extraction if the REST API is unavailable.
|
|
107
93
|
|
|
108
94
|
---
|
|
109
95
|
|
|
110
96
|
## Step 2 — Extract at the Highest Available Fidelity
|
|
111
97
|
|
|
112
|
-
Use this **four-tier decision tree**. Start at Tier 1. Move to the next tier only if
|
|
113
|
-
the previous one is unavailable for this specific asset.
|
|
98
|
+
Use this **four-tier decision tree**. Start at Tier 1. Move to the next tier only if the previous one is unavailable for this specific asset.
|
|
114
99
|
|
|
115
100
|
```
|
|
116
|
-
Do you have the FILE_KEY?
|
|
101
|
+
Do you have BOTH the FILE_KEY and a FIGMA_TOKEN (REST API personal access token)?
|
|
117
102
|
├─ YES → Use Tier 1 (REST API). Always the best.
|
|
118
|
-
└─ NO → Did figma_get_design_context
|
|
119
|
-
|
|
120
|
-
|
|
103
|
+
└─ NO → Did figma_get_design_context return a download URL for this asset?
|
|
104
|
+
(desktop server: http://localhost:3845/assets/…; remote server: short-lived https URLs)
|
|
105
|
+
├─ YES → Use Tier 2 (download that URL to disk now).
|
|
106
|
+
└─ NO → Can you render the node on its own?
|
|
121
107
|
├─ YES → Use Tier 3 (figma_get_screenshot per node).
|
|
122
108
|
└─ NO → Use Tier 4 (CSS gradient/color placeholder as last resort,
|
|
123
109
|
with a TODO comment to replace later).
|
|
124
110
|
```
|
|
125
111
|
|
|
126
|
-
|
|
112
|
+
The remote server also offers `figma_download_assets` (up to 20 nodes per call, exports and original images). If it is in the tool list, use it for Tier 2 when there is no FIGMA_TOKEN.
|
|
127
113
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
> source files, run the Tier 1 REST API commands
|
|
114
|
+
**At the end of Phase 1h, if you used Tier 2 or Tier 3 for any asset:**
|
|
115
|
+
|
|
116
|
+
> Tell the user: "The following assets were extracted at reduced quality because the Figma REST API was not available (no file key or no personal access token): [list]. To replace them with the original source files, run the Tier 1 REST API commands once you have both."
|
|
131
117
|
|
|
132
118
|
---
|
|
133
119
|
|
|
@@ -137,9 +123,7 @@ Do you have the FILE_KEY?
|
|
|
137
123
|
|
|
138
124
|
#### Method A — Original Image Fills
|
|
139
125
|
|
|
140
|
-
Use this to download **photos, textures, and raster images** that were uploaded to
|
|
141
|
-
Figma (identified by `imageRef` in node fill data). Returns the original source file
|
|
142
|
-
at its native resolution — never a re-render.
|
|
126
|
+
Use this to download **photos, textures, and raster images** that were uploaded to Figma (identified by `imageRef` in node fill data). Returns the original source file at its native resolution — never a re-render.
|
|
143
127
|
|
|
144
128
|
```bash
|
|
145
129
|
# Step A.1 — Get all image fill URLs in the file
|
|
@@ -168,8 +152,7 @@ curl -sL "$IMAGE_URL" -o src/assets/images/hero-background.jpg
|
|
|
168
152
|
|
|
169
153
|
#### Method B — Node Export (SVG, PNG, JPG)
|
|
170
154
|
|
|
171
|
-
Use this to export **any node** as SVG, PNG, or JPG. Best for logos, custom icons,
|
|
172
|
-
vector illustrations, and raster compositions.
|
|
155
|
+
Use this to export **any node** as SVG, PNG, or JPG. Best for logos, custom icons, vector illustrations, and raster compositions.
|
|
173
156
|
|
|
174
157
|
```bash
|
|
175
158
|
mkdir -p src/assets/images src/assets/icons
|
|
@@ -215,46 +198,41 @@ done
|
|
|
215
198
|
|
|
216
199
|
---
|
|
217
200
|
|
|
218
|
-
### Tier 2 —
|
|
201
|
+
### Tier 2 — Design-Context Asset URLs
|
|
219
202
|
|
|
220
|
-
**Use when:**
|
|
221
|
-
localhost URLs (e.g. `http://localhost:3845/assets/abc123.png`).
|
|
203
|
+
**Use when:** Tier 1 is unavailable and `figma_get_design_context` returned download URLs. The desktop server returns localhost URLs (e.g. `http://localhost:3845/assets/abc123.png`); the remote server returns short-lived https URLs. The steps below are the same for both.
|
|
222
204
|
|
|
223
|
-
|
|
224
|
-
via `curl` during the active Figma session. They are **not** the original source file
|
|
225
|
-
(they are a renderer output), but they are substantially better than placeholders and
|
|
226
|
-
can be committed to the repository.
|
|
205
|
+
On the desktop server these URLs are served by the Figma desktop app's in-memory renderer and work only during the active Figma session. On the remote server they are https URLs that expire after a short time. Either way they are **not** the original source file (they are a renderer output), but they are substantially better than placeholders and can be committed to the repository.
|
|
227
206
|
|
|
228
207
|
```bash
|
|
229
208
|
mkdir -p src/assets/images src/assets/icons
|
|
230
209
|
|
|
231
|
-
#
|
|
232
|
-
#
|
|
210
|
+
# Download the asset URLs found in the figma_get_design_context output
|
|
211
|
+
# (desktop: localhost URLs as below; remote: the https URLs, downloaded the same way)
|
|
233
212
|
curl -sL "http://localhost:3845/assets/<hash>.png" -o src/assets/images/hero-background.png
|
|
234
213
|
curl -sL "http://localhost:3845/assets/<hash>.svg" -o src/assets/icons/logo.svg
|
|
235
214
|
```
|
|
236
215
|
|
|
237
|
-
**Finding
|
|
216
|
+
**Finding asset URLs in design context output** (desktop examples; remote URLs are https):
|
|
238
217
|
|
|
239
218
|
In the React+Tailwind code returned by `figma_get_design_context`, look for:
|
|
240
219
|
|
|
241
220
|
- `const imgXxx = "http://localhost:3845/assets/<hash>.<ext>";` at the top of the output
|
|
242
221
|
- `<img src={imgXxx} />` or `background-image` references inline
|
|
243
222
|
|
|
244
|
-
Each `const` at the top is an image asset. Note its variable name, the URL, and which
|
|
245
|
-
Figma node it belongs to (from context around the `<img>` tag).
|
|
223
|
+
Each `const` at the top is an image asset. Note its variable name, the URL, and which Figma node it belongs to (from context around the `<img>` tag).
|
|
246
224
|
|
|
247
225
|
**Limitations of Tier 2 assets:**
|
|
248
226
|
|
|
249
|
-
-
|
|
227
|
+
- Usually raster renders. When the context offers an SVG URL for a vector, download it as SVG
|
|
250
228
|
- Renderer resolution (typically 2×) — adequate for most uses
|
|
251
|
-
-
|
|
229
|
+
- Short-lived — desktop URLs die when the Figma desktop app closes, remote URLs expire after a while. **Download them immediately**
|
|
252
230
|
- Must be renamed from `<hash>.png` to descriptive names before committing
|
|
253
231
|
|
|
254
232
|
**Commit as-is** — they are real assets. Add a comment in the asset manifest:
|
|
255
233
|
|
|
256
234
|
```typescript
|
|
257
|
-
// TODO: Replace with Tier 1 REST API export once FILE_KEY
|
|
235
|
+
// TODO: Replace with Tier 1 REST API export once FILE_KEY and FIGMA_TOKEN are available
|
|
258
236
|
heroBg: 'assets/images/hero-background.png', // extracted from Figma session
|
|
259
237
|
```
|
|
260
238
|
|
|
@@ -262,16 +240,17 @@ heroBg: 'assets/images/hero-background.png', // extracted from Figma session
|
|
|
262
240
|
|
|
263
241
|
### Tier 3 — `figma_get_screenshot` per Node
|
|
264
242
|
|
|
265
|
-
**Use when:**
|
|
243
|
+
**Use when:** neither Tier 1 nor Tier 2 produced the asset.
|
|
266
244
|
|
|
267
|
-
`figma_get_screenshot` renders
|
|
268
|
-
Ask the user to select each image node in Figma, then call the tool.
|
|
245
|
+
`figma_get_screenshot` renders a single node. Address the node the same way as in Phase 1 (`figma-exploration.md § Before the First Call`):
|
|
269
246
|
|
|
270
247
|
```
|
|
271
|
-
//
|
|
272
|
-
|
|
248
|
+
// Remote server
|
|
249
|
+
figma_get_screenshot({ fileKey: "<fileKey>", nodeId: "<imageNodeId>" })
|
|
250
|
+
// Desktop server: the node ID (check the image), or ask the user to select the layer
|
|
251
|
+
figma_get_screenshot({ nodeId: "<imageNodeId>" })
|
|
273
252
|
figma_get_screenshot({})
|
|
274
|
-
//
|
|
253
|
+
// The returned image is a screen-capture PNG. Save it to src/assets/images/.
|
|
275
254
|
```
|
|
276
255
|
|
|
277
256
|
**Limitations:**
|
|
@@ -291,20 +270,17 @@ heroBg: 'assets/images/hero-background.png',
|
|
|
291
270
|
|
|
292
271
|
### Tier 4 — CSS Fallback (Last Resort Only)
|
|
293
272
|
|
|
294
|
-
**Use only when** an asset is confirmed to be a pure color fill or a gradient — not when
|
|
295
|
-
an image exists in Figma but extraction failed. Never use Tier 4 because extraction
|
|
296
|
-
feels difficult.
|
|
273
|
+
**Use only when** an asset is confirmed to be a pure color fill or a gradient — not when an image exists in Figma but extraction failed. Never use Tier 4 because extraction feels difficult.
|
|
297
274
|
|
|
298
275
|
```scss
|
|
299
276
|
// Only acceptable when the Figma layer is genuinely a gradient, not a photo
|
|
300
277
|
.hero-banner {
|
|
301
|
-
// TODO: Replace with real asset — extraction blocked (no
|
|
278
|
+
// TODO: Replace with real asset — extraction blocked (no REST token and no design-context asset URL)
|
|
302
279
|
background: linear-gradient(135deg, #0d1b3e 0%, #1a0533 100%);
|
|
303
280
|
}
|
|
304
281
|
```
|
|
305
282
|
|
|
306
|
-
If you use Tier 4, add the `TODO` comment and include it in the post-session handoff
|
|
307
|
-
notes to the user.
|
|
283
|
+
If you use Tier 4, add the `TODO` comment and include it in the post-session handoff notes to the user.
|
|
308
284
|
|
|
309
285
|
---
|
|
310
286
|
|
|
@@ -325,7 +301,7 @@ export const PAGE_ASSETS = {
|
|
|
325
301
|
logo: 'assets/icons/logo.svg',
|
|
326
302
|
|
|
327
303
|
// Figma node 345:678 — "Card/Thumbnail" layer
|
|
328
|
-
// Tier 2:
|
|
304
|
+
// Tier 2: design-context asset URL (TODO: re-export via REST API)
|
|
329
305
|
cardThumbnail: 'assets/images/card-thumbnail.png',
|
|
330
306
|
} as const;
|
|
331
307
|
```
|
|
@@ -343,8 +319,7 @@ Name files by layer purpose, not by node ID.
|
|
|
343
319
|
<img ngSrc="assets/images/hero-background.jpg" width="1440" height="600" alt="Dashboard hero background" priority />
|
|
344
320
|
```
|
|
345
321
|
|
|
346
|
-
Import `NgOptimizedImage` in the component's `imports` array. Note: `NgOptimizedImage`
|
|
347
|
-
does **not** work for inline base64 images.
|
|
322
|
+
Import `NgOptimizedImage` in the component's `imports` array. Note: `NgOptimizedImage` does **not** work for inline base64 images.
|
|
348
323
|
|
|
349
324
|
### Background images via SCSS
|
|
350
325
|
|
|
@@ -364,8 +339,7 @@ does **not** work for inline base64 images.
|
|
|
364
339
|
|
|
365
340
|
### Igx-icon for kit icons (do NOT extract as assets)
|
|
366
341
|
|
|
367
|
-
Standard Material icons and `imx-icons` (Material Icons Extended) are registered at
|
|
368
|
-
runtime — never extract them as image files:
|
|
342
|
+
Standard Material icons and `imx-icons` (Material Icons Extended) are registered at runtime — never extract them as image files:
|
|
369
343
|
|
|
370
344
|
```html
|
|
371
345
|
<igx-icon>settings</igx-icon> <igx-icon family="imx-icons" name="credit-cards"></igx-icon>
|
|
@@ -381,7 +355,7 @@ See `figma-component-map.md § Material Icons Extended` for setup.
|
|
|
381
355
|
| ------------------------------------------------------------ | ---------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
|
382
356
|
| Skipping asset extraction entirely (gradient placeholders) | Implementation looks nothing like the design; Phase 5 fails | Always use at least Tier 2 or Tier 3 — never skip |
|
|
383
357
|
| Not asking for the file key before starting extraction | Defaults to Tier 2/3 when Tier 1 was actually possible | Ask for the file key at the start of Phase 1h (see Step 0) |
|
|
384
|
-
| Using
|
|
358
|
+
| Using design-context asset URLs without downloading them in the session | The URLs are short-lived; assets become broken | Download with `curl` immediately; commit the files |
|
|
385
359
|
| Naming assets by node ID ("node-123-456.png") | Unmaintainable; breaks if Figma is reorganized | Name by layer purpose: `hero-background.jpg`, `company-logo.svg` |
|
|
386
360
|
| Using `figma_get_screenshot` for SVG logos | Logo is rasterized to PNG; loses vector scalability | Use Tier 1 Method B with `format=svg` instead; fall back to Tier 2 only if unavailable |
|
|
387
361
|
| Exporting PNG at `scale=1` | Blurry on HiDPI/retina screens | Always use `scale=2` |
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# Design Provenance — Recognizing Components From Any UI Kit
|
|
2
|
+
|
|
3
|
+
> **Part of the [`igniteui-angular-figma-to-app`](../SKILL.md) skill.**
|
|
4
|
+
>
|
|
5
|
+
> Use this file in Phase 1f to decide **where every component in the design came from** and to normalize it into a **canonical role** that [figma-component-map.md](figma-component-map.md) resolves to an Ignite UI Angular selector. Read it in full before building the Phase 1g decomposition table.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Why This Step Exists
|
|
10
|
+
|
|
11
|
+
Designers build Figma screens from many sources: the Infragistics **Indigo.Design UI Kits**, public kits (Material 3 Design Kit, Fluent 2, Bootstrap, shadcn/ui, Untitled UI, Ant Design, iOS/Apple kits), an in-house design system, or plain frames with no components at all. The Ignite UI kits map to Ignite UI one-to-one by layer name. Other kits do not, but they describe the same **roles** (a high-emphasis button, an outlined text field, a tab strip), using different names and variant properties.
|
|
12
|
+
|
|
13
|
+
Translating any kit directly into Ignite UI tags would need one mapping table per kit. Instead, this skill uses two steps: **kit → canonical role** (a small vocabulary, normalized here) and **canonical role → Ignite UI** (one table, in `figma-component-map.md`). A kit you have never seen still works if its variant names can be normalized.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Step 1 — Collect the Evidence for Each Instance
|
|
18
|
+
|
|
19
|
+
For every component-like layer in the target artboard, gather what the design data exposes. Use the cheapest source first.
|
|
20
|
+
|
|
21
|
+
| Evidence | Where it comes from | Strength |
|
|
22
|
+
| --- | --- | --- |
|
|
23
|
+
| **Layer / main-component name** | `data-name` in `figma_get_design_context`; instance names in `figma_get_metadata` XML | Medium. Designers rename layers, and detached instances keep the old name. |
|
|
24
|
+
| **Variant properties** (`Variant=Primary`, `Size=md`, `State=Hover`) | The design-context code (component props), or the REST API (below) | Strong. This is the kit's own statement of role and variant. |
|
|
25
|
+
| **Component description** | REST `components` map, or design-context annotations | Strong when present. Kits often document intent here. |
|
|
26
|
+
| **Code Connect mapping** | `figma_get_code_connect_map` | Strong for **role**, but it may point at a *different* library. See the caveat below. |
|
|
27
|
+
| **Library / source file name** | `figma_get_libraries` (the libraries the file subscribes to: name, key, description) and `figma_search_design_system` (returns `libraryName` for a component name). Check the connected server's tool list, because availability varies by Figma MCP version. | Strong for kit identity. Call `get_libraries` **once per file**: it names the kits in play before you look at a single instance. |
|
|
28
|
+
| **Structure + visuals** | Auto-layout, children, fills, size, the screenshot | Weak alone. It is the only evidence for un-componentized frames. |
|
|
29
|
+
|
|
30
|
+
**Reading exact variant properties via the REST API** (use when names are ambiguous and `FIGMA_TOKEN` + `FILE_KEY` are available. This is the REST API token from `mcp-setup.md § Personal access token`, not an MCP credential):
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
curl -s -H "X-Figma-Token: $FIGMA_TOKEN" \
|
|
34
|
+
"https://api.figma.com/v1/files/$FILE_KEY/nodes?ids=$ARTBOARD_ID" -o /tmp/figma_nodes.json
|
|
35
|
+
|
|
36
|
+
# Every instance with its variant properties
|
|
37
|
+
jq '[.. | objects | select(.type? == "INSTANCE")
|
|
38
|
+
| {id, name, componentId, props: (.componentProperties // {} | with_entries(.value |= .value))}]' \
|
|
39
|
+
/tmp/figma_nodes.json
|
|
40
|
+
|
|
41
|
+
# Main-component and component-set names/descriptions (remote == came from a library)
|
|
42
|
+
jq '.nodes[].components, .nodes[].componentSets' /tmp/figma_nodes.json
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**Design-context quirks that matter here:**
|
|
46
|
+
|
|
47
|
+
- `data-name` preserves the main-component name, for example `.Status badge`. Components can also appear as local functions with typed props (`Button({ variant = "outline" })`), which carry the variant values.
|
|
48
|
+
- Nodes inside an instance have IDs like `I9:12;6:3`. Treat those as parts of the parent component, not as components of their own.
|
|
49
|
+
- If the response is flagged **sparse** (large frames), fetch the visible child nodes in one parallel batch instead of guessing from the partial output.
|
|
50
|
+
- When Code Connect maps components to a non-Ignite library, pass `disableCodeConnect: true` (where the server supports it) to keep the reference output free of foreign imports. Read the mapping separately with `figma_get_code_connect_map`.
|
|
51
|
+
|
|
52
|
+
`remote: true` on a component means it came from a published library. `componentSetId` groups the variants of one component. Use the **component-set name** as the main-component name, because instance layer names are often edited.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Step 2 — Classify Provenance (Per Instance)
|
|
57
|
+
|
|
58
|
+
Classify **per instance**, not per file. Real files mix sources: an Ignite UI kit navbar next to a hand-drawn KPI tile and a third-party date picker.
|
|
59
|
+
|
|
60
|
+
| Tier | What it is | Recognized by | Resolution path |
|
|
61
|
+
| --- | --- | --- | --- |
|
|
62
|
+
| **A — Ignite UI kit** | Instance of an Indigo.Design UI Kit component | Leading-underscore names (`_Button/Contained`, `_Input/Border`), `Indigo.Design` library names, hidden `size-[0.5px]` variant-indicator nodes, the kit variable collections | Direct lookup in `figma-component-map.md` by kit name. Highest confidence. |
|
|
63
|
+
| **B — Other component library** | Instance of any other published or local component (public kit or in-house) | A main component / component set with variant properties, without Tier A fingerprints | **Normalize** (Step 3) to a canonical role, then look it up in the canonical role index of `figma-component-map.md`. |
|
|
64
|
+
| **C — Un-componentized** | Plain frames, groups, or detached instances | No main component. Type is `FRAME` / `GROUP`, or a detached copy that still carries a component-like name | **Infer** the role from structure and visuals (Step 4). Lowest confidence. Confirm with the user. |
|
|
65
|
+
|
|
66
|
+
Record the tier and a confidence (**high / medium / low**) in the Phase 1g Table A.
|
|
67
|
+
|
|
68
|
+
### Recognizing common public kits (confirmation only)
|
|
69
|
+
|
|
70
|
+
These fingerprints help name the kit in the plan and choose the theme baseline (Phase 3b). Normalization does **not** depend on them. Kit files change between versions, so treat every row as a hint, not a rule.
|
|
71
|
+
|
|
72
|
+
| Kit | Typical fingerprints | Default icon set |
|
|
73
|
+
| --- | --- | --- |
|
|
74
|
+
| Material 3 Design Kit (Google) | Variables/styles under `M3/…` or `md.sys.…` / `md.ref.…`; tonal roles (`primary`, `on-primary`, `primary-container`, `surface-container-*`); button styles *Filled / Tonal / Outlined / Text / Elevated*; text fields *Filled / Outlined* | Material Symbols |
|
|
75
|
+
| Fluent 2 (Microsoft) | Token names like `colorBrandBackground`, `colorNeutralForeground1`, `borderRadiusMedium`; button appearance *Primary / Secondary / Outline / Subtle / Transparent* | Fluent System Icons |
|
|
76
|
+
| Bootstrap kits | Variant names `primary / secondary / success / danger / warning / info / light / dark`; `btn-outline-*`; `form-control` / `form-select` | Bootstrap Icons |
|
|
77
|
+
| shadcn/ui kits | Semantic variables `background`, `foreground`, `primary`, `primary-foreground`, `muted`, `accent`, `border`, `input`, `ring`, `radius`; button variants *default / secondary / outline / ghost / link / destructive* | Lucide |
|
|
78
|
+
| Untitled UI | `Colors/Brand/600`, `Colors/Gray (light mode)/…`, `bg-primary`, `text-secondary`; button hierarchy *Primary / Secondary / Tertiary / Link* (+ *color / gray*) | Untitled UI Icons (paid Pro tier; check the license) |
|
|
79
|
+
| Ant Design kits | Button type *Primary / Default / Dashed / Text / Link*; `colorPrimary`, `colorBgContainer` tokens | Ant Design Icons |
|
|
80
|
+
| iOS / Apple kits | SF Pro type, *Filled / Tinted / Gray / Plain* buttons, grouped inset lists, tab bars at the bottom | SF Symbols (not licensed for web; substitute) |
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Step 3 — Normalize Tier B Instances Into Canonical Roles
|
|
85
|
+
|
|
86
|
+
Normalize **role**, **emphasis**, **style**, **size**, and **state** separately. Match property values case-insensitively and by meaning, not exact spelling.
|
|
87
|
+
|
|
88
|
+
### Role (from the component or component-set name)
|
|
89
|
+
|
|
90
|
+
Strip prefixes, sigils, status emoji, numbering, and platform tags (`.Button`, `Button / Base`, `❖ Button`, `✅ Button`, `[Web] Button`, `Buttons`). A leading `.` usually marks a private or base component. A leading `_` with a `/` path (`_Button/Contained`) is the Tier A Indigo.Design fingerprint. Classify it before stripping anything. Ignore the order of variant axes: `Button (M, Accent)` is the same as `Button (Accent, M)`. Then match against the canonical roles in `figma-component-map.md § Canonical Role Index`. Common synonyms:
|
|
91
|
+
|
|
92
|
+
| Canonical role | Also called |
|
|
93
|
+
| --- | --- |
|
|
94
|
+
| `button` | Btn, CTA, Action |
|
|
95
|
+
| `icon-button` | Button with `Icon only=true`, Icon Btn, Square button |
|
|
96
|
+
| `fab` | Floating action button, Extended FAB |
|
|
97
|
+
| `toggle-group` | Segmented button, Segmented control, Button group (selectable), Radio buttons (button style) |
|
|
98
|
+
| `text-field` | Input, Text input, Field, Form control, Textbox |
|
|
99
|
+
| `textarea` | Text area, Multiline input |
|
|
100
|
+
| `select` | Dropdown (as a form field), Picker, Listbox trigger |
|
|
101
|
+
| `combobox` | Autocomplete, Searchable select, Typeahead, Multi-select, Tag input |
|
|
102
|
+
| `menu` | Dropdown menu, Context menu, Overflow menu, Action sheet (desktop) |
|
|
103
|
+
| `app-bar` | Navbar, Top bar, Header, Toolbar (page-level) |
|
|
104
|
+
| `side-nav` | Sidebar, Drawer, Navigation rail, Rail |
|
|
105
|
+
| `tabs` | Tab bar, Tab list, Segmented tabs |
|
|
106
|
+
| `breadcrumbs` | Breadcrumb, Path |
|
|
107
|
+
| `dialog` | Modal, Alert dialog |
|
|
108
|
+
| `sheet` | Side sheet, Drawer (overlay), Bottom sheet |
|
|
109
|
+
| `toast` | Snackbar, Notification, Sonner |
|
|
110
|
+
| `inline-alert` | Alert, Banner, Callout, Message bar |
|
|
111
|
+
| `tag` | Badge (text pill), Label, Pill, Status |
|
|
112
|
+
| `count-badge` | Badge (dot or number on another element), Indicator |
|
|
113
|
+
| `chip` | Filter chip, Input chip, Assist chip, Removable tag |
|
|
114
|
+
| `data-table` | Table, Data grid, Grid |
|
|
115
|
+
| `list` | List, List group, Menu list (non-overlay) |
|
|
116
|
+
| `progress-linear` / `progress-circular` | Progress bar, Loader / Spinner (determinate or not) |
|
|
117
|
+
|
|
118
|
+
### Emphasis (buttons, icon buttons, links)
|
|
119
|
+
|
|
120
|
+
| Normalized | Kit values that mean it |
|
|
121
|
+
| --- | --- |
|
|
122
|
+
| **high** | Primary, Filled, Solid, Contained, Default (shadcn), Brand, Accent, Hierarchy=Primary |
|
|
123
|
+
| **medium** | Secondary, Tonal, Soft, Outline(d), Stroke, Bordered, Default (Ant/Fluent), Gray |
|
|
124
|
+
| **low** | Tertiary, Ghost, Subtle, Text, Plain, Transparent, Flat, Borderless |
|
|
125
|
+
| **link** | Link, Hyperlink, Link color / Link gray |
|
|
126
|
+
| **elevated** | Elevated, Raised |
|
|
127
|
+
| **danger** (modifier) | Destructive, Danger, Error, Critical |
|
|
128
|
+
|
|
129
|
+
"Secondary" means *outlined* in some kits and *a filled button in the secondary color* in others. Read the visuals of that instance (fill vs stroke) before choosing.
|
|
130
|
+
|
|
131
|
+
### Style (form fields)
|
|
132
|
+
|
|
133
|
+
| Normalized | Kit values / visuals |
|
|
134
|
+
| --- | --- |
|
|
135
|
+
| **outlined** | Outlined, Bordered, Border, Default with a full 1px stroke |
|
|
136
|
+
| **filled** | Filled, Box, Solid, Flushed-with-background, Tonal |
|
|
137
|
+
| **underlined** | Line, Underline, Flushed, Standard |
|
|
138
|
+
| **label-floating** | Label inside the field that moves to the top edge |
|
|
139
|
+
| **label-above** | Label as separate text above the field |
|
|
140
|
+
|
|
141
|
+
### Size and state
|
|
142
|
+
|
|
143
|
+
- **Size:** record the measured control **height** in px (from the design context), not the kit's size name. Kits disagree on what `md` means. Phase 3d turns heights into `--ig-size`.
|
|
144
|
+
- **State:** `Hover`, `Focused`, `Pressed`, `Disabled`, `Error`, `Selected` variants are **states**, not different components. Implement the default state, and use state values only as token inputs (hover color, focus ring) in Phase 3d. A screen showing a `State=Error` field means the design wants validation styling. It does not mean the field is permanently invalid.
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Step 4 — Infer Tier C (Un-componentized) Layers
|
|
149
|
+
|
|
150
|
+
Use the exact values from the design context and the screenshot together:
|
|
151
|
+
|
|
152
|
+
| Structure observed | Likely role |
|
|
153
|
+
| --- | --- |
|
|
154
|
+
| Auto-layout row, 28–56px tall, one short text (± icon), solid fill or 1px stroke, radius | `button` (emphasis from fill vs stroke vs none) |
|
|
155
|
+
| Square 24–48px frame with only an icon | `icon-button` |
|
|
156
|
+
| 32–56px frame with a stroke or bottom border, placeholder-grey text, optional chevron/icon | `text-field` (chevron → `select`) |
|
|
157
|
+
| Repeated equal-height rows with leading icon/avatar + 1–2 text lines + trailing element | `list` |
|
|
158
|
+
| Header row of labels over repeated rows aligned in columns | `data-table` |
|
|
159
|
+
| Horizontal labels with one underlined or pill-highlighted item | `tabs` |
|
|
160
|
+
| Small rounded pill with short text | `tag` or `chip` (`chip` when it has a close or select affordance) |
|
|
161
|
+
| Circle 24–64px with an image or initials | `avatar` |
|
|
162
|
+
|
|
163
|
+
Rules for Tier C:
|
|
164
|
+
|
|
165
|
+
- **Confidence is low by default.** List Tier C mappings separately in the Phase 1g review so the user can correct them.
|
|
166
|
+
- **Purely decorative or bespoke layouts** (hero sections, marketing tiles, KPI cards) stay plain semantic HTML plus CSS. Do not force them into a component because a name suggests one.
|
|
167
|
+
- **Interactive controls stay components.** If a Tier C frame is clearly an input, select, date field, table, or tab strip, use the Ignite UI component even when its anatomy differs. The component brings keyboard, focus, ARIA, and form behavior that a custom frame lacks.
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Code Connect Caveat
|
|
172
|
+
|
|
173
|
+
`figma_get_code_connect_map` may return mappings to **another** library, for example a shadcn kit connected to `@/components/ui/button`, or an in-house kit connected to the company's React package. Use these mappings as **strong evidence of the role and props** (a Code Connect snippet `<Button variant="outline" size="sm">` confirms *button / medium emphasis / small*). **Never** copy their imports, tags, or props into the implementation. The target is always Ignite UI.
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## False Friends — Same Name, Different Ignite UI Component
|
|
178
|
+
|
|
179
|
+
| Name in the kit | Usually means | Ignite UI Angular choice |
|
|
180
|
+
| --- | --- | --- |
|
|
181
|
+
| **Badge** (shadcn, Untitled UI, Bootstrap) | A text pill / status label | `igx-badge` with `[value]` for short status; `igx-chip` when removable or selectable |
|
|
182
|
+
| **Badge** (Material, Fluent) | Dot or count on another element | `igx-badge` positioned over the host |
|
|
183
|
+
| **Dropdown** | A form field in some kits, a menu in others | `igx-select` (field) vs `igx-drop-down` + `igxToggleAction` (menu) |
|
|
184
|
+
| **Select** with search (shadcn Combobox, Ant Select `showSearch`) | Filterable single select | `igx-simple-combo` |
|
|
185
|
+
| **Autocomplete** / free-text typeahead | Suggestions under a text input | `igxAutocomplete` on an `igx-input-group` input + `igx-drop-down` |
|
|
186
|
+
| **Tabs** styled as a pill track (shadcn, Fluent "segmented") | Either view switching or a value toggle | `igx-tabs` if it switches panels; `igx-buttongroup` if it sets a value |
|
|
187
|
+
| **Sheet** / **Drawer** (overlay) | Temporary side panel | `igx-nav-drawer` for navigation. There is no dedicated sheet component: for content panels use `igx-dialog` or custom markup, and record it as an anatomy delta |
|
|
188
|
+
| **Alert** | Inline message (not modal) | `igx-banner`, or semantic HTML for static callouts |
|
|
189
|
+
| **Toast** vs **Snackbar** | Transient message | `igx-toast` (text only) or `igx-snackbar` (with action) |
|
|
190
|
+
| **Card** with complex internal layout | A surface container | `igx-card` only if header/content/actions anatomy fits; otherwise a Table B surface |
|
|
191
|
+
| **Navigation rail** | Icon-only side nav | Pinned `igx-nav-drawer` with an `igxDrawerMini` template, kept **closed**. The mini template renders only while the drawer is closed |
|
|
192
|
+
| **Tab bar** at the bottom (iOS, M3 navigation bar) | App-level navigation | `igx-bottom-nav` |
|
|
193
|
+
| **Breadcrumb** | Navigation trail | No Angular breadcrumb component. Use semantic `<nav><ol>` markup with router links |
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Output of This Step
|
|
198
|
+
|
|
199
|
+
Fill the **Tier**, **Kit / Source**, **Canonical Role + Props**, **Confidence**, **Token Work**, and **Suspected Anatomy Deltas** columns of the Phase 1g **Table A**. The table and its column rules are defined once, in `figma-exploration.md § 1g`.
|
|
200
|
+
|
|
201
|
+
Only the **Suspected Anatomy Deltas** column feeds the Phase 2d delta ledger. Token Work is never a delta.
|