igniteui-cli 15.2.2 → 15.3.0
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/lib/commands/build.js +7 -12
- package/package.json +4 -4
- package/templates/blazor/igb/projects/ai-config/files/skills/AGENTS.md +0 -5
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/SKILL.md +2 -0
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/charts.md +7 -35
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/data-display.md +0 -54
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/feedback.md +0 -38
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/form-controls.md +0 -68
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/layout-manager.md +1 -124
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-components/references/layout.md +0 -62
- package/templates/blazor/igb/projects/ai-config/files/skills/igniteui-blazor-theming/SKILL.md +1 -1
- package/templates/react/igr-ts/projects/_base/files/package.json +1 -0
- package/templates/react/igr-ts/projects/_base/files/src/app/app.tsx +4 -2
- package/templates/react/igr-ts/projects/_base/files/src/setupTests.ts +12 -0
- package/templates/react/igr-ts/projects/_base/files/styles.css +6 -0
- package/templates/react/igr-ts/projects/_base_with_home/files/index.html +2 -1
- package/templates/react/igr-ts/projects/_base_with_home/files/src/app/home/home.tsx +60 -10
- package/templates/react/igr-ts/projects/_base_with_home/files/src/app/home/style.module.css +79 -20
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/SKILL.md +0 -8
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/CHARTS-GRIDS.md +6 -36
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/COMPONENT-CATALOGUE.md +8 -142
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-components/reference/EVENT-HANDLING.md +2 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/SKILL.md +7 -14
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/reference/CSS-THEMING.md +2 -0
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-customize-theme/reference/MCP-SERVER.md +0 -8
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/SKILL.md +2 -2
- package/templates/react/igr-ts/projects/ai-config/files/skills/igniteui-react-generate-from-image-design/reference/component-mapping.md +60 -74
- package/templates/react/igr-ts/projects/empty/index.js +2 -2
- package/templates/react/igr-ts/projects/side-nav/files/src/app/app-routes.tsx +5 -0
- package/templates/react/igr-ts/projects/side-nav/files/src/app/app.css +82 -0
- package/templates/react/igr-ts/projects/side-nav/files/src/app/app.tsx +104 -0
- package/templates/react/igr-ts/projects/side-nav/files/src/app/home/home.tsx +69 -0
- package/templates/react/igr-ts/projects/side-nav/files/src/app/home/style.module.css +105 -0
- package/templates/react/igr-ts/projects/{top-nav → side-nav}/index.d.ts +2 -2
- package/templates/react/igr-ts/projects/{top-nav → side-nav}/index.js +7 -7
- package/templates/react/igr-ts/projects/side-nav-auth/files/index.html +19 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/app-routes.tsx +24 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/app.css +84 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/app.tsx +124 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/AuthContext.tsx +73 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/AuthGuard.tsx +14 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Login.module.css +93 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Login.tsx +69 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/LoginBar.module.css +42 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/LoginBar.tsx +44 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/LoginDialog.module.css +14 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/LoginDialog.tsx +49 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Register.module.css +74 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/components/Register.tsx +67 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/models/external-login.ts +10 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/models/login.ts +4 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/models/register-info.ts +6 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/models/user.ts +19 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/Profile.module.css +87 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/Profile.tsx +42 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/RedirectFacebook.tsx +44 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/RedirectGoogle.tsx +40 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/pages/RedirectMicrosoft.tsx +40 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/services/authentication.ts +37 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/services/external-auth-config.ts +44 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/services/externalAuth.ts +272 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/services/fakeBackend.ts +88 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/services/jwtUtil.ts +10 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/services/pkce.ts +29 -0
- package/templates/react/igr-ts/projects/side-nav-auth/files/src/app/authentication/services/userStore.ts +39 -0
- package/templates/react/igr-ts/projects/side-nav-auth/index.d.ts +15 -0
- package/templates/react/igr-ts/projects/side-nav-auth/index.js +46 -0
- package/templates/react/igr-ts/projects/side-nav-mini/files/src/app/app-routes.tsx +5 -0
- package/templates/react/igr-ts/projects/side-nav-mini/files/src/app/app.css +109 -0
- package/templates/react/igr-ts/projects/side-nav-mini/files/src/app/app.test.tsx +20 -0
- package/templates/react/igr-ts/projects/side-nav-mini/files/src/app/app.tsx +81 -0
- package/templates/react/igr-ts/projects/side-nav-mini/files/src/app/home/home.tsx +69 -0
- package/templates/react/igr-ts/projects/side-nav-mini/files/src/app/home/style.module.css +105 -0
- package/templates/react/igr-ts/projects/side-nav-mini/index.d.ts +15 -0
- package/templates/react/igr-ts/projects/side-nav-mini/index.js +46 -0
- package/templates/react/igr-ts/projects/side-nav-mini-auth/files/src/app/app.css +106 -0
- package/templates/react/igr-ts/projects/side-nav-mini-auth/files/src/app/app.tsx +101 -0
- package/templates/react/igr-ts/projects/side-nav-mini-auth/index.d.ts +15 -0
- package/templates/react/igr-ts/projects/side-nav-mini-auth/index.js +50 -0
- package/templates/webcomponents/igc-ts/projects/_base/files/src/app/app.ts +6 -1
- package/templates/webcomponents/igc-ts/projects/_base/files/styles.css +1 -0
- package/templates/webcomponents/igc-ts/projects/_base_with_home/files/index.html +2 -0
- package/templates/webcomponents/igc-ts/projects/_base_with_home/files/src/app/home/home.ts +103 -9
- package/templates/webcomponents/igc-ts/projects/_base_with_home/files/src/assets/wc.png +0 -0
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-choose-components/SKILL.md +122 -160
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-customize-component-theme/SKILL.md +83 -311
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-customize-component-theme/references/mcp-setup.md +69 -0
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-generate-from-image-design/SKILL.md +4 -1
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-generate-from-image-design/references/component-mapping.md +60 -61
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-generate-from-image-design/references/gotchas.md +15 -11
- package/templates/webcomponents/igc-ts/projects/ai-config/files/skills/igniteui-wc-optimize-bundle-size/SKILL.md +23 -274
- package/templates/webcomponents/igc-ts/projects/empty/index.js +1 -1
- package/templates/webcomponents/igc-ts/projects/side-nav/files/index.html +21 -0
- package/templates/webcomponents/igc-ts/projects/side-nav/files/src/app/app-routing.ts +9 -0
- package/templates/webcomponents/igc-ts/projects/side-nav/files/src/app/app.ts +192 -22
- package/templates/webcomponents/igc-ts/projects/side-nav/files/src/app/home/home.ts +175 -0
- package/templates/webcomponents/igc-ts/projects/side-nav/index.js +1 -1
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/index.html +25 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/app-routing.ts +37 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/app.ts +251 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/login-bar/login-bar.ts +124 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/login-dialog/login-dialog.ts +253 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/models/external-login.ts +10 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/models/login.ts +4 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/models/register-info.ts +6 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/models/user.ts +19 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/services/authentication.ts +37 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/services/external-auth-config.ts +44 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/services/externalAuth.ts +272 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/services/fakeBackend.ts +88 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/services/jwtUtil.ts +10 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/services/pkce.ts +29 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/authentication/services/userStore.ts +39 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/profile/profile.ts +142 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/redirect/redirect-facebook.ts +57 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/redirect/redirect-google.ts +53 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/files/src/app/redirect/redirect-microsoft.ts +53 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/index.d.ts +15 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-auth/index.js +46 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-mini/files/src/app/app-routing.ts +13 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-mini/files/src/app/app.ts +238 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-mini/index.d.ts +14 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-mini/index.js +45 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-mini-auth/files/src/app/app.ts +258 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-mini-auth/index.d.ts +15 -0
- package/templates/webcomponents/igc-ts/projects/side-nav-mini-auth/index.js +50 -0
- package/templates/react/igr-ts/projects/top-nav/files/src/app/app.css +0 -62
- package/templates/react/igr-ts/projects/top-nav/files/src/app/app.tsx +0 -18
- package/templates/react/igr-ts/projects/top-nav/files/src/components/navigation-header/index.tsx +0 -19
- /package/templates/react/igr-ts/projects/{top-nav → side-nav}/files/src/app/app.test.tsx +0 -0
|
@@ -34,93 +34,39 @@ The skill also covers component-level theming, layout controls (spacing, sizing,
|
|
|
34
34
|
|
|
35
35
|
## Setting Up the Theming MCP Server
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
See [references/mcp-setup.md](references/mcp-setup.md) for VS Code, Cursor, Claude Desktop, and WebStorm configuration instructions.
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
Create or edit `.vscode/mcp.json` in your project:
|
|
42
|
-
|
|
43
|
-
```json
|
|
44
|
-
{
|
|
45
|
-
"servers": {
|
|
46
|
-
"igniteui-theming": {
|
|
47
|
-
"command": "npx",
|
|
48
|
-
"args": ["-y", "igniteui-theming", "igniteui-theming-mcp"]
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
This works whether `igniteui-theming` is installed locally in `node_modules` or needs to be pulled from the npm registry — `npx -y` handles both cases.
|
|
55
|
-
|
|
56
|
-
### Cursor
|
|
57
|
-
|
|
58
|
-
Create or edit `.cursor/mcp.json`:
|
|
59
|
-
|
|
60
|
-
```json
|
|
61
|
-
{
|
|
62
|
-
"mcpServers": {
|
|
63
|
-
"igniteui-theming": {
|
|
64
|
-
"command": "npx",
|
|
65
|
-
"args": ["-y", "igniteui-theming", "igniteui-theming-mcp"]
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### Claude Desktop
|
|
72
|
-
|
|
73
|
-
Edit the Claude Desktop config file:
|
|
74
|
-
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
75
|
-
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
76
|
-
|
|
77
|
-
```json
|
|
78
|
-
{
|
|
79
|
-
"mcpServers": {
|
|
80
|
-
"igniteui-theming": {
|
|
81
|
-
"command": "npx",
|
|
82
|
-
"args": ["-y", "igniteui-theming", "igniteui-theming-mcp"]
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### WebStorm / JetBrains IDEs
|
|
89
|
-
|
|
90
|
-
1. Go to **Settings → Tools → AI Assistant → MCP Servers**
|
|
91
|
-
2. Click **+ Add MCP Server**
|
|
92
|
-
3. Set Command to `npx` and Arguments to `igniteui-theming igniteui-theming-mcp`
|
|
93
|
-
4. Click OK and restart the AI Assistant
|
|
94
|
-
|
|
95
|
-
### Verifying the Setup
|
|
96
|
-
|
|
97
|
-
After configuring the MCP server, ask your AI assistant:
|
|
98
|
-
|
|
99
|
-
> "Detect which Ignite UI platform my project uses"
|
|
100
|
-
|
|
101
|
-
If the MCP server is running, the `detect_platform` tool will analyze your `package.json` and return the detected platform (e.g., `webcomponents`).
|
|
39
|
+
Verify the server is running by calling `detect_platform` — it reads your `package.json` and returns the detected platform (e.g., `webcomponents`).
|
|
102
40
|
|
|
103
41
|
## Theming Architecture
|
|
104
42
|
|
|
105
|
-
The
|
|
43
|
+
The theming system is built on four pillars:
|
|
106
44
|
|
|
107
|
-
|
|
|
45
|
+
| Pillar | Description |
|
|
108
46
|
|---|---|
|
|
109
|
-
| **Palette** | Color
|
|
110
|
-
| **Typography** | Font family
|
|
111
|
-
| **Elevations** | Box-shadow levels 0–24
|
|
112
|
-
| **Schema** | Per-component recipes
|
|
47
|
+
| **Palette** | Color families: `primary`, `secondary`, `surface`, `gray`, `info`, `success`, `warn`, `error` — each with shades 50–900 |
|
|
48
|
+
| **Typography** | Font family and type scale (headings, body, captions, etc.) |
|
|
49
|
+
| **Elevations** | Box-shadow levels (0–24) |
|
|
50
|
+
| **Schema** | Per-component recipes that map palette tokens to component-level CSS custom properties |
|
|
113
51
|
|
|
114
|
-
|
|
52
|
+
Four built-in design systems are available — each with light and dark variants:
|
|
115
53
|
|
|
116
|
-
|
|
54
|
+
| Design System | Variants |
|
|
55
|
+
|---|---|
|
|
56
|
+
| **Material** | `light/material.css`, `dark/material.css` |
|
|
57
|
+
| **Bootstrap** | `light/bootstrap.css`, `dark/bootstrap.css` |
|
|
58
|
+
| **Fluent** | `light/fluent.css`, `dark/fluent.css` |
|
|
59
|
+
| **Indigo** | `light/indigo.css`, `dark/indigo.css` |
|
|
60
|
+
|
|
61
|
+
For the full live reference (palette families, design system schemas, variant constraints, and preset palettes) call:
|
|
117
62
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
- **Indigo** — Infragistics Indigo Design
|
|
63
|
+
```
|
|
64
|
+
read_resource({ uri: "theming://platforms/webcomponents" })
|
|
65
|
+
```
|
|
122
66
|
|
|
123
|
-
|
|
67
|
+
Additional guidance resources:
|
|
68
|
+
- `read_resource({ uri: "theming://guidance/colors/roles" })` — which components use primary vs secondary vs surface, and which shade (50/500/900) to use where
|
|
69
|
+
- `read_resource({ uri: "theming://guidance/colors/rules" })` — surface and gray luminance rules for light/dark variants (why gray is inverted from surface, WCAG contrast thresholds)
|
|
124
70
|
|
|
125
71
|
## Pre-built Themes
|
|
126
72
|
|
|
@@ -147,18 +93,13 @@ Available pre-built CSS files:
|
|
|
147
93
|
|
|
148
94
|
> No Sass required. Works in any project after importing a pre-built theme.
|
|
149
95
|
|
|
150
|
-
After importing a pre-built theme, override
|
|
96
|
+
After importing a pre-built theme, override the `*-500` base shade to change a color family. All other shades (50–900) derive from the 500 value automatically via CSS relative color syntax:
|
|
151
97
|
|
|
152
98
|
```css
|
|
153
99
|
:root {
|
|
154
|
-
/* Override
|
|
155
|
-
--ig-primary-
|
|
156
|
-
--ig-
|
|
157
|
-
--ig-primary-l: 50%;
|
|
158
|
-
|
|
159
|
-
--ig-secondary-h: 33deg;
|
|
160
|
-
--ig-secondary-s: 100%;
|
|
161
|
-
--ig-secondary-l: 50%;
|
|
100
|
+
/* Override the 500 (base) shade — all other shades update automatically */
|
|
101
|
+
--ig-primary-500: #1976D2;
|
|
102
|
+
--ig-secondary-500: #FF9800;
|
|
162
103
|
}
|
|
163
104
|
```
|
|
164
105
|
|
|
@@ -166,9 +107,7 @@ To scope overrides to a specific container:
|
|
|
166
107
|
|
|
167
108
|
```css
|
|
168
109
|
.admin-panel {
|
|
169
|
-
--ig-primary-
|
|
170
|
-
--ig-primary-s: 60%;
|
|
171
|
-
--ig-primary-l: 45%;
|
|
110
|
+
--ig-primary-500: #6200EA;
|
|
172
111
|
}
|
|
173
112
|
```
|
|
174
113
|
|
|
@@ -177,17 +116,14 @@ For dark mode, either import a dark theme CSS file directly or toggle overrides
|
|
|
177
116
|
```css
|
|
178
117
|
@media (prefers-color-scheme: dark) {
|
|
179
118
|
:root {
|
|
180
|
-
--ig-surface-
|
|
181
|
-
--ig-
|
|
182
|
-
--ig-surface-l: 7%;
|
|
119
|
+
--ig-surface-500: #121212;
|
|
120
|
+
--ig-primary-500: #90CAF9; /* lighter tint works better on dark backgrounds */
|
|
183
121
|
}
|
|
184
122
|
}
|
|
185
123
|
|
|
186
124
|
/* Or manually with a class */
|
|
187
125
|
.dark-theme {
|
|
188
|
-
--ig-surface-
|
|
189
|
-
--ig-surface-s: 0%;
|
|
190
|
-
--ig-surface-l: 7%;
|
|
126
|
+
--ig-surface-500: #222;
|
|
191
127
|
}
|
|
192
128
|
```
|
|
193
129
|
|
|
@@ -197,50 +133,25 @@ For dark mode, either import a dark theme CSS file directly or toggle overrides
|
|
|
197
133
|
|
|
198
134
|
The Sass API for `igniteui-webcomponents` uses `@use 'igniteui-theming'` with individual mixins — **not** the Angular-specific `core()` / `theme()` combined mixins.
|
|
199
135
|
|
|
200
|
-
|
|
201
|
-
@use 'igniteui-theming' as *;
|
|
202
|
-
|
|
203
|
-
// 1. Define a palette
|
|
204
|
-
$my-palette: palette(
|
|
205
|
-
$primary: #1976D2,
|
|
206
|
-
$secondary: #FF9800,
|
|
207
|
-
$surface: #FAFAFA
|
|
208
|
-
);
|
|
209
|
-
|
|
210
|
-
// 2. Apply the palette
|
|
211
|
-
@include palette($my-palette);
|
|
212
|
-
|
|
213
|
-
// 3. Optional: Typography
|
|
214
|
-
@include typography($font-family: "'Roboto', sans-serif");
|
|
215
|
-
|
|
216
|
-
// 4. Optional: Elevations
|
|
217
|
-
@include elevations();
|
|
136
|
+
Call `create_theme` to generate production-ready Sass for palette + typography + elevations in a single step:
|
|
218
137
|
|
|
219
|
-
// 5. Optional: Spacing
|
|
220
|
-
@include spacing();
|
|
221
138
|
```
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
)
|
|
233
|
-
|
|
234
|
-
@include palette($dark-palette, $schema: $dark-material-schema);
|
|
139
|
+
create_theme({
|
|
140
|
+
platform: "webcomponents",
|
|
141
|
+
designSystem: "material", // or "bootstrap", "fluent", "indigo"
|
|
142
|
+
primaryColor: "#1976D2",
|
|
143
|
+
secondaryColor: "#FF9800",
|
|
144
|
+
surfaceColor: "#FAFAFA",
|
|
145
|
+
variant: "light",
|
|
146
|
+
fontFamily: "'Roboto', sans-serif",
|
|
147
|
+
includeTypography: true,
|
|
148
|
+
includeElevations: true
|
|
149
|
+
})
|
|
235
150
|
```
|
|
236
151
|
|
|
237
|
-
|
|
152
|
+
For a dark theme pass a dark `surfaceColor` (e.g. `"#121212"`) and `variant: "dark"` — `create_theme` selects the correct dark schema automatically.
|
|
238
153
|
|
|
239
|
-
|
|
240
|
-
.admin-panel {
|
|
241
|
-
@include palette($admin-palette, $schema: $light-indigo-schema);
|
|
242
|
-
}
|
|
243
|
-
```
|
|
154
|
+
For palette-only generation (when typography/elevations are already set) use `create_palette`. For scoping a theme to a container, pass the generated `@include palette(...)` block inside the target selector.
|
|
244
155
|
|
|
245
156
|
## Component-Level Theming
|
|
246
157
|
|
|
@@ -290,21 +201,17 @@ igc-avatar {
|
|
|
290
201
|
}
|
|
291
202
|
```
|
|
292
203
|
|
|
293
|
-
When Sass is
|
|
294
|
-
|
|
295
|
-
```scss
|
|
296
|
-
@use 'igniteui-theming' as *;
|
|
204
|
+
When Sass is configured, use `create_component_theme` to generate the correct `avatar-theme(...)` + `@include tokens(...)` block:
|
|
297
205
|
|
|
298
|
-
$custom-avatar: avatar-theme(
|
|
299
|
-
$schema: $light-material-schema,
|
|
300
|
-
$background: var(--ig-primary-500),
|
|
301
|
-
$color: var(--ig-primary-500-contrast)
|
|
302
|
-
);
|
|
303
|
-
|
|
304
|
-
igc-avatar {
|
|
305
|
-
@include tokens($custom-avatar);
|
|
306
|
-
}
|
|
307
206
|
```
|
|
207
|
+
create_component_theme({
|
|
208
|
+
platform: "webcomponents",
|
|
209
|
+
component: "avatar",
|
|
210
|
+
tokens: { "background": "var(--ig-primary-500)", "color": "var(--ig-primary-500-contrast)" }
|
|
211
|
+
})
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Pass `output: "css"` if you want CSS custom properties instead of Sass.
|
|
308
215
|
|
|
309
216
|
### Discovering Available Tokens
|
|
310
217
|
|
|
@@ -321,35 +228,23 @@ Workflow for compound components:
|
|
|
321
228
|
|
|
322
229
|
## Layout Controls
|
|
323
230
|
|
|
324
|
-
|
|
231
|
+
Use the MCP layout tools to generate the correct CSS or Sass output:
|
|
325
232
|
|
|
326
|
-
Controls the size of components via `--ig-size` (values: 1 = small, 2 = medium, 3 = large):
|
|
327
|
-
|
|
328
|
-
```css
|
|
329
|
-
/* Global */
|
|
330
|
-
:root { --ig-size: 2; }
|
|
331
|
-
|
|
332
|
-
/* Component-scoped */
|
|
333
|
-
igc-grid { --ig-size: 1; }
|
|
334
233
|
```
|
|
234
|
+
set_size({ size: "medium" }) // global, CSS
|
|
235
|
+
set_size({ size: "small", component: "grid" }) // component-scoped, CSS
|
|
236
|
+
set_size({ size: "medium", output: "sass" }) // Sass output
|
|
335
237
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
Controls internal padding via `--ig-spacing` (1 = default, 0.5 = compact, 2 = spacious):
|
|
238
|
+
set_spacing({ spacing: 0.75 }) // compact, global
|
|
239
|
+
set_spacing({ spacing: 0.75, component: "grid" }) // component-scoped
|
|
339
240
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
.compact-section { --ig-spacing: 0.75; }
|
|
241
|
+
set_roundness({ radiusFactor: 0.5 }) // global
|
|
242
|
+
set_roundness({ radiusFactor: 0.0 }) // square
|
|
343
243
|
```
|
|
344
244
|
|
|
345
|
-
|
|
245
|
+
All three tools default to CSS output. Add `output: "sass"` when the project has Sass configured.
|
|
346
246
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
```css
|
|
350
|
-
:root { --ig-radius-factor: 1; }
|
|
351
|
-
igc-avatar { --ig-radius-factor: 0.5; }
|
|
352
|
-
```
|
|
247
|
+
The underlying CSS custom properties are `--ig-size`, `--ig-spacing`, and `--ig-radius-factor`. You can also set them directly on `:root` or a scoped selector if a one-off override is simpler than a tool call.
|
|
353
248
|
|
|
354
249
|
## Using the Theming MCP Server
|
|
355
250
|
|
|
@@ -357,113 +252,17 @@ The Ignite UI Theming MCP server provides tools for AI-assisted theme code gener
|
|
|
357
252
|
|
|
358
253
|
> **IMPORTANT — File Safety Rule**: When generating or updating theme code, **never overwrite existing style files directly**. Instead, always **propose the changes as an update** and let the user review and approve before writing to disk. If a `styles.scss` (or any target file) already exists, show the generated code as a diff or suggestion rather than replacing the file contents. This prevents accidental loss of custom styles the user has already written.
|
|
359
254
|
|
|
360
|
-
|
|
255
|
+
Quick tool sequence — for full parameter details, see earlier sections:
|
|
361
256
|
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
```
|
|
372
|
-
Tool: create_theme
|
|
373
|
-
Params: {
|
|
374
|
-
platform: "webcomponents",
|
|
375
|
-
designSystem: "material",
|
|
376
|
-
primaryColor: "#1976D2",
|
|
377
|
-
secondaryColor: "#FF9800",
|
|
378
|
-
surfaceColor: "#FAFAFA",
|
|
379
|
-
variant: "light",
|
|
380
|
-
fontFamily: "'Roboto', sans-serif",
|
|
381
|
-
includeTypography: true,
|
|
382
|
-
includeElevations: true
|
|
383
|
-
}
|
|
384
|
-
```
|
|
385
|
-
|
|
386
|
-
Generates a complete Sass file with palette, typography, elevations, and the `theme()` mixin call.
|
|
387
|
-
|
|
388
|
-
### Step 3 — Customize Individual Components
|
|
389
|
-
|
|
390
|
-
```
|
|
391
|
-
Tool: get_component_design_tokens
|
|
392
|
-
Params: { component: "grid" }
|
|
393
|
-
```
|
|
394
|
-
|
|
395
|
-
Then use **palette token references** (not hardcoded hex values) for every color:
|
|
396
|
-
|
|
397
|
-
```
|
|
398
|
-
Tool: create_component_theme
|
|
399
|
-
Params: {
|
|
400
|
-
platform: "webcomponents",
|
|
401
|
-
designSystem: "material",
|
|
402
|
-
variant: "light",
|
|
403
|
-
component: "grid",
|
|
404
|
-
tokens: {
|
|
405
|
-
"header-background": "var(--ig-primary-50)",
|
|
406
|
-
"header-text-color": "var(--ig-primary-800)"
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
```
|
|
410
|
-
|
|
411
|
-
> **Reminder**: After a palette is generated, all token values passed to
|
|
412
|
-
> `create_component_theme` must reference palette CSS custom properties
|
|
413
|
-
> (e.g., `var(--ig-primary-500)`, `var(--ig-secondary-A200)`,
|
|
414
|
-
> `var(--ig-gray-100)`). Never pass raw hex values like `"#E3F2FD"`.
|
|
415
|
-
|
|
416
|
-
### Step 4 — Generate a Palette
|
|
417
|
-
|
|
418
|
-
For simple mid-luminance base colors:
|
|
419
|
-
|
|
420
|
-
```
|
|
421
|
-
Tool: create_palette
|
|
422
|
-
Params: {
|
|
423
|
-
platform: "webcomponents",
|
|
424
|
-
primary: "#1976D2",
|
|
425
|
-
secondary: "#FF9800",
|
|
426
|
-
surface: "#FAFAFA",
|
|
427
|
-
variant: "light"
|
|
428
|
-
}
|
|
429
|
-
```
|
|
430
|
-
|
|
431
|
-
For brand-specific exact shade values, use `create_custom_palette` with `mode: "explicit"` for full control over each shade.
|
|
432
|
-
|
|
433
|
-
### Step 5 — Adjust Layout
|
|
434
|
-
|
|
435
|
-
By default, layout tools emit **CSS**. If the project has Sass configured, add `output: "sass"` to get Sass output:
|
|
436
|
-
|
|
437
|
-
```
|
|
438
|
-
Tool: set_size → { size: "medium" } # CSS (default)
|
|
439
|
-
Tool: set_size → { size: "medium", output: "sass" } # Sass
|
|
440
|
-
Tool: set_spacing → { spacing: 0.75, component: "grid" } # CSS (default)
|
|
441
|
-
Tool: set_spacing → { spacing: 0.75, component: "grid", output: "sass" } # Sass
|
|
442
|
-
Tool: set_roundness → { radiusFactor: 0.8 } # CSS (default)
|
|
443
|
-
Tool: set_roundness → { radiusFactor: 0.8, output: "sass" } # Sass
|
|
444
|
-
```
|
|
445
|
-
|
|
446
|
-
### Step 6 — Reference Palette Colors (MANDATORY for All Color Usage)
|
|
447
|
-
|
|
448
|
-
After a palette is generated, **always** use the `get_color` tool to obtain the correct CSS custom property reference. Never hardcode hex/RGB/HSL values in component themes, custom CSS, or Sass variables.
|
|
449
|
-
|
|
450
|
-
```
|
|
451
|
-
Tool: get_color
|
|
452
|
-
Params: { color: "primary", variant: "600" }
|
|
453
|
-
→ var(--ig-primary-600)
|
|
454
|
-
|
|
455
|
-
Params: { color: "primary", variant: "600", contrast: true }
|
|
456
|
-
→ var(--ig-primary-600-contrast)
|
|
457
|
-
|
|
458
|
-
Params: { color: "primary", opacity: 0.5 }
|
|
459
|
-
→ hsl(from var(--ig-primary-500) h s l / 0.5)
|
|
460
|
-
```
|
|
461
|
-
|
|
462
|
-
Use these token references everywhere:
|
|
463
|
-
- Component theme `tokens` values
|
|
464
|
-
- Custom CSS rules (`color`, `background`, `border-color`, `fill`, `stroke`, etc.)
|
|
465
|
-
|
|
466
|
-
The **only** place raw hex values are acceptable is in the initial `palette()` call or the `create_palette` / `create_theme` MCP tool inputs that seed the color system.
|
|
257
|
+
| Step | Tool | Purpose |
|
|
258
|
+
|---|---|---|
|
|
259
|
+
| 1 | `detect_platform` | Always first — auto-detects platform from `package.json` |
|
|
260
|
+
| 2 | `create_theme` | Full Sass theme: palette + typography + elevations in one call |
|
|
261
|
+
| 3 | `get_component_design_tokens` | Discover valid token names before calling `create_component_theme` |
|
|
262
|
+
| 4 | `create_component_theme` | Scoped component override — all token values must use `var(--ig-*)` |
|
|
263
|
+
| 5 | `create_palette` | Palette only, when a full Sass theme is not needed |
|
|
264
|
+
| 6 | `set_size` / `set_spacing` / `set_roundness` | Layout controls — add `output: "sass"` for Sass output |
|
|
265
|
+
| 7 | `get_color` | Resolve color intent to `var(--ig-<family>-<shade>)` token reference |
|
|
467
266
|
|
|
468
267
|
### Loading Reference Data
|
|
469
268
|
|
|
@@ -537,18 +336,15 @@ import 'igniteui-webcomponents/themes/light/bootstrap.css';
|
|
|
537
336
|
```
|
|
538
337
|
|
|
539
338
|
```css
|
|
540
|
-
/* Override surface
|
|
339
|
+
/* Override surface base color for dark mode */
|
|
541
340
|
.dark-theme {
|
|
542
|
-
--ig-surface-
|
|
543
|
-
--ig-surface-s: 0%;
|
|
544
|
-
--ig-surface-l: 7%;
|
|
341
|
+
--ig-surface-500: #121212;
|
|
545
342
|
}
|
|
546
343
|
|
|
547
344
|
@media (prefers-color-scheme: dark) {
|
|
548
345
|
:root {
|
|
549
|
-
--ig-surface-
|
|
550
|
-
--ig-
|
|
551
|
-
--ig-surface-l: 7%;
|
|
346
|
+
--ig-surface-500: #121212;
|
|
347
|
+
--ig-primary-500: #90CAF9; /* lighter tint works better on dark backgrounds */
|
|
552
348
|
}
|
|
553
349
|
}
|
|
554
350
|
```
|
|
@@ -564,43 +360,19 @@ function setTheme(variant: 'light' | 'dark', design = 'bootstrap') {
|
|
|
564
360
|
|
|
565
361
|
### Switching Between Light and Dark Themes — Sass approach
|
|
566
362
|
|
|
567
|
-
When Sass is configured,
|
|
568
|
-
|
|
569
|
-
```scss
|
|
570
|
-
@use 'igniteui-theming' as *;
|
|
571
|
-
|
|
572
|
-
$light-palette: palette($primary: #1976D2, $secondary: #FF9800, $surface: #FAFAFA);
|
|
573
|
-
$dark-palette: palette($primary: #90CAF9, $secondary: #FFB74D, $surface: #121212);
|
|
574
|
-
|
|
575
|
-
@include typography($font-family: "'Roboto', sans-serif");
|
|
576
|
-
@include elevations();
|
|
577
|
-
|
|
578
|
-
// Light is default
|
|
579
|
-
@include palette($light-palette, $schema: $light-material-schema);
|
|
580
|
-
|
|
581
|
-
// Dark via class on <body> or <html>
|
|
582
|
-
.dark-theme {
|
|
583
|
-
@include palette($dark-palette, $schema: $dark-material-schema);
|
|
584
|
-
}
|
|
585
|
-
```
|
|
363
|
+
When Sass is configured, generate both theme blocks with `create_theme` — once with `variant: "light"` and once with `variant: "dark"`. Use the generated `@include palette(...)` call inside `.dark-theme { }` for the dark variant. The tool selects the correct schema automatically for each variant.
|
|
586
364
|
|
|
587
365
|
### Scoping a Theme to a Container — CSS approach
|
|
588
366
|
|
|
589
367
|
```css
|
|
590
368
|
.admin-panel {
|
|
591
|
-
--ig-primary-
|
|
592
|
-
--ig-primary-s: 60%;
|
|
593
|
-
--ig-primary-l: 45%;
|
|
369
|
+
--ig-primary-500: #6200EA;
|
|
594
370
|
}
|
|
595
371
|
```
|
|
596
372
|
|
|
597
373
|
### Scoping a Theme to a Container — Sass approach
|
|
598
374
|
|
|
599
|
-
|
|
600
|
-
.admin-panel {
|
|
601
|
-
@include palette($admin-palette, $schema: $light-indigo-schema);
|
|
602
|
-
}
|
|
603
|
-
```
|
|
375
|
+
Generate the palette block with `create_palette` and wrap it in the target container selector manually, or pass a custom `selector` when using `create_component_theme` for component-scoped overrides.
|
|
604
376
|
|
|
605
377
|
## Key Rules
|
|
606
378
|
|
|
@@ -609,7 +381,7 @@ $dark-palette: palette($primary: #90CAF9, $secondary: #FFB74D, $surface: #121212
|
|
|
609
381
|
3. **Always call `get_component_design_tokens` before `create_component_theme`** to discover valid token names
|
|
610
382
|
4. **Palette shades 50 = lightest, 900 = darkest** for all chromatic colors — never invert for dark themes (only gray inverts)
|
|
611
383
|
5. **Surface color must match the variant** — light color for `light`, dark color for `dark`
|
|
612
|
-
6. **Sass only**: Use
|
|
613
|
-
7. **Sass only**: Component themes use `@include tokens($theme)` inside
|
|
384
|
+
6. **Sass only**: Use `create_theme` (or `create_palette` / `create_typography` / `create_elevations` individually) to generate correct Sass — the theming module for Web Components is `igniteui-theming`, not `igniteui-angular/theming`; Angular-specific `core()` / `theme()` combined mixins do **not** apply here
|
|
385
|
+
7. **Sass only**: Component themes use `create_component_theme` to generate `@include tokens($theme)` inside the correct selector
|
|
614
386
|
8. **For compound components**, follow the full checklist returned by `get_component_design_tokens` — theme each child component with its scoped selector
|
|
615
387
|
9. **Never hardcode colors after palette generation** — once a palette is created, every color in component themes, custom CSS, and Sass variables must use `var(--ig-<family>-<shade>)` palette tokens (e.g., `var(--ig-primary-500)`, `var(--ig-gray-200)`). Raw hex/RGB/HSL values are only acceptable in the initial `palette()` seed call. This ensures themes remain consistent, switchable (light/dark), and maintainable
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Setting Up the Ignite UI Theming MCP Server
|
|
2
|
+
|
|
3
|
+
> **Part of the [`igniteui-wc-customize-component-theme`](../SKILL.md) skill.**
|
|
4
|
+
|
|
5
|
+
The Ignite UI Theming MCP server enables AI assistants to generate production-ready theming code. It must be configured in your editor before the theming tools become available.
|
|
6
|
+
|
|
7
|
+
## VS Code
|
|
8
|
+
|
|
9
|
+
Create or edit `.vscode/mcp.json` in your project:
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
{
|
|
13
|
+
"servers": {
|
|
14
|
+
"igniteui-theming": {
|
|
15
|
+
"command": "npx",
|
|
16
|
+
"args": ["-y", "igniteui-theming", "igniteui-theming-mcp"]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
This works whether `igniteui-theming` is installed locally in `node_modules` or needs to be pulled from the npm registry — `npx -y` handles both cases.
|
|
23
|
+
|
|
24
|
+
## Cursor
|
|
25
|
+
|
|
26
|
+
Create or edit `.cursor/mcp.json`:
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"mcpServers": {
|
|
31
|
+
"igniteui-theming": {
|
|
32
|
+
"command": "npx",
|
|
33
|
+
"args": ["-y", "igniteui-theming", "igniteui-theming-mcp"]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Claude Desktop
|
|
40
|
+
|
|
41
|
+
Edit the Claude Desktop config file:
|
|
42
|
+
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
43
|
+
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"mcpServers": {
|
|
48
|
+
"igniteui-theming": {
|
|
49
|
+
"command": "npx",
|
|
50
|
+
"args": ["-y", "igniteui-theming", "igniteui-theming-mcp"]
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## WebStorm / JetBrains IDEs
|
|
57
|
+
|
|
58
|
+
1. Go to **Settings → Tools → AI Assistant → MCP Servers**
|
|
59
|
+
2. Click **+ Add MCP Server**
|
|
60
|
+
3. Set Command to `npx` and Arguments to `igniteui-theming igniteui-theming-mcp`
|
|
61
|
+
4. Click OK and restart the AI Assistant
|
|
62
|
+
|
|
63
|
+
## Verifying the Setup
|
|
64
|
+
|
|
65
|
+
After configuring the MCP server, ask your AI assistant:
|
|
66
|
+
|
|
67
|
+
> "Detect which Ignite UI platform my project uses"
|
|
68
|
+
|
|
69
|
+
If the MCP server is running, the `detect_platform` tool will analyze your `package.json` and return the detected platform (e.g., `webcomponents`).
|
|
@@ -84,7 +84,10 @@ For component-to-Ignite-UI mapping, see [references/component-mapping.md](refere
|
|
|
84
84
|
|
|
85
85
|
## Step 4: Look Up Component API
|
|
86
86
|
|
|
87
|
-
For every chosen component category,
|
|
87
|
+
For every chosen component category, use both tools before coding:
|
|
88
|
+
|
|
89
|
+
- **Usage patterns, HTML examples, slots, registration** → `get_doc({ framework: "webcomponents", name: "<doc-name>" })` — use the `name` field from `list_components`, not the display title
|
|
90
|
+
- **Full property/method/event API** → `get_api_reference({ platform: "webcomponents", component: "<ClassName>" })` — use `search_api` first to find the exact class name if needed
|
|
88
91
|
|
|
89
92
|
Call `search_docs` for feature-based questions (e.g., "how to configure [component] for [specific behavior or styling need]").
|
|
90
93
|
|