igniteui-theming 25.2.0 → 26.0.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/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 +1 -1
- package/sass/themes/components/chat/_chat-theme.scss +31 -13
- package/sass/themes/components/grid/_grid-theme.scss +11 -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
|
@@ -2091,8 +2091,12 @@
|
|
|
2091
2091
|
"description": "The background color of the chat header."
|
|
2092
2092
|
},
|
|
2093
2093
|
{
|
|
2094
|
-
"name": "message-background",
|
|
2095
|
-
"description": "The background color
|
|
2094
|
+
"name": "sent-message-background",
|
|
2095
|
+
"description": "The background color for sent messages."
|
|
2096
|
+
},
|
|
2097
|
+
{
|
|
2098
|
+
"name": "received-message-background",
|
|
2099
|
+
"description": "The background color for received messages."
|
|
2096
2100
|
}
|
|
2097
2101
|
],
|
|
2098
2102
|
"primaryTokensSummary": "Derived colors are auto-calculated for contrast.",
|
|
@@ -2105,7 +2109,7 @@
|
|
|
2105
2109
|
{
|
|
2106
2110
|
"name": "header-background",
|
|
2107
2111
|
"type": "Color",
|
|
2108
|
-
"description": "The background color of the chat header.
|
|
2112
|
+
"description": "The background color of the chat header."
|
|
2109
2113
|
},
|
|
2110
2114
|
{
|
|
2111
2115
|
"name": "header-color",
|
|
@@ -2118,19 +2122,34 @@
|
|
|
2118
2122
|
"description": "The color used for the chat header border."
|
|
2119
2123
|
},
|
|
2120
2124
|
{
|
|
2121
|
-
"name": "message-background",
|
|
2125
|
+
"name": "sent-message-background",
|
|
2122
2126
|
"type": "Color",
|
|
2123
|
-
"description": "The background color
|
|
2127
|
+
"description": "The background color for sent messages."
|
|
2124
2128
|
},
|
|
2125
2129
|
{
|
|
2126
|
-
"name": "message-color",
|
|
2130
|
+
"name": "sent-message-color",
|
|
2131
|
+
"type": "Color",
|
|
2132
|
+
"description": "The text color of the chat messages. Auto-derived from sent-message-background."
|
|
2133
|
+
},
|
|
2134
|
+
{
|
|
2135
|
+
"name": "received-message-background",
|
|
2127
2136
|
"type": "Color",
|
|
2128
|
-
"description": "The
|
|
2137
|
+
"description": "The background color for received messages."
|
|
2138
|
+
},
|
|
2139
|
+
{
|
|
2140
|
+
"name": "received-message-color",
|
|
2141
|
+
"type": "Color",
|
|
2142
|
+
"description": "The text color for received messages. Auto-derived from received-message-background."
|
|
2129
2143
|
},
|
|
2130
2144
|
{
|
|
2131
2145
|
"name": "message-actions-color",
|
|
2132
2146
|
"type": "Color",
|
|
2133
|
-
"description": "The icon color of the chat message actions. Auto-derived from message-color."
|
|
2147
|
+
"description": "The icon color of the chat received message actions. Auto-derived from received-message-color."
|
|
2148
|
+
},
|
|
2149
|
+
{
|
|
2150
|
+
"name": "message-border-radius",
|
|
2151
|
+
"type": "Number",
|
|
2152
|
+
"description": "The border radius of the chat messages."
|
|
2134
2153
|
},
|
|
2135
2154
|
{
|
|
2136
2155
|
"name": "file-background",
|
|
@@ -3201,47 +3220,38 @@
|
|
|
3201
3220
|
"description": "Grid Theme",
|
|
3202
3221
|
"primaryTokens": [
|
|
3203
3222
|
{
|
|
3204
|
-
"name": "
|
|
3205
|
-
"description": "
|
|
3206
|
-
},
|
|
3207
|
-
{
|
|
3208
|
-
"name": "content-background",
|
|
3209
|
-
"description": "The table body background color."
|
|
3210
|
-
},
|
|
3211
|
-
{
|
|
3212
|
-
"name": "ghost-header-background",
|
|
3213
|
-
"description": "The dragged header background color."
|
|
3223
|
+
"name": "background",
|
|
3224
|
+
"description": "Controls the overall background color of the grid, including header and content."
|
|
3214
3225
|
},
|
|
3215
3226
|
{
|
|
3216
|
-
"name": "
|
|
3217
|
-
"description": "
|
|
3227
|
+
"name": "foreground",
|
|
3228
|
+
"description": "Controls the overall foreground color of the grid, including text and icons."
|
|
3218
3229
|
},
|
|
3219
3230
|
{
|
|
3220
|
-
"name": "
|
|
3221
|
-
"description": "
|
|
3231
|
+
"name": "accent-color",
|
|
3232
|
+
"description": "Controls the accent color used for interactive elements in the grid."
|
|
3222
3233
|
}
|
|
3223
3234
|
],
|
|
3224
|
-
"primaryTokensSummary": "Derived colors are auto-calculated for contrast.",
|
|
3225
3235
|
"tokens": [
|
|
3226
3236
|
{
|
|
3227
3237
|
"name": "background",
|
|
3228
3238
|
"type": "Color",
|
|
3229
|
-
"description": "The background color of the grid.
|
|
3239
|
+
"description": "The background color of the grid."
|
|
3230
3240
|
},
|
|
3231
3241
|
{
|
|
3232
3242
|
"name": "foreground",
|
|
3233
3243
|
"type": "Color",
|
|
3234
|
-
"description": "The foreground color of the grid.
|
|
3244
|
+
"description": "The foreground color of the grid."
|
|
3235
3245
|
},
|
|
3236
3246
|
{
|
|
3237
3247
|
"name": "accent-color",
|
|
3238
3248
|
"type": "Color",
|
|
3239
|
-
"description": "The accent color used for interactive elements in the grid.
|
|
3249
|
+
"description": "The accent color used for interactive elements in the grid."
|
|
3240
3250
|
},
|
|
3241
3251
|
{
|
|
3242
3252
|
"name": "header-background",
|
|
3243
3253
|
"type": "Color",
|
|
3244
|
-
"description": "The table header background color
|
|
3254
|
+
"description": "The table header background color - derives header-text-color, header-border-color, and many more."
|
|
3245
3255
|
},
|
|
3246
3256
|
{
|
|
3247
3257
|
"name": "header-text-color",
|
|
@@ -3286,7 +3296,7 @@
|
|
|
3286
3296
|
{
|
|
3287
3297
|
"name": "content-background",
|
|
3288
3298
|
"type": "Color",
|
|
3289
|
-
"description": "The table body background color
|
|
3299
|
+
"description": "The table body background color - derives content-text-color, row backgrounds, cell backgrounds, borders."
|
|
3290
3300
|
},
|
|
3291
3301
|
{
|
|
3292
3302
|
"name": "content-text-color",
|
|
@@ -3306,7 +3316,7 @@
|
|
|
3306
3316
|
{
|
|
3307
3317
|
"name": "ghost-header-background",
|
|
3308
3318
|
"type": "Color",
|
|
3309
|
-
"description": "The dragged header background color
|
|
3319
|
+
"description": "The dragged header background color - derives ghost-header-text-color, ghost-header-icon-color."
|
|
3310
3320
|
},
|
|
3311
3321
|
{
|
|
3312
3322
|
"name": "row-odd-background",
|
|
@@ -3456,7 +3466,7 @@
|
|
|
3456
3466
|
{
|
|
3457
3467
|
"name": "grouparea-background",
|
|
3458
3468
|
"type": "Color",
|
|
3459
|
-
"description": "The grid group area background color
|
|
3469
|
+
"description": "The grid group area background color - derives grouparea-color, drop-area-background. Auto-derived from header-background."
|
|
3460
3470
|
},
|
|
3461
3471
|
{
|
|
3462
3472
|
"name": "grouparea-color",
|
|
@@ -3466,7 +3476,7 @@
|
|
|
3466
3476
|
{
|
|
3467
3477
|
"name": "group-row-background",
|
|
3468
3478
|
"type": "Color",
|
|
3469
|
-
"description": "The grid group row background color
|
|
3479
|
+
"description": "The grid group row background color - derives expand-icon-color, group-row-selected-background, group-label-text, group-count-background. Auto-derived from header-background."
|
|
3470
3480
|
},
|
|
3471
3481
|
{
|
|
3472
3482
|
"name": "group-row-selected-background",
|
|
@@ -5309,7 +5319,7 @@
|
|
|
5309
5319
|
"primaryTokens": [],
|
|
5310
5320
|
"tokens": [
|
|
5311
5321
|
{
|
|
5312
|
-
"name": "
|
|
5322
|
+
"name": "track-color",
|
|
5313
5323
|
"type": "Color",
|
|
5314
5324
|
"description": "The base circle fill color."
|
|
5315
5325
|
},
|
|
@@ -114,26 +114,27 @@ function formatCssOutput(css, description) {
|
|
|
114
114
|
* // result.css contains: igc-button { --ig-button-background: var(--ig-button-background, #1976d2); ... }
|
|
115
115
|
*/
|
|
116
116
|
async function generateComponentThemeCss(options) {
|
|
117
|
-
const { getComponentTheme,
|
|
117
|
+
const { COMPONENT_METADATA, getComponentTheme, getThemingSelector, SCHEMA_PRESETS } = await import("../knowledge/index.js");
|
|
118
118
|
const { toVariableName } = await import("../utils/sass.js");
|
|
119
119
|
const theme = getComponentTheme(options.component);
|
|
120
120
|
if (!theme) throw new Error(`Unknown component: ${options.component}`);
|
|
121
121
|
const designSystem = options.designSystem ?? "material";
|
|
122
122
|
const variant = options.variant ?? "light";
|
|
123
123
|
const themeFn = theme.themeFunctionName;
|
|
124
|
-
const
|
|
124
|
+
const themeComponentName = COMPONENT_METADATA[options.component]?.childOf ?? options.component;
|
|
125
|
+
const themeName = options.name ? `$${toVariableName(options.name)}` : `$custom-${themeComponentName}-theme`;
|
|
125
126
|
const tokenArgs = [`$schema: ${SCHEMA_PRESETS[variant][designSystem]}`];
|
|
126
127
|
for (const [tokenName, value] of Object.entries(options.tokens)) {
|
|
127
128
|
const stringValue = typeof value === "number" ? String(value) : value;
|
|
128
129
|
tokenArgs.push(`$${tokenName}: ${stringValue}`);
|
|
129
130
|
}
|
|
130
|
-
const defaultSelectors =
|
|
131
|
+
const defaultSelectors = getThemingSelector(options.component, options.platform);
|
|
131
132
|
const selector = options.selector || (defaultSelectors.length > 0 ? defaultSelectors[0] : options.component);
|
|
132
133
|
const sassCode = `
|
|
133
134
|
@use 'igniteui-theming/sass/themes' as *;
|
|
134
135
|
@use 'igniteui-theming/sass/themes/schemas' as *;
|
|
135
136
|
|
|
136
|
-
// Custom ${
|
|
137
|
+
// Custom ${themeComponentName} theme
|
|
137
138
|
${themeName}: ${themeFn}(
|
|
138
139
|
${tokenArgs.join(",\n ")}
|
|
139
140
|
);
|
|
@@ -150,7 +151,7 @@ ${selector} {
|
|
|
150
151
|
importers,
|
|
151
152
|
style: "expanded"
|
|
152
153
|
})).css,
|
|
153
|
-
description: `Generated CSS custom properties for ${
|
|
154
|
+
description: `Generated CSS custom properties for ${themeComponentName} component with ${Object.keys(options.tokens).length} token(s) using ${designSystem} design system (${variant} variant)`
|
|
154
155
|
};
|
|
155
156
|
} catch (error) {
|
|
156
157
|
const message = error instanceof Error ? error.message : String(error);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { COMPONENT_METADATA, getThemingSelector } from "../knowledge/component-metadata.js";
|
|
2
2
|
import { getComponentTheme } from "../knowledge/component-themes.js";
|
|
3
3
|
import { SCHEMAS } from "../knowledge/platforms/common.js";
|
|
4
4
|
import { generateWebComponentsThemeSass } from "../knowledge/platforms/webcomponents.js";
|
|
@@ -236,19 +236,20 @@ function generateComponentTheme(input) {
|
|
|
236
236
|
const designSystem = input.designSystem ?? "material";
|
|
237
237
|
const variant = input.variant ?? "light";
|
|
238
238
|
const themeFn = theme.themeFunctionName;
|
|
239
|
-
const
|
|
239
|
+
const themeComponentName = COMPONENT_METADATA[input.component]?.childOf ?? input.component;
|
|
240
|
+
const themeName = input.name ? `$${toVariableName(input.name)}` : `$custom-${themeComponentName}-theme`;
|
|
240
241
|
const tokenArgs = [`$schema: ${SCHEMAS[variant][designSystem]}`];
|
|
241
242
|
for (const [tokenName, value] of Object.entries(input.tokens)) {
|
|
242
243
|
const stringValue = typeof value === "number" ? String(value) : value;
|
|
243
244
|
tokenArgs.push(`$${tokenName}: ${stringValue}`);
|
|
244
245
|
}
|
|
245
|
-
const defaultSelectors =
|
|
246
|
+
const defaultSelectors = getThemingSelector(input.component, input.platform);
|
|
246
247
|
const selector = input.selector || (defaultSelectors.length > 0 ? defaultSelectors[0] : input.component);
|
|
247
248
|
const sections = [
|
|
248
|
-
generateHeader(`Custom ${
|
|
249
|
+
generateHeader(`Custom ${themeComponentName} theme`),
|
|
249
250
|
generateUseStatement(input.platform, input.licensed),
|
|
250
251
|
"",
|
|
251
|
-
`// Custom ${
|
|
252
|
+
`// Custom ${themeComponentName} theme`,
|
|
252
253
|
`${themeName}: ${themeFn}(`
|
|
253
254
|
];
|
|
254
255
|
if (tokenArgs.length > 0) sections.push(` ${tokenArgs.join(",\n ")}`);
|
|
@@ -260,7 +261,7 @@ function generateComponentTheme(input) {
|
|
|
260
261
|
sections.push("}");
|
|
261
262
|
return {
|
|
262
263
|
code: `${sections.join("\n")}\n`,
|
|
263
|
-
description: `Generated custom ${
|
|
264
|
+
description: `Generated custom ${themeComponentName} theme with ${Object.keys(input.tokens).length} token(s) using ${designSystem} design system (${variant} variant)`,
|
|
264
265
|
variables: [themeName]
|
|
265
266
|
};
|
|
266
267
|
}
|
package/dist/mcp/index.js
CHANGED
|
@@ -33,7 +33,7 @@ import { z } from "zod";
|
|
|
33
33
|
function createServer() {
|
|
34
34
|
const server = new McpServer({
|
|
35
35
|
name: "igniteui-theming",
|
|
36
|
-
version: "
|
|
36
|
+
version: "v26.0.0",
|
|
37
37
|
description: "Generate Sass theming code for Ignite UI components - create palettes, typography, elevations, and complete themes"
|
|
38
38
|
});
|
|
39
39
|
registerTools(server);
|
|
@@ -20,13 +20,6 @@ export interface TokenDerivation {
|
|
|
20
20
|
/** Optional transform arguments (e.g., shade amount for dynamic-shade) */
|
|
21
21
|
args?: Record<string, string | number>;
|
|
22
22
|
}
|
|
23
|
-
/**
|
|
24
|
-
* Platform-specific selector(s) for a named scope.
|
|
25
|
-
*/
|
|
26
|
-
export interface ScopeSelectors {
|
|
27
|
-
angular?: string | string[];
|
|
28
|
-
webcomponents?: string | string[];
|
|
29
|
-
}
|
|
30
23
|
/**
|
|
31
24
|
* Information about a compound component (one that contains multiple themeable sub-components).
|
|
32
25
|
*/
|
|
@@ -35,26 +28,25 @@ export interface CompoundInfo {
|
|
|
35
28
|
description: string;
|
|
36
29
|
/** Related theme functions needed for full customization */
|
|
37
30
|
relatedThemes: string[];
|
|
38
|
-
/**
|
|
39
|
-
* Non-inline scopes (e.g., overlay). Inline scope is always derived from base selectors.
|
|
40
|
-
* Most compounds won't have this field.
|
|
41
|
-
*/
|
|
42
|
-
additionalScopes?: Record<string, ScopeSelectors>;
|
|
43
|
-
/** Maps child theme name to a scope name per platform. Values: 'inline' or a key in additionalScopes */
|
|
44
|
-
childScopes?: Record<string, {
|
|
45
|
-
angular?: string;
|
|
46
|
-
webcomponents?: string;
|
|
47
|
-
}>;
|
|
48
31
|
/** Token derivation rules. Key: 'childTheme.childToken' */
|
|
49
32
|
tokenDerivations?: Record<string, TokenDerivation>;
|
|
50
33
|
/** Free-form guidance for edge cases */
|
|
51
34
|
guidance?: string;
|
|
35
|
+
/**
|
|
36
|
+
* When true, the framework internally generates themes for relatedThemes from the parent's primary tokens
|
|
37
|
+
* LLMs should NOT generate separate child themes for relatedThemes.
|
|
38
|
+
*/
|
|
39
|
+
composed?: boolean;
|
|
52
40
|
}
|
|
53
41
|
export interface ComponentMetadata {
|
|
54
|
-
/** Platform-specific CSS selectors */
|
|
55
|
-
selectors
|
|
42
|
+
/** Platform-specific CSS selectors. Optional for `childOf` entries (theming scope comes from the parent). */
|
|
43
|
+
selectors?: ComponentSelectors;
|
|
56
44
|
/** Optional theme alias for components that reuse another component theme */
|
|
57
45
|
theme?: string;
|
|
46
|
+
/** Optional synonym aliases for search (synonyms only, not word-order permutations). */
|
|
47
|
+
aliases?: string[];
|
|
48
|
+
/** Parent component name for child sub-components. When set, theming scope uses the parent's selector instead of the child's own. Mutually exclusive with `compound`. */
|
|
49
|
+
childOf?: string;
|
|
58
50
|
/** Present only for components with variant-specific themes (e.g., button) */
|
|
59
51
|
variants?: string[];
|
|
60
52
|
/** Present only for compound components */
|
|
@@ -72,6 +64,15 @@ export declare const VARIANT_THEME_NAMES: Set<string>;
|
|
|
72
64
|
* @returns Array of selectors (normalized to always return array), empty array if component not found or not available on platform
|
|
73
65
|
*/
|
|
74
66
|
export declare function getComponentSelector(componentName: string, platform: Platform): string[];
|
|
67
|
+
/**
|
|
68
|
+
* Get the selector(s) to use for theming scope.
|
|
69
|
+
* For child components (with `childOf`), returns the parent's selectors.
|
|
70
|
+
* For all other components, returns the component's own selectors.
|
|
71
|
+
* @param componentName - The component name
|
|
72
|
+
* @param platform - The target platform
|
|
73
|
+
* @returns Array of selectors for theming scope, empty array if not found
|
|
74
|
+
*/
|
|
75
|
+
export declare function getThemingSelector(componentName: string, platform: Platform): string[];
|
|
75
76
|
/**
|
|
76
77
|
* Check if a component is available on a specific platform.
|
|
77
78
|
* @param componentName - The component name
|
|
@@ -16,18 +16,16 @@ var GRID_COMPOUND_INFO = {
|
|
|
16
16
|
"flat-icon-button",
|
|
17
17
|
"outlined-icon-button"
|
|
18
18
|
],
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
input-group (filtering), outlined-button/icon-button (toolbar actions), checkbox (row selection), \
|
|
22
|
-
and paginator. The grid-summary and grid-toolbar themes control their respective areas. \
|
|
23
|
-
Detailed token derivation rules are not yet available for the grid — use the token names \
|
|
24
|
-
and descriptions from get_component_design_tokens for each child to guide value selection.`
|
|
19
|
+
composed: true,
|
|
20
|
+
guidance: `The grid's theme will automatically derive the related themes for all related child components.`
|
|
25
21
|
};
|
|
26
22
|
var COMPONENT_METADATA = {
|
|
27
23
|
accordion: { selectors: {
|
|
28
24
|
angular: "igx-accordion",
|
|
29
25
|
webcomponents: "igc-accordion"
|
|
30
26
|
} },
|
|
27
|
+
"accordion-body": { childOf: "accordion" },
|
|
28
|
+
"accordion-header": { childOf: "accordion" },
|
|
31
29
|
"action-strip": { selectors: {
|
|
32
30
|
angular: "igx-action-strip",
|
|
33
31
|
webcomponents: null
|
|
@@ -133,6 +131,9 @@ If customizing the banner background, ensure flat-button foreground contrasts ag
|
|
|
133
131
|
For the icon theme, the color should also coordinate with the card background while maintaining sufficient contrast.`
|
|
134
132
|
}
|
|
135
133
|
},
|
|
134
|
+
"card-actions": { childOf: "card" },
|
|
135
|
+
"card-content": { childOf: "card" },
|
|
136
|
+
"card-header": { childOf: "card" },
|
|
136
137
|
carousel: { selectors: {
|
|
137
138
|
angular: "igx-carousel",
|
|
138
139
|
webcomponents: "igc-carousel"
|
|
@@ -180,6 +181,7 @@ If customizing the banner background, ensure flat-button foreground contrasts ag
|
|
|
180
181
|
angular: "igx-combo",
|
|
181
182
|
webcomponents: "igc-combo"
|
|
182
183
|
},
|
|
184
|
+
aliases: ["combobox", "autocomplete"],
|
|
183
185
|
compound: {
|
|
184
186
|
description: "The combo component combines input, drop-down, and checkbox components.",
|
|
185
187
|
relatedThemes: [
|
|
@@ -205,15 +207,6 @@ If customizing the banner background, ensure flat-button foreground contrasts ag
|
|
|
205
207
|
transform: "identity"
|
|
206
208
|
}
|
|
207
209
|
},
|
|
208
|
-
additionalScopes: {
|
|
209
|
-
overlay: { angular: ".igx-drop-down__list" },
|
|
210
|
-
input: { angular: "igx-combo, .igx-drop-down__list" }
|
|
211
|
-
},
|
|
212
|
-
childScopes: {
|
|
213
|
-
"drop-down": { angular: "overlay" },
|
|
214
|
-
checkbox: { angular: "overlay" },
|
|
215
|
-
"input-group": { angular: "input" }
|
|
216
|
-
},
|
|
217
210
|
guidance: "The combo's input-group, drop-down, and checkbox should share a consistent color scheme."
|
|
218
211
|
}
|
|
219
212
|
},
|
|
@@ -235,8 +228,6 @@ If customizing the banner background, ensure flat-button foreground contrasts ag
|
|
|
235
228
|
transform: "identity"
|
|
236
229
|
}
|
|
237
230
|
},
|
|
238
|
-
additionalScopes: { overlay: { angular: ".igx-drop-down__list" } },
|
|
239
|
-
childScopes: { "drop-down": { angular: "overlay" } },
|
|
240
231
|
guidance: "The simple-combo's input-group and drop-down should share a consistent color scheme."
|
|
241
232
|
}
|
|
242
233
|
},
|
|
@@ -252,12 +243,6 @@ If customizing the banner background, ensure flat-button foreground contrasts ag
|
|
|
252
243
|
"input-group",
|
|
253
244
|
"calendar"
|
|
254
245
|
],
|
|
255
|
-
additionalScopes: { overlay: { angular: ".igx-date-picker" } },
|
|
256
|
-
childScopes: {
|
|
257
|
-
calendar: { angular: "overlay" },
|
|
258
|
-
"flat-button": { angular: "overlay" },
|
|
259
|
-
"input-group": { angular: "inline" }
|
|
260
|
-
},
|
|
261
246
|
tokenDerivations: { "flat-button.foreground": {
|
|
262
247
|
from: "calendar.content-background",
|
|
263
248
|
transform: "adaptive-contrast"
|
|
@@ -277,12 +262,6 @@ If customizing the banner background, ensure flat-button foreground contrasts ag
|
|
|
277
262
|
"input-group",
|
|
278
263
|
"calendar"
|
|
279
264
|
],
|
|
280
|
-
additionalScopes: { overlay: { angular: ".igx-date-picker" } },
|
|
281
|
-
childScopes: {
|
|
282
|
-
calendar: { angular: "overlay" },
|
|
283
|
-
"flat-button": { angular: "overlay" },
|
|
284
|
-
"input-group": { angular: "inline" }
|
|
285
|
-
},
|
|
286
265
|
tokenDerivations: { "flat-button.foreground": {
|
|
287
266
|
from: "calendar.content-background",
|
|
288
267
|
transform: "adaptive-contrast"
|
|
@@ -304,15 +283,19 @@ If customizing the banner background, ensure flat-button foreground contrasts ag
|
|
|
304
283
|
},
|
|
305
284
|
theme: "input-group"
|
|
306
285
|
},
|
|
307
|
-
"date-time-input": {
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
286
|
+
"date-time-input": {
|
|
287
|
+
selectors: {
|
|
288
|
+
angular: null,
|
|
289
|
+
webcomponents: "igc-date-time-input"
|
|
290
|
+
},
|
|
291
|
+
aliases: ["datetime input", "date time input"]
|
|
292
|
+
},
|
|
311
293
|
dialog: {
|
|
312
294
|
selectors: {
|
|
313
295
|
angular: ".igx-dialog",
|
|
314
296
|
webcomponents: "igc-dialog"
|
|
315
297
|
},
|
|
298
|
+
aliases: ["modal", "popup"],
|
|
316
299
|
compound: {
|
|
317
300
|
description: "The dialog component uses flat-buttons for the actions",
|
|
318
301
|
relatedThemes: ["flat-button"],
|
|
@@ -332,14 +315,20 @@ If customizing the dialog background, ensure flat-button foreground contrasts ag
|
|
|
332
315
|
angular: "igc-dockmanager",
|
|
333
316
|
webcomponents: "igc-dockmanager"
|
|
334
317
|
} },
|
|
335
|
-
"drop-down": {
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
318
|
+
"drop-down": {
|
|
319
|
+
selectors: {
|
|
320
|
+
angular: ".igx-drop-down__list",
|
|
321
|
+
webcomponents: "igc-dropdown"
|
|
322
|
+
},
|
|
323
|
+
aliases: ["dropdown menu"]
|
|
324
|
+
},
|
|
325
|
+
"drop-down-item": { childOf: "drop-down" },
|
|
339
326
|
"expansion-panel": { selectors: {
|
|
340
327
|
angular: "igx-expansion-panel",
|
|
341
328
|
webcomponents: "igc-expansion-panel"
|
|
342
329
|
} },
|
|
330
|
+
"expansion-panel-body": { childOf: "expansion-panel" },
|
|
331
|
+
"expansion-panel-header": { childOf: "expansion-panel" },
|
|
343
332
|
"file-input": {
|
|
344
333
|
selectors: {
|
|
345
334
|
angular: "igx-input-group[class~=\"igx-input-group--file\"]",
|
|
@@ -430,6 +419,8 @@ Both themes should share the same visual treatment as the file-input wrapper.`
|
|
|
430
419
|
angular: "igx-list",
|
|
431
420
|
webcomponents: "igc-list"
|
|
432
421
|
} },
|
|
422
|
+
"list-header": { childOf: "list" },
|
|
423
|
+
"list-item": { childOf: "list" },
|
|
433
424
|
navbar: {
|
|
434
425
|
selectors: {
|
|
435
426
|
angular: "igx-navbar",
|
|
@@ -448,10 +439,21 @@ Both themes should share the same visual treatment as the file-input wrapper.`
|
|
|
448
439
|
guidance: "Make sure to theme all button and icon-button variants in the navbar to visually coordinate with the navbar background."
|
|
449
440
|
}
|
|
450
441
|
},
|
|
451
|
-
navdrawer: {
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
442
|
+
navdrawer: {
|
|
443
|
+
selectors: {
|
|
444
|
+
angular: "igx-nav-drawer",
|
|
445
|
+
webcomponents: "igc-nav-drawer"
|
|
446
|
+
},
|
|
447
|
+
aliases: [
|
|
448
|
+
"drawer",
|
|
449
|
+
"side drawer",
|
|
450
|
+
"side nav",
|
|
451
|
+
"sidenav",
|
|
452
|
+
"navigation drawer",
|
|
453
|
+
"navigation panel"
|
|
454
|
+
]
|
|
455
|
+
},
|
|
456
|
+
"nav-drawer-item": { childOf: "navdrawer" },
|
|
455
457
|
overlay: { selectors: {
|
|
456
458
|
angular: ".igx-overlay__content",
|
|
457
459
|
webcomponents: null
|
|
@@ -461,6 +463,7 @@ Both themes should share the same visual treatment as the file-input wrapper.`
|
|
|
461
463
|
angular: "igx-paginator",
|
|
462
464
|
webcomponents: "igc-paginator"
|
|
463
465
|
},
|
|
466
|
+
aliases: ["pagination", "pager"],
|
|
464
467
|
compound: {
|
|
465
468
|
description: "The paginator uses combo and flat-icon-buttons for the page controls.",
|
|
466
469
|
relatedThemes: ["combo", "flat-icon-button"],
|
|
@@ -486,19 +489,34 @@ Detailed token derivation rules are not yet available — use the token names \
|
|
|
486
489
|
and descriptions from get_component_design_tokens for each child to guide value selection.`
|
|
487
490
|
}
|
|
488
491
|
},
|
|
489
|
-
"progress-circular": {
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
492
|
+
"progress-circular": {
|
|
493
|
+
selectors: {
|
|
494
|
+
angular: "igx-circular-bar",
|
|
495
|
+
webcomponents: "igc-circular-progress"
|
|
496
|
+
},
|
|
497
|
+
aliases: [
|
|
498
|
+
"spinner",
|
|
499
|
+
"circular loader",
|
|
500
|
+
"loading spinner"
|
|
501
|
+
]
|
|
502
|
+
},
|
|
503
|
+
"progress-linear": {
|
|
504
|
+
selectors: {
|
|
505
|
+
angular: "igx-linear-bar",
|
|
506
|
+
webcomponents: "igc-linear-progress"
|
|
507
|
+
},
|
|
508
|
+
aliases: [
|
|
509
|
+
"progress-bar",
|
|
510
|
+
"loading bar",
|
|
511
|
+
"linear loader"
|
|
512
|
+
]
|
|
513
|
+
},
|
|
497
514
|
"query-builder": {
|
|
498
515
|
selectors: {
|
|
499
516
|
angular: "igx-query-builder",
|
|
500
517
|
webcomponents: null
|
|
501
518
|
},
|
|
519
|
+
aliases: ["filter builder"],
|
|
502
520
|
compound: {
|
|
503
521
|
description: "The query builder uses inputs, dropdowns, chips, buttons and button-groups for building query expressions.",
|
|
504
522
|
relatedThemes: [
|
|
@@ -519,10 +537,13 @@ chips for displaying conditions, and buttons/button-groups for adding and groupi
|
|
|
519
537
|
angular: "igx-radio",
|
|
520
538
|
webcomponents: "igc-radio"
|
|
521
539
|
} },
|
|
522
|
-
rating: {
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
540
|
+
rating: {
|
|
541
|
+
selectors: {
|
|
542
|
+
angular: "igc-rating",
|
|
543
|
+
webcomponents: "igc-rating"
|
|
544
|
+
},
|
|
545
|
+
aliases: ["star rating"]
|
|
546
|
+
},
|
|
526
547
|
ripple: { selectors: {
|
|
527
548
|
angular: "igx-ripple",
|
|
528
549
|
webcomponents: "igc-ripple"
|
|
@@ -536,11 +557,10 @@ chips for displaying conditions, and buttons/button-groups for adding and groupi
|
|
|
536
557
|
angular: "igx-select",
|
|
537
558
|
webcomponents: "igc-select"
|
|
538
559
|
},
|
|
560
|
+
aliases: ["select box"],
|
|
539
561
|
compound: {
|
|
540
562
|
description: "The select component combines input-group and drop-down components.",
|
|
541
563
|
relatedThemes: ["input-group", "drop-down"],
|
|
542
|
-
additionalScopes: { overlay: { angular: ".igx-drop-down__list" } },
|
|
543
|
-
childScopes: { "drop-down": { angular: "overlay" } },
|
|
544
564
|
tokenDerivations: {
|
|
545
565
|
"input-group.focused-border-color": {
|
|
546
566
|
from: "select.toggle-button-background",
|
|
@@ -567,18 +587,23 @@ The drop-down background should match the select surface intent.`
|
|
|
567
587
|
angular: "igx-splitter",
|
|
568
588
|
webcomponents: "igc-splitter"
|
|
569
589
|
} },
|
|
590
|
+
step: { childOf: "stepper" },
|
|
570
591
|
stepper: { selectors: {
|
|
571
592
|
angular: "igx-stepper",
|
|
572
593
|
webcomponents: "igc-stepper"
|
|
573
594
|
} },
|
|
574
|
-
switch: {
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
595
|
+
switch: {
|
|
596
|
+
selectors: {
|
|
597
|
+
angular: "igx-switch",
|
|
598
|
+
webcomponents: "igc-switch"
|
|
599
|
+
},
|
|
600
|
+
aliases: ["toggle"]
|
|
601
|
+
},
|
|
578
602
|
tabs: { selectors: {
|
|
579
603
|
angular: "igx-tabs",
|
|
580
604
|
webcomponents: "igc-tabs"
|
|
581
605
|
} },
|
|
606
|
+
"tab-item": { childOf: "tabs" },
|
|
582
607
|
"time-picker": {
|
|
583
608
|
selectors: {
|
|
584
609
|
angular: "igx-time-picker",
|
|
@@ -591,11 +616,6 @@ The drop-down background should match the select surface intent.`
|
|
|
591
616
|
"time-picker",
|
|
592
617
|
"flat-button"
|
|
593
618
|
],
|
|
594
|
-
additionalScopes: { overlay: { angular: ".igx-time-picker" } },
|
|
595
|
-
childScopes: {
|
|
596
|
-
"time-picker": { angular: "overlay" },
|
|
597
|
-
"flat-button": { angular: "overlay" }
|
|
598
|
-
},
|
|
599
619
|
guidance: `The time-picker input-group and the time-picker dial should share a consistent color scheme. \
|
|
600
620
|
The input-group text color should coordinate with the time-picker header.`
|
|
601
621
|
}
|
|
@@ -634,11 +654,26 @@ new Set(Object.values(COMPONENT_METADATA).filter((m) => m.variants).flatMap((m)
|
|
|
634
654
|
function getComponentSelector(componentName, platform) {
|
|
635
655
|
const metadata = COMPONENT_METADATA[componentName];
|
|
636
656
|
if (!metadata) return [];
|
|
657
|
+
if (!metadata.selectors) return [];
|
|
637
658
|
const platformSelectors = platform === "angular" ? metadata.selectors.angular : metadata.selectors.webcomponents;
|
|
638
659
|
if (platformSelectors === null) return [];
|
|
639
660
|
return Array.isArray(platformSelectors) ? platformSelectors : [platformSelectors];
|
|
640
661
|
}
|
|
641
662
|
/**
|
|
663
|
+
* Get the selector(s) to use for theming scope.
|
|
664
|
+
* For child components (with `childOf`), returns the parent's selectors.
|
|
665
|
+
* For all other components, returns the component's own selectors.
|
|
666
|
+
* @param componentName - The component name
|
|
667
|
+
* @param platform - The target platform
|
|
668
|
+
* @returns Array of selectors for theming scope, empty array if not found
|
|
669
|
+
*/
|
|
670
|
+
function getThemingSelector(componentName, platform) {
|
|
671
|
+
const metadata = COMPONENT_METADATA[componentName];
|
|
672
|
+
if (!metadata) return [];
|
|
673
|
+
if (metadata.childOf) return getComponentSelector(metadata.childOf, platform);
|
|
674
|
+
return getComponentSelector(componentName, platform);
|
|
675
|
+
}
|
|
676
|
+
/**
|
|
642
677
|
* Check if a component is available on a specific platform.
|
|
643
678
|
* @param componentName - The component name
|
|
644
679
|
* @param platform - The target platform ('angular' or 'webcomponents')
|
|
@@ -646,7 +681,7 @@ function getComponentSelector(componentName, platform) {
|
|
|
646
681
|
*/
|
|
647
682
|
function isComponentAvailable(componentName, platform) {
|
|
648
683
|
const metadata = COMPONENT_METADATA[componentName];
|
|
649
|
-
if (!metadata) return false;
|
|
684
|
+
if (!metadata?.selectors) return false;
|
|
650
685
|
return (platform === "angular" ? metadata.selectors.angular : metadata.selectors.webcomponents) !== null;
|
|
651
686
|
}
|
|
652
687
|
/**
|
|
@@ -656,7 +691,7 @@ function isComponentAvailable(componentName, platform) {
|
|
|
656
691
|
*/
|
|
657
692
|
function getComponentPlatformAvailability(componentName) {
|
|
658
693
|
const metadata = COMPONENT_METADATA[componentName];
|
|
659
|
-
if (!metadata) return;
|
|
694
|
+
if (!metadata?.selectors) return;
|
|
660
695
|
return {
|
|
661
696
|
angular: metadata.selectors.angular !== null,
|
|
662
697
|
webcomponents: metadata.selectors.webcomponents !== null
|
|
@@ -712,4 +747,4 @@ function getTokenDerivationsForChild(compoundName, childThemeName) {
|
|
|
712
747
|
return result;
|
|
713
748
|
}
|
|
714
749
|
//#endregion
|
|
715
|
-
export { COMPONENT_METADATA, getComponentPlatformAvailability, getComponentSelector, getCompoundComponentInfo, getTokenDerivationsForChild, getVariants, hasVariants, isComponentAvailable, isCompoundComponent };
|
|
750
|
+
export { COMPONENT_METADATA, getComponentPlatformAvailability, getComponentSelector, getCompoundComponentInfo, getThemingSelector, getTokenDerivationsForChild, getVariants, hasVariants, isComponentAvailable, isCompoundComponent };
|