igniteui-cli 14.10.0-alpha.3 → 14.10.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (17) hide show
  1. package/package.json +4 -4
  2. package/templates/react/igr-ts/projects/_base/files/__dot__claude/skills/igniteui-react-components/SKILL.md +161 -0
  3. package/templates/react/igr-ts/projects/_base/files/__dot__claude/skills/igniteui-react-components/reference/CHARTS-GRIDS.md +127 -0
  4. package/templates/react/igr-ts/projects/_base/files/__dot__claude/skills/igniteui-react-components/reference/COMPONENT-CATALOGUE.md +301 -0
  5. package/templates/react/igr-ts/projects/_base/files/__dot__claude/skills/igniteui-react-components/reference/EVENT-HANDLING.md +70 -0
  6. package/templates/react/igr-ts/projects/_base/files/__dot__claude/skills/igniteui-react-components/reference/INSTALLATION.md +139 -0
  7. package/templates/react/igr-ts/projects/_base/files/__dot__claude/skills/igniteui-react-components/reference/JSX-PATTERNS.md +187 -0
  8. package/templates/react/igr-ts/projects/_base/files/__dot__claude/skills/igniteui-react-components/reference/REFS-FORMS.md +229 -0
  9. package/templates/react/igr-ts/projects/_base/files/__dot__claude/skills/igniteui-react-components/reference/REVEAL-SDK.md +198 -0
  10. package/templates/react/igr-ts/projects/_base/files/__dot__claude/skills/igniteui-react-components/reference/TROUBLESHOOTING.md +147 -0
  11. package/templates/react/igr-ts/projects/_base/files/__dot__claude/skills/igniteui-react-customize-theme/SKILL.md +182 -0
  12. package/templates/react/igr-ts/projects/_base/files/__dot__claude/skills/igniteui-react-customize-theme/reference/CSS-THEMING.md +265 -0
  13. package/templates/react/igr-ts/projects/_base/files/__dot__claude/skills/igniteui-react-customize-theme/reference/MCP-SERVER.md +75 -0
  14. package/templates/react/igr-ts/projects/_base/files/__dot__claude/skills/igniteui-react-customize-theme/reference/REVEAL-THEME.md +86 -0
  15. package/templates/react/igr-ts/projects/_base/files/__dot__claude/skills/igniteui-react-customize-theme/reference/SASS-THEMING.md +125 -0
  16. package/templates/react/igr-ts/projects/_base/files/__dot__claude/skills/igniteui-react-customize-theme/reference/TROUBLESHOOTING.md +35 -0
  17. package/templates/react/igr-ts/projects/_base/files/__dot__claude/skills/igniteui-react-optimize-bundle-size/SKILL.md +439 -0
@@ -0,0 +1,198 @@
1
+ # Reveal SDK Integration
2
+
3
+ Reveal SDK is a companion product for embedding interactive BI dashboards and data visualizations inside your React application. It requires client-side runtime dependencies, a backend Reveal server, and proper initialization.
4
+
5
+ > **⚠️ IMPORTANT:** `RvRevealView` is NOT self-sufficient. You must load the Reveal client runtime, configure the backend URL, and initialize Reveal properly using `useEffect` after mount — never in the render phase.
6
+
7
+ ## Step 1: Install Dependencies
8
+
9
+ ```bash
10
+ npm install reveal-sdk-wrappers-react reveal-sdk-wrappers
11
+ ```
12
+
13
+ ## Step 2: Load Reveal Client Runtime
14
+
15
+ Reveal SDK requires these client-side scripts to be loaded **before** using any Reveal components. Add them to your `index.html` or load them dynamically:
16
+
17
+ ```html
18
+ <!-- In public/index.html (or equivalent) -->
19
+ <script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js"></script>
20
+ <script src="https://cdn.jsdelivr.net/npm/dayjs@1.11.5/dayjs.min.js"></script>
21
+ <script src="https://dl.revealbi.io/reveal/libs/1.6.4/infragistics.reveal.js"></script>
22
+ ```
23
+
24
+ Replace `1.6.4` with your Reveal SDK version.
25
+
26
+ > **Note:** The Reveal SDK exposes its API through the `$.ig` global namespace. If TypeScript reports that `$` is not defined, add this declaration:
27
+ > ```tsx
28
+ > declare const $: any;
29
+ > ```
30
+
31
+ ## Step 3: Container Sizing (REQUIRED)
32
+
33
+ Reveal views require a **properly sized container**. Without explicit dimensions, the dashboard will not render:
34
+
35
+ ```css
36
+ /* dashboard.module.css */
37
+ .reveal-container {
38
+ width: 100%;
39
+ height: 100%;
40
+ min-width: 400px;
41
+ min-height: 400px;
42
+ }
43
+ ```
44
+
45
+ ## Step 4: Basic Integration Pattern
46
+
47
+ > **⚠️ CRITICAL:** Always initialize Reveal in `useEffect` after the component mounts — never during render. Add guards for missing `$` and `$.ig` to prevent errors if scripts haven't loaded.
48
+
49
+ ```tsx
50
+ import { useEffect, useRef } from 'react';
51
+ import styles from './dashboard.module.css';
52
+
53
+ declare const $: any;
54
+
55
+ export default function DashboardView() {
56
+ const containerRef = useRef<HTMLDivElement>(null);
57
+ const revealViewRef = useRef<any>(null);
58
+
59
+ useEffect(() => {
60
+ // Guard: Ensure Reveal runtime is loaded
61
+ if (typeof $ === 'undefined' || !$.ig) {
62
+ console.error('Reveal SDK runtime not loaded. Ensure jQuery, Day.js, and infragistics.reveal.js are included.');
63
+ return;
64
+ }
65
+
66
+ // Guard: Prevent double initialization
67
+ if (revealViewRef.current) {
68
+ return;
69
+ }
70
+
71
+ // Guard: Ensure container exists
72
+ if (!containerRef.current) {
73
+ return;
74
+ }
75
+
76
+ // Configure Reveal SDK backend URL (REQUIRED)
77
+ $.ig.RevealSdkSettings.setBaseUrl('https://your-reveal-server/reveal-api/');
78
+
79
+ // Initialize RevealView with the container element
80
+ revealViewRef.current = new $.ig.RevealView(containerRef.current);
81
+
82
+ // Optional: Load a specific dashboard
83
+ // $.ig.RVDashboard.loadDashboard('your-dashboard-id').then((dashboard: any) => {
84
+ // revealViewRef.current.dashboard = dashboard;
85
+ // });
86
+
87
+ // Cleanup on unmount
88
+ return () => {
89
+ if (revealViewRef.current) {
90
+ revealViewRef.current = null;
91
+ }
92
+ };
93
+ }, []);
94
+
95
+ return <div ref={containerRef} className={styles['reveal-container']} />;
96
+ }
97
+ ```
98
+
99
+ ## Using RvRevealView Wrapper (Alternative)
100
+
101
+ The `RvRevealView` wrapper simplifies some boilerplate but still requires proper runtime setup and `useEffect` initialization:
102
+
103
+ ```tsx
104
+ import { useEffect } from 'react';
105
+ import { RvRevealView } from 'reveal-sdk-wrappers-react';
106
+ import { RevealViewOptions } from 'reveal-sdk-wrappers';
107
+ import styles from './dashboard.module.css';
108
+
109
+ declare const $: any;
110
+
111
+ export default function DashboardView() {
112
+ useEffect(() => {
113
+ // Guard: Ensure Reveal runtime is loaded
114
+ if (typeof $ === 'undefined' || !$.ig) {
115
+ console.error('Reveal SDK runtime not loaded.');
116
+ return;
117
+ }
118
+
119
+ // Configure backend URL (REQUIRED) — must be done before render
120
+ $.ig.RevealSdkSettings.setBaseUrl('https://your-reveal-server/reveal-api/');
121
+
122
+ // Optional: Apply theme sync with Ignite UI
123
+ setRevealTheme();
124
+ }, []);
125
+
126
+ const options: RevealViewOptions = {
127
+ visualizations: {
128
+ menu: {
129
+ copy: false,
130
+ duplicate: false
131
+ }
132
+ }
133
+ };
134
+
135
+ return (
136
+ <div className={styles['reveal-container']}>
137
+ <RvRevealView options={options} />
138
+ </div>
139
+ );
140
+ }
141
+
142
+ function setRevealTheme() {
143
+ // Guard: Ensure $.ig exists
144
+ if (typeof $ === 'undefined' || !$.ig) return;
145
+
146
+ const style = window.getComputedStyle(document.body);
147
+ const theme = new $.ig.RevealTheme();
148
+
149
+ // Sync fonts with Ignite UI
150
+ theme.regularFont = style.getPropertyValue('--ig-font-family').trim() || 'sans-serif';
151
+ theme.mediumFont = theme.regularFont;
152
+ theme.boldFont = theme.regularFont;
153
+
154
+ // Auto-detect light/dark mode
155
+ const color = style.getPropertyValue('--ig-surface-500').trim() || '#fff';
156
+ const [r, g, b] = [1, 3, 5].map(i => parseInt(color.substring(i, i + 2), 16));
157
+ const brightness = (r * 299 + g * 587 + b * 114) / 1000;
158
+
159
+ theme.isDark = brightness < 128;
160
+ theme.fontColor = theme.isDark ? 'white' : 'black';
161
+ theme.dashboardBackgroundColor = style.getPropertyValue('--ig-gray-100').trim();
162
+ theme.visualizationBackgroundColor = style.getPropertyValue('--ig-surface-500').trim();
163
+
164
+ $.ig.RevealSdkSettings.theme = theme;
165
+ }
166
+ ```
167
+
168
+ ## Token Mapping Reference (Theme Sync)
169
+
170
+ | Reveal Theme Property | Ignite UI CSS Token | Purpose |
171
+ |---|---|---|
172
+ | `regularFont`, `mediumFont`, `boldFont` | `--ig-font-family` | Font family |
173
+ | `isDark` | Computed from `--ig-surface-500` brightness | Light/dark mode detection |
174
+ | `fontColor` | Derived from `isDark` | Text color (white for dark, black for light) |
175
+ | `dashboardBackgroundColor` | `--ig-gray-100` | Dashboard background |
176
+ | `visualizationBackgroundColor` | `--ig-surface-500` | Individual visualization card background |
177
+
178
+ ## Common Issues
179
+
180
+ ### Reveal view is blank or throws errors
181
+ - **Cause:** Reveal runtime scripts not loaded (jQuery, Day.js, infragistics.reveal.js)
182
+ - **Solution:** Add the required scripts to `index.html` before your React app loads
183
+
184
+ ### `$` or `$.ig` is undefined
185
+ - **Cause:** Scripts not loaded or loaded after React component renders
186
+ - **Solution:** Ensure scripts are in `<head>` or loaded before React mounts; add guards in `useEffect`
187
+
188
+ ### Dashboard not visible
189
+ - **Cause:** Container has no dimensions
190
+ - **Solution:** Add explicit `width`, `height`, `min-width`, `min-height` to the container
191
+
192
+ ### Double initialization errors
193
+ - **Cause:** `useEffect` running multiple times (Strict Mode) without cleanup
194
+ - **Solution:** Use a ref to track initialization state and prevent re-initialization
195
+
196
+ > **Tip:** When switching between light and dark Ignite UI themes, call `setRevealTheme()` again after the theme change so Reveal dashboards stay in sync.
197
+
198
+ See the [customize-theme skill](../../igniteui-react-customize-theme/SKILL.md) for more details on Ignite UI CSS custom properties and theme switching.
@@ -0,0 +1,147 @@
1
+ # Troubleshooting
2
+
3
+ ## Issue: Components render without styles
4
+
5
+ **Cause:** Missing theme CSS import. Without the theme CSS, components will render with broken layouts, missing icons (showing placeholders), and no visual styling.
6
+
7
+ **Solution:** Add the theme CSS import **before** any component usage. In Vite/CRA apps, add it to your entry point. In Next.js, add it to each client component file or the root layout:
8
+
9
+ ```tsx
10
+ // Always required for core components
11
+ import 'igniteui-webcomponents/themes/light/bootstrap.css';
12
+
13
+ // Also required when using grids (IgrGrid, IgrTreeGrid, etc.)
14
+ import 'igniteui-react-grids/grids/themes/light/bootstrap.css';
15
+ ```
16
+
17
+ **Next.js example:**
18
+
19
+ ```tsx
20
+ 'use client';
21
+
22
+ import 'igniteui-webcomponents/themes/light/bootstrap.css';
23
+ import 'igniteui-react-grids/grids/themes/light/bootstrap.css';
24
+
25
+ import { IgrNavbar, IgrButton } from 'igniteui-react';
26
+ import { IgrGrid, IgrColumn, IgrPaginator } from 'igniteui-react-grids';
27
+ ```
28
+
29
+ ## Issue: Grid renders but icons show as placeholders and styles are missing
30
+
31
+ **Cause:** The grid theme CSS (`igniteui-react-grids/grids/themes/...`) is not imported. The base theme CSS alone is not enough for grids.
32
+
33
+ **Solution:** Import **both** theme CSS files:
34
+
35
+ ```tsx
36
+ import 'igniteui-webcomponents/themes/light/bootstrap.css'; // Base theme
37
+ import 'igniteui-react-grids/grids/themes/light/bootstrap.css'; // Grid theme
38
+ ```
39
+
40
+ ## Issue: Grid Lite does not render or compilation error
41
+
42
+ **Cause:** `IgrGridLite` is a React wrapper component from `igniteui-react/grid-lite`. It requires **both** `igniteui-react` and `igniteui-grid-lite` packages to be installed. It uses the `Igr` prefix (like all other Ignite UI React wrappers) and does **not** require any `.register()` call.
43
+
44
+ **Solution:**
45
+
46
+ 1. Install both required packages: `npm install igniteui-react igniteui-grid-lite`
47
+ 2. Import `IgrGridLite` from `igniteui-react/grid-lite`
48
+ 3. Wrap in a sized container (see [CHARTS-GRIDS.md](./CHARTS-GRIDS.md) for a full example)
49
+
50
+ ## Issue: `IgrGridLite` is confused with `IgrGrid` from `igniteui-react-grids`
51
+
52
+ **Solution:** These are different components:
53
+ - `igniteui-react/grid-lite` → lightweight MIT grid (`IgrGridLite`, React wrapper — no `.register()` needed, requires both `igniteui-react` and `igniteui-grid-lite` packages)
54
+ - `igniteui-react-grids` → full-featured commercial grids (`IgrGrid`, `IgrTreeGrid`, etc. — React wrappers)
55
+
56
+ Import from the correct package for your needs:
57
+
58
+ ```tsx
59
+ // Lightweight grid (MIT, React wrapper, no registration needed)
60
+ import { IgrGridLite } from 'igniteui-react/grid-lite';
61
+
62
+ // Full-featured grid (commercial, React wrapper)
63
+ import { IgrGrid } from 'igniteui-react-grids';
64
+ ```
65
+
66
+ ## Issue: Events fire but have unexpected shape
67
+
68
+ **Cause:** Ignite UI events are `CustomEvent` objects from the underlying web component, not React `SyntheticEvent` objects.
69
+
70
+ **Solution:** Type the handler parameter as `CustomEvent` and access `.detail` for event-specific data or `.target` for the element:
71
+
72
+ ```tsx
73
+ const handleChange = (e: CustomEvent) => {
74
+ const target = e.target as HTMLElement;
75
+ const detail = e.detail;
76
+ // Use target or detail as appropriate
77
+ };
78
+ ```
79
+
80
+ ## Issue: Component methods not accessible
81
+
82
+ **Solution:** Use `useRef` with the component type:
83
+
84
+ ```tsx
85
+ const dialogRef = useRef<IgrDialog>(null);
86
+
87
+ // Call imperative method
88
+ dialogRef.current?.show();
89
+ ```
90
+
91
+ ## Issue: Chart / gauge / map does not render or is invisible
92
+
93
+ **Cause:** Two common causes:
94
+ 1. The corresponding module was not registered (e.g., `IgrCategoryChartModule.register()` was not called)
95
+ 2. The parent container has no explicit dimensions — these components inherit size from their container and will be invisible if the container has zero height/width
96
+
97
+ **Solution:**
98
+
99
+ 1. **Register the module** at the top level of the file (outside the component):
100
+
101
+ ```tsx
102
+ import { IgrCategoryChart, IgrCategoryChartModule } from 'igniteui-react-charts';
103
+ IgrCategoryChartModule.register();
104
+ ```
105
+
106
+ 2. **Wrap the chart in a sized container** with explicit dimensions:
107
+
108
+ ```css
109
+ .chart-container {
110
+ min-width: 400px;
111
+ min-height: 300px;
112
+ flex-grow: 1;
113
+ flex-basis: 0;
114
+ }
115
+ .chart-container > * { height: 100%; width: 100%; }
116
+ ```
117
+
118
+ ```tsx
119
+ <div className={styles['chart-container']}>
120
+ <IgrCategoryChart dataSource={data} />
121
+ </div>
122
+ ```
123
+
124
+ ## Issue: IgrTabs used for navigation fills the entire view with content
125
+
126
+ **Cause:** Inline content was included in `IgrTab` elements when using tabs for navigation with React Router. The tab content areas take up space and push the routed content out of view.
127
+
128
+ **Solution:** When using `IgrTabs` for navigation, use **only the label** (via `label` prop or `slot="label"`) — do NOT include inline content. Let the router's `<Outlet />` render the content:
129
+
130
+ ```tsx
131
+ // ✅ Correct — navigation tabs with label-only (no inline content)
132
+ <IgrTabs onChange={handleTabChange}>
133
+ <IgrTab label="Dashboard" selected={location.pathname === '/dashboard'} />
134
+ <IgrTab label="Orders" selected={location.pathname === '/orders'} />
135
+ </IgrTabs>
136
+ <Outlet />
137
+
138
+ // ❌ Wrong — inline content creates unwanted space when used for navigation
139
+ <IgrTabs>
140
+ <IgrTab label="Dashboard">
141
+ <p>This content will show and take up space!</p> {/* Don't do this for navigation */}
142
+ </IgrTab>
143
+ <IgrTab label="Orders">
144
+ <p>This content will show and take up space!</p> {/* Don't do this for navigation */}
145
+ </IgrTab>
146
+ </IgrTabs>
147
+ ```
@@ -0,0 +1,182 @@
1
+ ---
2
+ name: igniteui-react-customize-theme
3
+ description: This skill customizes Ignite UI for React component styling using CSS custom properties, Sass, and the full theming system and should be used when applying brand colors, dark mode, component-level overrides, or scoped themes in a React application
4
+ user-invocable: true
5
+ ---
6
+
7
+ # Ignite UI for React — Theming Skill
8
+
9
+ ## Description
10
+
11
+ This skill teaches AI agents how to theme Ignite UI for React applications. Two approaches are supported:
12
+
13
+ - **CSS custom properties** — works in any project without additional build tooling
14
+ - **Sass** — available when the project has Sass configured; provides the full palette/typography/elevation API
15
+
16
+ The skill also covers component-level theming, layout controls (spacing, sizing, roundness), and how to use the **Ignite UI Theming MCP server** for AI-assisted code generation — all in a React application context.
17
+
18
+ ## Example Usage
19
+
20
+ - "How do I change the primary color in my Ignite UI React app?"
21
+ - "Apply a dark theme to my React app"
22
+ - "Customize the grid header colors"
23
+ - "How do I scope a theme to a specific section of my React app?"
24
+ - "Set up Material Design theming for Ignite UI components"
25
+
26
+ ## Prerequisites
27
+
28
+ - A React project with `igniteui-react` installed
29
+ - A theme CSS file imported in your entry point (see [igniteui-react-components](../igniteui-react-components/SKILL.md))
30
+ - **Optional**: Sass configured in the project (enables the Sass-based theming API)
31
+ - **Optional**: The **Ignite UI Theming MCP server** (`igniteui-theming`) for AI-assisted code generation
32
+
33
+ ## Related Skills
34
+
35
+ - [igniteui-react-components](../igniteui-react-components/SKILL.md) — Choose the right components and set up your React project
36
+ - [igniteui-react-optimize-bundle-size](../igniteui-react-optimize-bundle-size/SKILL.md) — Optimize after theming
37
+
38
+ ## When to Use
39
+
40
+ - Applying custom brand colors or a dark theme to an Ignite UI React app
41
+ - Overriding individual component styles (e.g., grid header color, button appearance)
42
+ - Switching between light and dark mode in a React app
43
+ - Scoping different themes to different sections of a React app
44
+ - Setting up the Ignite UI Theming MCP server for AI-assisted theming
45
+
46
+ ---
47
+
48
+ ## Content Guide
49
+
50
+ This skill is organized into focused sections. Refer to the appropriate file for detailed instructions:
51
+
52
+ | Topic | File | When to Use |
53
+ |---|---|---|
54
+ | CSS Theming | [CSS-THEMING.md](./reference/CSS-THEMING.md) | Pre-built themes, CSS custom properties, scoped overrides, layout controls, light/dark switching |
55
+ | Sass Theming | [SASS-THEMING.md](./reference/SASS-THEMING.md) | Sass-based theming with palette(), component theme functions |
56
+ | MCP Server | [MCP-SERVER.md](./reference/MCP-SERVER.md) | AI-assisted theming code generation |
57
+ | Reveal Theme Sync | [REVEAL-THEME.md](./reference/REVEAL-THEME.md) | Syncing Reveal SDK dashboards with Ignite UI theme |
58
+ | Troubleshooting | [TROUBLESHOOTING.md](./reference/TROUBLESHOOTING.md) | Common issues and solutions |
59
+
60
+ ---
61
+
62
+ ## Quick Start
63
+
64
+ ### 1. Import a Pre-built Theme (REQUIRED)
65
+
66
+ ```tsx
67
+ // main.tsx
68
+ import 'igniteui-webcomponents/themes/light/bootstrap.css';
69
+ ```
70
+
71
+ **For grids**, also import:
72
+
73
+ ```tsx
74
+ import 'igniteui-react-grids/grids/themes/light/bootstrap.css';
75
+ ```
76
+
77
+ ### 2. Override with CSS Custom Properties
78
+
79
+ ```css
80
+ /* src/index.css */
81
+ :root {
82
+ --ig-primary-h: 211deg;
83
+ --ig-primary-s: 100%;
84
+ --ig-primary-l: 50%;
85
+ }
86
+ ```
87
+
88
+ ```tsx
89
+ // main.tsx
90
+ import 'igniteui-webcomponents/themes/light/bootstrap.css'; // Theme first
91
+ import './index.css'; // Overrides second
92
+ ```
93
+
94
+ ---
95
+
96
+ ## Theming Architecture
97
+
98
+ The Ignite UI theming system is built on four pillars:
99
+
100
+ | Concept | Purpose |
101
+ |---|---|
102
+ | **Palette** | Color system with primary, secondary, surface, gray, info, success, warn, error families |
103
+ | **Typography** | Font family, type scale (h1–h6, subtitle, body, button, caption, overline) |
104
+ | **Elevations** | Box-shadow levels 0–24 for visual depth |
105
+ | **Schema** | Per-component recipes mapping palette colors to component tokens |
106
+
107
+ ### Design Systems
108
+
109
+ - **Bootstrap** (default), **Material**, **Fluent**, **Indigo**
110
+ - Each has light and dark variants
111
+
112
+ ---
113
+
114
+ ## Key Concepts
115
+
116
+ ### CSS Custom Properties
117
+
118
+ Override tokens in your CSS:
119
+
120
+ ```css
121
+ :root { --ig-primary-h: 211deg; }
122
+ .admin-panel { --ig-primary-h: 260deg; }
123
+ ```
124
+
125
+ ### Component-Level Theming
126
+
127
+ Target web component tag names in CSS:
128
+
129
+ ```css
130
+ igc-button { --ig-button-foreground: var(--ig-secondary-500); }
131
+ ```
132
+
133
+ ### CSS `::part()` Selectors
134
+
135
+ ```css
136
+ igc-input::part(input) { font-size: 1.1rem; }
137
+ ```
138
+
139
+ ### Layout Controls
140
+
141
+ ```css
142
+ :root {
143
+ --ig-size: 2; /* 1=small, 2=medium, 3=large */
144
+ --ig-spacing: 1; /* 0.5=compact, 1=default, 2=spacious */
145
+ --ig-radius-factor: 1; /* 0=square, 1=max radius */
146
+ }
147
+ ```
148
+
149
+ ### Light/Dark Switching
150
+
151
+ See [CSS-THEMING.md](./reference/CSS-THEMING.md) for approaches: class toggle, media query, or stylesheet swap.
152
+
153
+ ---
154
+
155
+ ## Best Practices
156
+
157
+ 1. **Import theme CSS first**, then your custom overrides
158
+ 2. **Use palette tokens** (`var(--ig-primary-500)`) for all colors — never hardcode hex values
159
+ 3. **Use CSS custom properties on `:root`** for global theme adjustments
160
+ 4. **Scope overrides with CSS classes** for different sections
161
+ 5. **Use `::part()` selectors** to style shadow DOM internals
162
+ 6. **In CSS selectors, use web component tag names** (`igc-button`), not React names (`IgrButton`)
163
+ 7. **Test both light and dark themes**
164
+ 8. **Use the MCP server** for AI-assisted theme generation when available
165
+
166
+ ## Key Rules
167
+
168
+ 1. **Never overwrite existing files directly** — propose theme code as an update for user review
169
+ 2. **Always call `detect_platform` first** when using MCP tools
170
+ 3. **Always call `get_component_design_tokens` before `create_component_theme`**
171
+ 4. **Palette shades**: 50 = lightest, 900 = darkest
172
+ 5. **Surface color must match variant** — light color for `light`, dark for `dark`
173
+ 6. **Sass**: Use `@use 'igniteui-theming'` — not `igniteui-angular/theming`
174
+ 7. **Sass**: Component themes use `@include tokens($theme)` inside a selector
175
+ 8. **Never hardcode colors after palette generation**
176
+
177
+ ## Additional Resources
178
+
179
+ - [Ignite UI for React — Themes Overview](https://www.infragistics.com/products/ignite-ui-react/react/components/themes/overview)
180
+ - [igniteui-theming npm package](https://www.npmjs.com/package/igniteui-theming)
181
+ - [CSS Custom Properties on MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties)
182
+ - [CSS ::part() on MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/::part)