igniteui-theming 25.2.0 → 26.0.1
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/LICENSE +21 -0
- package/README.md +397 -0
- package/dist/json/components/bootstrap.json +1 -1
- package/dist/json/components/fluent.json +1 -1
- package/dist/json/components/indigo.json +1 -1
- package/dist/json/components/material.json +1 -1
- package/dist/json/components/themes.json +42 -32
- package/dist/mcp/generators/css.js +6 -5
- package/dist/mcp/generators/sass.js +7 -6
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/knowledge/component-metadata.d.ts +20 -19
- package/dist/mcp/knowledge/component-metadata.js +102 -67
- package/dist/mcp/knowledge/component-search.d.ts +18 -0
- package/dist/mcp/knowledge/component-search.js +144 -0
- package/dist/mcp/knowledge/component-themes.js +8 -4
- package/dist/mcp/knowledge/index.d.ts +2 -1
- package/dist/mcp/knowledge/index.js +3 -2
- package/dist/mcp/theming/dist/json/components/themes.js +37 -15
- package/dist/mcp/tools/descriptions.d.ts +12 -10
- package/dist/mcp/tools/descriptions.js +91 -26
- package/dist/mcp/tools/handlers/component-theme.js +25 -6
- package/dist/mcp/tools/handlers/component-tokens.js +60 -84
- package/dist/mcp/tools/handlers/custom-palette.js +2 -1
- package/dist/mcp/tools/handlers/elevations.js +2 -0
- package/dist/mcp/tools/handlers/layout.js +1 -0
- package/dist/mcp/tools/handlers/palette.js +2 -0
- package/dist/mcp/tools/handlers/theme.js +2 -0
- package/dist/mcp/tools/handlers/typography.js +2 -0
- package/dist/mcp/tools/schemas.d.ts +6 -6
- package/dist/mcp/utils/sass.d.ts +5 -1
- package/dist/mcp/utils/sass.js +8 -4
- package/package.json +3 -1
- package/sass/themes/components/chat/_chat-theme.scss +31 -13
- package/sass/themes/components/grid/_grid-theme.scss +17 -15
- package/sass/themes/components/progress/_circular-theme.scss +3 -3
- package/sass/themes/schemas/components/dark/_progress.scss +4 -4
- package/sass/themes/schemas/components/light/_chat.scss +50 -4
- package/sass/themes/schemas/components/light/_progress.scss +4 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
© Copyright 2022 INFRAGISTICS. All Rights Reserved.
|
|
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
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
<h1 align="center">
|
|
2
|
+
Ignite UI Theming - from Infragistics
|
|
3
|
+
</h1>
|
|
4
|
+
|
|
5
|
+
[](https://badge.fury.io/js/igniteui-theming)
|
|
6
|
+
|
|
7
|
+
The Ignite UI Theming repository collects a set of Sass mixins, functions, and variables used to create themes for a variety of UI frameworks built by Infragistics. The theming package makes it super easy to create palettes, elevations and typography styles for your projects.
|
|
8
|
+
|
|
9
|
+
## Repository Structure
|
|
10
|
+
|
|
11
|
+
This repository is an npm workspaces monorepo with two packages:
|
|
12
|
+
|
|
13
|
+
| Package | Name | Description |
|
|
14
|
+
| ------------------ | ---------------------- | ----------------------------------------------------------- |
|
|
15
|
+
| `packages/theming` | `igniteui-theming` | Sass source, JSON build artifacts, published to npm |
|
|
16
|
+
| `packages/mcp` | `igniteui-theming-mcp` | MCP server sources, built into `packages/theming/dist/mcp/` |
|
|
17
|
+
|
|
18
|
+
The `igniteui-theming` package is the only published artifact — it includes both the Sass theming library and the MCP server binary.
|
|
19
|
+
|
|
20
|
+
Common commands from the repo root:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install # install all workspace dependencies
|
|
24
|
+
npm run build # build theming + MCP in dependency order
|
|
25
|
+
npm test # run all tests across both packages
|
|
26
|
+
npm run lint # lint all packages
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Palettes
|
|
30
|
+
|
|
31
|
+
We provide four predefined palettes - material, bootstrap, fluent and indigo that have all the necessary colors along with diffent variants of those colors to make it even easier picking the right one for your case. Here's what they look like:
|
|
32
|
+
|
|
33
|
+

|
|
34
|
+
|
|
35
|
+
To access any of the colors in the palettes, you can use the `color` function:
|
|
36
|
+
|
|
37
|
+
```scss
|
|
38
|
+
background: color($light-material-palette, 'primary', 500);
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
You can take a further look on what color functions and mixins the package contains and how to use them in the [Colors Wiki Page](<https://github.com/IgniteUI/igniteui-theming/wiki/Colors-(Draft)>)
|
|
42
|
+
|
|
43
|
+
## Typography
|
|
44
|
+
|
|
45
|
+
Another valuable module of our theming package is the typography, helping you have consistency all over your project. There are again four typography presets for the four themes that we provide out of the box.
|
|
46
|
+
|
|
47
|
+

|
|
48
|
+
|
|
49
|
+
You can set any of the typefaces by using the `typography` mixin, which accepts 2 arguments(font-family and type-scale). By default the typography is using the material typeface and type-scale.
|
|
50
|
+
|
|
51
|
+
```scss
|
|
52
|
+
@include typography($font-family: $material-typeface, $type-scale: $material-type-scale);
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Learn more about the typography module in the package by checking out the [Typography Wiki Page](<https://github.com/IgniteUI/igniteui-theming/wiki/Typography-(Draft)>)
|
|
56
|
+
|
|
57
|
+
## Elevations
|
|
58
|
+
|
|
59
|
+
The theming package is providing one preset of shadows that can be used to give your components a lift. They're super helpful using with buttons, cards, navigation bars, etc.
|
|
60
|
+
|
|
61
|
+

|
|
62
|
+
|
|
63
|
+
You can set elevations 0-24, by using the `elevation` function, which accepts the elevation level as an argument:
|
|
64
|
+
|
|
65
|
+
```scss
|
|
66
|
+
box-shadow: elevation(12);
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Learn more about elevations and their abilities in the [Elevations Wiki Page](<https://github.com/IgniteUI/igniteui-theming/wiki/Elevations-(draft)>)
|
|
70
|
+
|
|
71
|
+
## Usage
|
|
72
|
+
|
|
73
|
+
In order to use the Ignite UI Theming in your application you should install the `igniteui-theming` package:
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
npm install igniteui-theming
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Next, you will need to **use** it in the file that you want like this:
|
|
80
|
+
|
|
81
|
+
```scss
|
|
82
|
+
@use '.../node_modules/igniteui-theming/' as *;
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
You can also **use** just a fraction of the package:
|
|
86
|
+
|
|
87
|
+
```scss
|
|
88
|
+
@use '.../node_modules/igniteui-theming/sass/color' as *;
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
We provide presets for **material, bootstrap, fluent and indigo** themes for the color(light and dark palettes), typography and elevations fractions. You can import them into your scss file like this:
|
|
92
|
+
|
|
93
|
+
```scss
|
|
94
|
+
@use '.../node_modules/igniteui-theming/sass/typography/presets' as *;
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
You can read more about what the package contains on the [Wiki page](https://github.com/IgniteUI/igniteui-theming/wiki)
|
|
98
|
+
|
|
99
|
+
## Linting and Testing
|
|
100
|
+
|
|
101
|
+
To scan the project for linting errors, run
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
npm run lint
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
To run the suite of tests, run
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
npm run test
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Testing and Debugging
|
|
114
|
+
|
|
115
|
+
### Preview Palettes
|
|
116
|
+
|
|
117
|
+
Run from `packages/theming`. Pass the palette (`material`, `bootstrap`, `fluent`, `indigo`) and variant (`light` or `dark`).
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
npm run preview:palette -- --palette=material --variant=light
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## MCP Server (AI-Assisted Theming)
|
|
126
|
+
|
|
127
|
+
The Ignite UI Theming package includes a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that enables AI assistants to generate production-ready theming code for your Ignite UI applications.
|
|
128
|
+
|
|
129
|
+
### What is MCP?
|
|
130
|
+
|
|
131
|
+
The Model Context Protocol allows AI assistants (like Claude, GitHub Copilot, and others) to connect to external tools and data sources. The Ignite UI Theming MCP server acts as an expert theming assistant that can:
|
|
132
|
+
|
|
133
|
+
- 🎨 **Generate color palettes** with automatic shade variations
|
|
134
|
+
- 📝 **Create typography systems** following design standards
|
|
135
|
+
- 🌓 **Build complete themes** for light and dark modes
|
|
136
|
+
- 🎯 **Customize components** with design tokens
|
|
137
|
+
- ✅ **Validate colors** for accessibility compliance
|
|
138
|
+
|
|
139
|
+
### Quick Start
|
|
140
|
+
|
|
141
|
+
#### 1. Clone and Build
|
|
142
|
+
|
|
143
|
+
Clone the repository and build:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
npm install
|
|
147
|
+
npm run build
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
#### 2. Configure Your AI Client
|
|
151
|
+
|
|
152
|
+
The MCP server works with any MCP-compatible client. Here are setup instructions for popular clients:
|
|
153
|
+
|
|
154
|
+
<details>
|
|
155
|
+
<summary><strong>VS Code</strong> (with MCP-compatible extensions)</summary>
|
|
156
|
+
|
|
157
|
+
**For local development** - Create or edit `.vscode/mcp.json`:
|
|
158
|
+
|
|
159
|
+
```json
|
|
160
|
+
{
|
|
161
|
+
"servers": {
|
|
162
|
+
"igniteui-theming": {
|
|
163
|
+
"command": "node",
|
|
164
|
+
"args": ["/absolute/path/to/igniteui-theming/packages/theming/dist/mcp/index.js"]
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**Using published package**:
|
|
171
|
+
|
|
172
|
+
```json
|
|
173
|
+
{
|
|
174
|
+
"servers": {
|
|
175
|
+
"igniteui-theming": {
|
|
176
|
+
"command": "npx",
|
|
177
|
+
"args": ["-y", "igniteui-theming", "igniteui-theming-mcp"]
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
</details>
|
|
184
|
+
|
|
185
|
+
<details>
|
|
186
|
+
<summary><strong>WebStorm / JetBrains IDEs</strong></summary>
|
|
187
|
+
|
|
188
|
+
1. Go to **Settings → Tools → AI Assistant → MCP Servers**
|
|
189
|
+
2. Click **+ Add MCP Server**
|
|
190
|
+
3. Configure:
|
|
191
|
+
- **Name**: `igniteui-theming`
|
|
192
|
+
- **Command**: `node` (for local) or `npx` (for package)
|
|
193
|
+
- **Arguments**:
|
|
194
|
+
- Local: `/absolute/path/to/igniteui-theming/packages/theming/dist/mcp/index.js`
|
|
195
|
+
- Package: `igniteui-theming igniteui-theming-mcp`
|
|
196
|
+
4. Click **OK** and restart AI Assistant
|
|
197
|
+
|
|
198
|
+
</details>
|
|
199
|
+
|
|
200
|
+
<details>
|
|
201
|
+
<summary><strong>Claude Desktop</strong></summary>
|
|
202
|
+
|
|
203
|
+
Add to your configuration file:
|
|
204
|
+
|
|
205
|
+
**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
206
|
+
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
207
|
+
|
|
208
|
+
**For local development**:
|
|
209
|
+
|
|
210
|
+
```json
|
|
211
|
+
{
|
|
212
|
+
"mcpServers": {
|
|
213
|
+
"igniteui-theming": {
|
|
214
|
+
"command": "node",
|
|
215
|
+
"args": ["/absolute/path/to/igniteui-theming/packages/theming/dist/mcp/index.js"]
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
**Using published package**:
|
|
222
|
+
|
|
223
|
+
```json
|
|
224
|
+
{
|
|
225
|
+
"mcpServers": {
|
|
226
|
+
"igniteui-theming": {
|
|
227
|
+
"command": "npx",
|
|
228
|
+
"args": ["-y", "igniteui-theming", "igniteui-theming-mcp"]
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
</details>
|
|
235
|
+
|
|
236
|
+
<details>
|
|
237
|
+
<summary><strong>Cursor</strong></summary>
|
|
238
|
+
|
|
239
|
+
Create or edit `.cursor/mcp.json` in your project:
|
|
240
|
+
|
|
241
|
+
**For local development**:
|
|
242
|
+
|
|
243
|
+
```json
|
|
244
|
+
{
|
|
245
|
+
"mcpServers": {
|
|
246
|
+
"igniteui-theming": {
|
|
247
|
+
"command": "node",
|
|
248
|
+
"args": ["/absolute/path/to/igniteui-theming/packages/theming/dist/mcp/index.js"]
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
**Using published package**:
|
|
255
|
+
|
|
256
|
+
```json
|
|
257
|
+
{
|
|
258
|
+
"mcpServers": {
|
|
259
|
+
"igniteui-theming": {
|
|
260
|
+
"command": "npx",
|
|
261
|
+
"args": ["-y", "igniteui-theming", "igniteui-theming-mcp"]
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
</details>
|
|
268
|
+
|
|
269
|
+
### What Can It Do?
|
|
270
|
+
|
|
271
|
+
#### 🎨 Create Complete Themes
|
|
272
|
+
|
|
273
|
+
Simply describe your theme to your AI assistant:
|
|
274
|
+
|
|
275
|
+
> "Create a Material Design dark theme for my Angular app with that takes inspiration from the Gruvbox color scheme."
|
|
276
|
+
|
|
277
|
+
The AI will generate production-ready Sass code with:
|
|
278
|
+
|
|
279
|
+
- Color palette with all shade variations
|
|
280
|
+
- Typography setup with proper type scales
|
|
281
|
+
- Elevation shadows
|
|
282
|
+
- Platform-specific imports and configuration
|
|
283
|
+
|
|
284
|
+
#### 🌈 Generate Color Palettes
|
|
285
|
+
|
|
286
|
+
> "Generate a light theme palette using teal as primary and purple as secondary"
|
|
287
|
+
|
|
288
|
+
Get perfectly calculated color shades following design system standards.
|
|
289
|
+
|
|
290
|
+
#### 📝 Setup Typography
|
|
291
|
+
|
|
292
|
+
> "Set up typography using Inter font with Material Design type scale for Web Components"
|
|
293
|
+
|
|
294
|
+
Get proper typography configuration with font families and responsive type scales.
|
|
295
|
+
|
|
296
|
+
#### 🎯 Customize Components
|
|
297
|
+
|
|
298
|
+
> "What design tokens are available for the button component?"
|
|
299
|
+
>
|
|
300
|
+
> "Create a flat button theme with purple background and white text"
|
|
301
|
+
|
|
302
|
+
Discover and customize individual component styles using design tokens.
|
|
303
|
+
|
|
304
|
+
### Available Capabilities
|
|
305
|
+
|
|
306
|
+
The MCP server provides **8 tools** and **16 resources**:
|
|
307
|
+
|
|
308
|
+
#### Tools (Actions)
|
|
309
|
+
|
|
310
|
+
| Tool | Description |
|
|
311
|
+
| ----------------------------- | --------------------------------------------------------------- |
|
|
312
|
+
| `detect_platform` | Auto-detect which Ignite UI platform your project uses |
|
|
313
|
+
| `create_palette` | Generate color palette with automatic shade calculations |
|
|
314
|
+
| `create_custom_palette` | Create palette with fine-grained control over individual shades |
|
|
315
|
+
| `create_typography` | Setup typography with font families and type scales |
|
|
316
|
+
| `create_elevations` | Configure elevation shadows |
|
|
317
|
+
| `create_theme` | Generate complete theme (palette + typography + elevations) |
|
|
318
|
+
| `get_component_design_tokens` | Discover customizable properties for components |
|
|
319
|
+
| `create_component_theme` | Generate component-specific theme code |
|
|
320
|
+
|
|
321
|
+
#### Resources (Reference Data)
|
|
322
|
+
|
|
323
|
+
- **Platform Information**: Configuration for Angular, Web Components, React, and Blazor
|
|
324
|
+
- **Preset Libraries**: Pre-built palettes, typography, and elevation sets
|
|
325
|
+
- **Color Guidance**: Best practices for color selection and usage
|
|
326
|
+
- **Design System Schemas**: Material, Bootstrap, Fluent, and Indigo configurations
|
|
327
|
+
|
|
328
|
+
### Supported Platforms
|
|
329
|
+
|
|
330
|
+
- **Angular** - `igniteui-angular`
|
|
331
|
+
- **Web Components** - `igniteui-webcomponents`
|
|
332
|
+
- **React** - `igniteui-react`
|
|
333
|
+
- **Blazor** - `igniteui-blazor`
|
|
334
|
+
|
|
335
|
+
### Example Interactions
|
|
336
|
+
|
|
337
|
+
<details>
|
|
338
|
+
<summary><strong>Creating a new project theme</strong></summary>
|
|
339
|
+
|
|
340
|
+
**You**: "I'm starting a new Angular project with Ignite UI. Create a complete Material Design theme with primary blue, secondary coral, light theme, and Roboto font"
|
|
341
|
+
|
|
342
|
+
**AI**: _Uses `create_theme` tool and generates complete Sass code ready to use_
|
|
343
|
+
|
|
344
|
+
</details>
|
|
345
|
+
|
|
346
|
+
<details>
|
|
347
|
+
<summary><strong>Adding dark mode</strong></summary>
|
|
348
|
+
|
|
349
|
+
**You**: "I need a dark mode version with the same primary blue but dark surface"
|
|
350
|
+
|
|
351
|
+
**AI**: _Uses `create_theme` with `variant: "dark"` and generates dark theme code_
|
|
352
|
+
|
|
353
|
+
</details>
|
|
354
|
+
|
|
355
|
+
<details>
|
|
356
|
+
<summary><strong>Customizing components</strong></summary>
|
|
357
|
+
|
|
358
|
+
**You**: "What properties can I customize on the card component?"
|
|
359
|
+
|
|
360
|
+
**AI**: _Uses `get_component_design_tokens` to show available tokens_
|
|
361
|
+
|
|
362
|
+
**You**: "Make the card have a light gray background with subtle shadow"
|
|
363
|
+
|
|
364
|
+
**AI**: _Uses `create_component_theme` to generate component theme code_
|
|
365
|
+
|
|
366
|
+
</details>
|
|
367
|
+
|
|
368
|
+
### Full Documentation
|
|
369
|
+
|
|
370
|
+
For detailed documentation including:
|
|
371
|
+
|
|
372
|
+
- Complete tool parameter reference
|
|
373
|
+
- All prompt examples
|
|
374
|
+
- Platform-specific differences
|
|
375
|
+
- Troubleshooting guide
|
|
376
|
+
- Development instructions
|
|
377
|
+
|
|
378
|
+
See the [MCP Server README](./packages/mcp/README.md)
|
|
379
|
+
|
|
380
|
+
### Development Scripts
|
|
381
|
+
|
|
382
|
+
```bash
|
|
383
|
+
# Build for production (theming + MCP)
|
|
384
|
+
npm run build
|
|
385
|
+
|
|
386
|
+
# Run tests
|
|
387
|
+
npm run test
|
|
388
|
+
|
|
389
|
+
# Debug with MCP Inspector (from packages/mcp)
|
|
390
|
+
npm run inspect
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
---
|
|
394
|
+
|
|
395
|
+
## Contributing
|
|
396
|
+
|
|
397
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|