igniteui-theming 25.1.0 → 25.2.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/index.d.ts +75 -0
- package/dist/index.js +12 -0
- package/dist/json/components/bootstrap.json +1 -0
- package/dist/json/components/fluent.json +1 -0
- package/dist/json/components/indigo.json +1 -0
- package/dist/json/components/material.json +1 -0
- package/{json → dist/json}/components/themes.json +31 -1
- package/dist/mcp/generators/css.d.ts +7 -4
- package/dist/mcp/generators/css.js +129 -104
- package/dist/mcp/generators/sass.js +227 -254
- package/dist/mcp/index.js +259 -323
- package/dist/mcp/knowledge/color-usage.js +524 -502
- package/dist/mcp/knowledge/colors.js +61 -50
- package/dist/mcp/knowledge/component-metadata.js +697 -598
- package/dist/mcp/knowledge/component-themes.js +70 -57
- package/dist/mcp/knowledge/custom-palettes.js +4 -9
- package/dist/mcp/knowledge/docs/colors/guidance.js +4 -0
- package/dist/mcp/knowledge/docs/colors/usage.js +4 -0
- package/dist/mcp/knowledge/docs/layout/functions/border-radius.js +4 -0
- package/dist/mcp/knowledge/docs/layout/functions/pad.js +4 -0
- package/dist/mcp/knowledge/docs/layout/functions/sizable.js +4 -0
- package/dist/mcp/knowledge/docs/layout/mixins/sizable.js +4 -0
- package/dist/mcp/knowledge/docs/layout/mixins/sizing.js +4 -0
- package/dist/mcp/knowledge/docs/layout/mixins/spacing.js +4 -0
- package/dist/mcp/knowledge/docs/layout/overview.js +4 -0
- package/dist/mcp/knowledge/docs/setup/platform.js +4 -0
- package/dist/mcp/knowledge/elevations.d.ts +1 -1
- package/dist/mcp/knowledge/elevations.js +26 -12
- package/dist/mcp/knowledge/index.js +23 -87
- package/dist/mcp/knowledge/layout-docs.d.ts +1 -1
- package/dist/mcp/knowledge/multipliers.js +5 -0
- package/dist/mcp/knowledge/palettes.js +29 -17
- package/dist/mcp/knowledge/platforms/angular.js +98 -120
- package/dist/mcp/knowledge/platforms/blazor.js +39 -34
- package/dist/mcp/knowledge/platforms/common.js +83 -68
- package/dist/mcp/knowledge/platforms/index.js +265 -242
- package/dist/mcp/knowledge/platforms/react.js +43 -35
- package/dist/mcp/knowledge/platforms/webcomponents.js +266 -292
- package/dist/mcp/knowledge/sass-api.js +1 -0
- package/dist/mcp/knowledge/typography.js +13 -5
- package/dist/mcp/resources/index.js +1 -0
- package/dist/mcp/resources/presets.js +409 -508
- package/dist/mcp/theming/dist/json/colors/meta/multipliers.js +50 -0
- package/dist/mcp/theming/dist/json/colors/presets/palettes.js +85 -0
- package/dist/mcp/theming/dist/json/components/themes.js +5792 -0
- package/dist/mcp/theming/dist/json/elevations/indigo.js +29 -0
- package/dist/mcp/theming/dist/json/elevations/material.js +3 -0
- package/dist/mcp/theming/dist/json/typography/presets/typescales.js +621 -0
- package/dist/mcp/tools/descriptions.js +98 -154
- package/dist/mcp/tools/handlers/color.js +58 -56
- package/dist/mcp/tools/handlers/component-theme.js +163 -225
- package/dist/mcp/tools/handlers/component-tokens.js +159 -219
- package/dist/mcp/tools/handlers/custom-palette.js +138 -179
- package/dist/mcp/tools/handlers/elevations.js +27 -28
- package/dist/mcp/tools/handlers/index.js +11 -0
- package/dist/mcp/tools/handlers/layout.js +125 -176
- package/dist/mcp/tools/handlers/palette.js +105 -120
- package/dist/mcp/tools/handlers/platform.js +289 -311
- package/dist/mcp/tools/handlers/resource.js +22 -31
- package/dist/mcp/tools/handlers/theme.js +86 -103
- package/dist/mcp/tools/handlers/typography.js +29 -30
- package/dist/mcp/tools/index.js +13 -0
- package/dist/mcp/tools/schemas.js +239 -218
- package/dist/mcp/utils/color.js +277 -239
- package/dist/mcp/utils/preprocessing.js +57 -30
- package/dist/mcp/utils/result.js +43 -45
- package/dist/mcp/utils/sass.js +271 -191
- package/dist/mcp/utils/theming-resolve.d.ts +19 -0
- package/dist/mcp/utils/theming-resolve.js +57 -0
- package/dist/mcp/utils/types.js +96 -53
- package/dist/mcp/validators/custom-palette.js +218 -243
- package/dist/mcp/validators/index.js +3 -0
- package/dist/mcp/validators/palette.js +231 -229
- package/dist/tailwind/utilities/bootstrap.css +1 -0
- package/dist/tailwind/utilities/fluent.css +1 -0
- package/dist/tailwind/utilities/indigo.css +1 -0
- package/dist/tailwind/utilities/material.css +1 -0
- package/package.json +45 -64
- package/sass/json/README.md +12 -7
- package/sass/themes/_mixins.scss +1 -0
- package/sass/themes/components/button-group/_button-group-theme.scss +42 -0
- package/sass/themes/components/grid/_grid-theme.scss +1 -1
- package/sass/themes/schemas/components/dark/_button-group.scss +173 -50
- package/sass/themes/schemas/components/dark/_grid.scss +0 -16
- package/sass/themes/schemas/components/light/_button-group.scss +221 -99
- package/sass/themes/schemas/components/light/_grid.scss +14 -20
- package/LICENSE +0 -21
- package/README.md +0 -391
- package/dist/mcp/json/colors/presets/palettes.json.js +0 -13
- package/dist/mcp/json/components/themes.json.js +0 -143
- package/dist/mcp/json/elevations/indigo.json.js +0 -8
- package/dist/mcp/json/elevations/material.json.js +0 -8
- package/dist/mcp/json/typography/presets/typescales.json.js +0 -17
- package/dist/mcp/knowledge/docs/colors/guidance.md.js +0 -4
- package/dist/mcp/knowledge/docs/colors/usage.md.js +0 -4
- package/dist/mcp/knowledge/docs/layout/functions/border-radius.md.js +0 -4
- package/dist/mcp/knowledge/docs/layout/functions/pad.md.js +0 -4
- package/dist/mcp/knowledge/docs/layout/functions/sizable.md.js +0 -4
- package/dist/mcp/knowledge/docs/layout/mixins/sizable.md.js +0 -4
- package/dist/mcp/knowledge/docs/layout/mixins/sizing.md.js +0 -4
- package/dist/mcp/knowledge/docs/layout/mixins/spacing.md.js +0 -4
- package/dist/mcp/knowledge/docs/layout/overview.md.js +0 -4
- package/dist/mcp/knowledge/docs/setup/platform.md.js +0 -4
- package/dist/mcp/vite-env.d.ts +0 -18
- package/index.js +0 -5
- package/json/components/bootstrap.json +0 -1
- package/json/components/fluent.json +0 -1
- package/json/components/indigo.json +0 -1
- package/json/components/material.json +0 -1
- package/tailwind/utilities/bootstrap.css +0 -1
- package/tailwind/utilities/fluent.css +0 -1
- package/tailwind/utilities/indigo.css +0 -1
- package/tailwind/utilities/material.css +0 -1
- /package/{json → dist/json}/colors/meta/multipliers.json +0 -0
- /package/{json → dist/json}/colors/meta/palette.json +0 -0
- /package/{json → dist/json}/colors/presets/palettes.json +0 -0
- /package/{json → dist/json}/elevations/indigo.json +0 -0
- /package/{json → dist/json}/elevations/material.json +0 -0
- /package/{json → dist/json}/typography/presets/typescales.json +0 -0
- /package/{tailwind → dist/tailwind}/themes/base.css +0 -0
- /package/{tailwind → dist/tailwind}/themes/dark/bootstrap.css +0 -0
- /package/{tailwind → dist/tailwind}/themes/dark/fluent.css +0 -0
- /package/{tailwind → dist/tailwind}/themes/dark/indigo.css +0 -0
- /package/{tailwind → dist/tailwind}/themes/dark/material.css +0 -0
- /package/{tailwind → dist/tailwind}/themes/light/bootstrap.css +0 -0
- /package/{tailwind → dist/tailwind}/themes/light/fluent.css +0 -0
- /package/{tailwind → dist/tailwind}/themes/light/indigo.css +0 -0
- /package/{tailwind → dist/tailwind}/themes/light/material.css +0 -0
|
@@ -1,118 +1,99 @@
|
|
|
1
|
-
import { generatePaletteCode, quoteFontFamily, generateTypographyCode, generateUseStatement } from "../../utils/sass.js";
|
|
2
1
|
import { PALETTE_PRESETS } from "../palettes.js";
|
|
3
|
-
import { PALETTES, TYPEFACES, TYPE_SCALES
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
2
|
+
import { PALETTES, SCHEMAS, TYPEFACES, TYPE_SCALES } from "./common.js";
|
|
3
|
+
import { generatePaletteCode, generateTypographyCode, generateUseStatement, quoteFontFamily } from "../../utils/sass.js";
|
|
4
|
+
//#region src/knowledge/platforms/angular.ts
|
|
5
|
+
/**
|
|
6
|
+
* Ignite UI for Angular Platform Knowledge
|
|
7
|
+
*
|
|
8
|
+
* This module contains platform-specific information for generating
|
|
9
|
+
* valid Sass theme code for Ignite UI for Angular applications.
|
|
10
|
+
*
|
|
11
|
+
* Key differences from igniteui-theming:
|
|
12
|
+
* - Uses `igniteui-angular/theming` module (forwards igniteui-theming with overrides)
|
|
13
|
+
* - Exposes `core()` and `theme()` mixins (Angular-specific, not in igniteui-theming)
|
|
14
|
+
* - Typography is overridden with Angular-specific implementation
|
|
15
|
+
* - Requires `ig-typography` CSS class on root element
|
|
16
|
+
*/
|
|
17
|
+
var ANGULAR_PLATFORM = {
|
|
18
|
+
id: "angular",
|
|
19
|
+
name: "Ignite UI for Angular",
|
|
20
|
+
packageName: "igniteui-angular",
|
|
21
|
+
themingModule: "igniteui-angular/theming",
|
|
22
|
+
detectionPatterns: ["igniteui-angular", "@infragistics/igniteui-angular"],
|
|
23
|
+
rootClass: "ig-typography"
|
|
20
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* Generate Sass code for an Angular theme
|
|
27
|
+
*
|
|
28
|
+
* Uses shared code generation helpers from utils/sass.ts for:
|
|
29
|
+
* - @use statement (generateUseStatement)
|
|
30
|
+
* - Palette code (generatePaletteCode)
|
|
31
|
+
* - Typography code (generateTypographyCode)
|
|
32
|
+
*/
|
|
21
33
|
function generateAngularThemeSass(template) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
} else {
|
|
80
|
-
lines.push("@include core();");
|
|
81
|
-
}
|
|
82
|
-
if (includeTypography) {
|
|
83
|
-
const typefaceValue = fontFamily ? quoteFontFamily(fontFamily) : TYPEFACES[designSystem];
|
|
84
|
-
const typeScale = TYPE_SCALES[designSystem];
|
|
85
|
-
const typographyLines = generateTypographyCode({
|
|
86
|
-
fontFamily: typefaceValue,
|
|
87
|
-
typeScaleVar: typeScale
|
|
88
|
-
});
|
|
89
|
-
lines.push(...typographyLines);
|
|
90
|
-
}
|
|
91
|
-
const schema = SCHEMAS[variant][designSystem];
|
|
92
|
-
const themeArgs = [];
|
|
93
|
-
themeArgs.push(` $palette: ${paletteVariable}`);
|
|
94
|
-
themeArgs.push(` $schema: ${schema}`);
|
|
95
|
-
if (themeOptions.roundness !== void 0) {
|
|
96
|
-
themeArgs.push(` $roundness: ${themeOptions.roundness}`);
|
|
97
|
-
}
|
|
98
|
-
if (themeOptions.elevation === false) {
|
|
99
|
-
themeArgs.push(" $elevation: false");
|
|
100
|
-
}
|
|
101
|
-
if (themeOptions.elevations) {
|
|
102
|
-
themeArgs.push(` $elevations: ${themeOptions.elevations}`);
|
|
103
|
-
}
|
|
104
|
-
if (themeOptions.exclude && themeOptions.exclude.length > 0) {
|
|
105
|
-
themeArgs.push(` $exclude: (${themeOptions.exclude.join(", ")})`);
|
|
106
|
-
}
|
|
107
|
-
lines.push("");
|
|
108
|
-
lines.push("// Apply the theme");
|
|
109
|
-
lines.push("@include theme(");
|
|
110
|
-
lines.push(themeArgs.join(",\n"));
|
|
111
|
-
lines.push(");");
|
|
112
|
-
return lines.join("\n");
|
|
34
|
+
const { designSystem, variant, primaryColor, secondaryColor, surfaceColor, grayColor, customPaletteName = "$my-palette", fontFamily, includeTypography = true, coreOptions = {}, themeOptions = {} } = template;
|
|
35
|
+
const lines = [
|
|
36
|
+
"// Generated by Ignite UI Theming MCP Server",
|
|
37
|
+
"// Platform: Ignite UI for Angular",
|
|
38
|
+
"",
|
|
39
|
+
"// Import the theming module",
|
|
40
|
+
generateUseStatement("angular"),
|
|
41
|
+
""
|
|
42
|
+
];
|
|
43
|
+
const hasCustomColors = primaryColor || secondaryColor || surfaceColor;
|
|
44
|
+
let paletteVariable;
|
|
45
|
+
if (hasCustomColors) {
|
|
46
|
+
const presetColors = PALETTE_PRESETS[`${variant}-${designSystem}-palette`];
|
|
47
|
+
const paletteResult = generatePaletteCode({
|
|
48
|
+
primary: primaryColor || presetColors.primary,
|
|
49
|
+
secondary: secondaryColor || presetColors.secondary,
|
|
50
|
+
surface: surfaceColor || presetColors.surface,
|
|
51
|
+
gray: grayColor,
|
|
52
|
+
variableName: customPaletteName.replace(/^\$/, ""),
|
|
53
|
+
useVariableReferences: true
|
|
54
|
+
});
|
|
55
|
+
lines.push("// Custom color palette");
|
|
56
|
+
lines.push(...paletteResult.colorVariables);
|
|
57
|
+
lines.push("");
|
|
58
|
+
lines.push(...paletteResult.paletteDefinition);
|
|
59
|
+
lines.push("");
|
|
60
|
+
paletteVariable = paletteResult.variableName;
|
|
61
|
+
} else paletteVariable = PALETTES[variant][designSystem];
|
|
62
|
+
lines.push("// IMPORTANT: Always include core first!");
|
|
63
|
+
const coreArgs = [];
|
|
64
|
+
if (coreOptions.printLayout === false) coreArgs.push("$print-layout: false");
|
|
65
|
+
if (coreOptions.enhancedAccessibility) coreArgs.push("$enhanced-accessibility: true");
|
|
66
|
+
if (coreArgs.length > 0) lines.push(`@include core(${coreArgs.join(", ")});`);
|
|
67
|
+
else lines.push("@include core();");
|
|
68
|
+
if (includeTypography) {
|
|
69
|
+
const typefaceValue = fontFamily ? quoteFontFamily(fontFamily) : TYPEFACES[designSystem];
|
|
70
|
+
const typeScale = TYPE_SCALES[designSystem];
|
|
71
|
+
const typographyLines = generateTypographyCode({
|
|
72
|
+
fontFamily: typefaceValue,
|
|
73
|
+
typeScaleVar: typeScale
|
|
74
|
+
});
|
|
75
|
+
lines.push(...typographyLines);
|
|
76
|
+
}
|
|
77
|
+
const schema = SCHEMAS[variant][designSystem];
|
|
78
|
+
const themeArgs = [];
|
|
79
|
+
themeArgs.push(` $palette: ${paletteVariable}`);
|
|
80
|
+
themeArgs.push(` $schema: ${schema}`);
|
|
81
|
+
if (themeOptions.roundness !== void 0) themeArgs.push(` $roundness: ${themeOptions.roundness}`);
|
|
82
|
+
if (themeOptions.elevation === false) themeArgs.push(" $elevation: false");
|
|
83
|
+
if (themeOptions.elevations) themeArgs.push(` $elevations: ${themeOptions.elevations}`);
|
|
84
|
+
if (themeOptions.exclude && themeOptions.exclude.length > 0) themeArgs.push(` $exclude: (${themeOptions.exclude.join(", ")})`);
|
|
85
|
+
lines.push("");
|
|
86
|
+
lines.push("// Apply the theme");
|
|
87
|
+
lines.push("@include theme(");
|
|
88
|
+
lines.push(themeArgs.join(",\n"));
|
|
89
|
+
lines.push(");");
|
|
90
|
+
return lines.join("\n");
|
|
113
91
|
}
|
|
114
|
-
|
|
115
|
-
|
|
92
|
+
/**
|
|
93
|
+
* Example usage documentation
|
|
94
|
+
*/
|
|
95
|
+
var ANGULAR_USAGE_EXAMPLES = {
|
|
96
|
+
basic: `
|
|
116
97
|
// Basic Material Light Theme
|
|
117
98
|
@use "igniteui-angular/theming" as *;
|
|
118
99
|
|
|
@@ -126,7 +107,7 @@ const ANGULAR_USAGE_EXAMPLES = {
|
|
|
126
107
|
$schema: $light-material-schema
|
|
127
108
|
);
|
|
128
109
|
`,
|
|
129
|
-
|
|
110
|
+
customPalette: `
|
|
130
111
|
// Custom Palette Theme
|
|
131
112
|
@use "igniteui-angular/theming" as *;
|
|
132
113
|
|
|
@@ -146,7 +127,7 @@ $my-palette: palette(
|
|
|
146
127
|
$schema: $light-material-schema
|
|
147
128
|
);
|
|
148
129
|
`,
|
|
149
|
-
|
|
130
|
+
darkTheme: `
|
|
150
131
|
// Dark Indigo Theme
|
|
151
132
|
@use "igniteui-angular/theming" as *;
|
|
152
133
|
|
|
@@ -160,7 +141,7 @@ $my-palette: palette(
|
|
|
160
141
|
$schema: $dark-indigo-schema
|
|
161
142
|
);
|
|
162
143
|
`,
|
|
163
|
-
|
|
144
|
+
excludeComponents: `
|
|
164
145
|
// Theme with excluded components
|
|
165
146
|
@use "igniteui-angular/theming" as *;
|
|
166
147
|
|
|
@@ -177,7 +158,7 @@ $excluded-components: (igx-avatar, igx-badge);
|
|
|
177
158
|
$exclude: $excluded-components
|
|
178
159
|
);
|
|
179
160
|
`,
|
|
180
|
-
|
|
161
|
+
enhancedAccessibility: `
|
|
181
162
|
// Theme with enhanced accessibility
|
|
182
163
|
@use "igniteui-angular/theming" as *;
|
|
183
164
|
|
|
@@ -192,8 +173,5 @@ $excluded-components: (igx-avatar, igx-badge);
|
|
|
192
173
|
);
|
|
193
174
|
`
|
|
194
175
|
};
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
ANGULAR_USAGE_EXAMPLES,
|
|
198
|
-
generateAngularThemeSass
|
|
199
|
-
};
|
|
176
|
+
//#endregion
|
|
177
|
+
export { ANGULAR_PLATFORM, ANGULAR_USAGE_EXAMPLES, generateAngularThemeSass };
|
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
rootClass: null
|
|
1
|
+
//#region src/knowledge/platforms/blazor.ts
|
|
2
|
+
/**
|
|
3
|
+
* Ignite UI for Blazor Platform Knowledge
|
|
4
|
+
*
|
|
5
|
+
* This module contains platform-specific information for generating
|
|
6
|
+
* valid Sass theme code for Ignite UI for Blazor applications.
|
|
7
|
+
*
|
|
8
|
+
* Key characteristics:
|
|
9
|
+
* - .NET/C# project using Blazor framework (Server or WebAssembly)
|
|
10
|
+
* - Uses NuGet package `IgniteUI.Blazor` (not npm)
|
|
11
|
+
* - Uses `igniteui-theming` npm package for Sass compilation
|
|
12
|
+
* - Sass files are compiled to CSS and referenced in Blazor components
|
|
13
|
+
* - Components use CSS variables for theming (--ig-* naming convention)
|
|
14
|
+
* - Theming approach is similar to Web Components/React
|
|
15
|
+
*/
|
|
16
|
+
var BLAZOR_PLATFORM = {
|
|
17
|
+
id: "blazor",
|
|
18
|
+
name: "Ignite UI for Blazor",
|
|
19
|
+
packageName: "IgniteUI.Blazor",
|
|
20
|
+
themingModule: "igniteui-theming",
|
|
21
|
+
detectionPatterns: ["IgniteUI.Blazor"],
|
|
22
|
+
configFiles: [".csproj"],
|
|
23
|
+
rootClass: null
|
|
25
24
|
};
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Example usage documentation for Blazor
|
|
27
|
+
*/
|
|
28
|
+
var BLAZOR_USAGE_EXAMPLES = {
|
|
29
|
+
basic: `
|
|
28
30
|
// Basic Material Light Theme for Blazor
|
|
29
31
|
// In your wwwroot/css/theme.scss file:
|
|
30
32
|
|
|
@@ -50,7 +52,7 @@ const BLAZOR_USAGE_EXAMPLES = {
|
|
|
50
52
|
);
|
|
51
53
|
@include spacing();
|
|
52
54
|
`,
|
|
53
|
-
|
|
55
|
+
projectSetup: `
|
|
54
56
|
// Blazor project setup for custom theming:
|
|
55
57
|
|
|
56
58
|
// 1. Install NuGet package in your .csproj:
|
|
@@ -72,7 +74,7 @@ npm install igniteui-theming sass
|
|
|
72
74
|
// 5. Reference compiled CSS in _Host.cshtml or index.html:
|
|
73
75
|
<link href="css/theme.css" rel="stylesheet" />
|
|
74
76
|
`,
|
|
75
|
-
|
|
77
|
+
csprojExample: `
|
|
76
78
|
<!-- Example .csproj with IgniteUI.Blazor -->
|
|
77
79
|
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
|
|
78
80
|
<PropertyGroup>
|
|
@@ -83,7 +85,7 @@ npm install igniteui-theming sass
|
|
|
83
85
|
</ItemGroup>
|
|
84
86
|
</Project>
|
|
85
87
|
`,
|
|
86
|
-
|
|
88
|
+
customPalette: `
|
|
87
89
|
// Custom Palette Theme
|
|
88
90
|
@use 'igniteui-theming' as *;
|
|
89
91
|
@use 'igniteui-theming/sass/typography/presets/material' as *;
|
|
@@ -111,7 +113,7 @@ $my-palette: palette(
|
|
|
111
113
|
);
|
|
112
114
|
@include spacing();
|
|
113
115
|
`,
|
|
114
|
-
|
|
116
|
+
darkTheme: `
|
|
115
117
|
// Dark Indigo Theme for Blazor
|
|
116
118
|
@use 'igniteui-theming' as *;
|
|
117
119
|
@use 'igniteui-theming/sass/color/presets/dark/indigo' as *;
|
|
@@ -135,7 +137,10 @@ $my-palette: palette(
|
|
|
135
137
|
@include spacing();
|
|
136
138
|
`
|
|
137
139
|
};
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
/**
|
|
141
|
+
* Note: Blazor uses the same Sass code generation as Web Components/React.
|
|
142
|
+
* The generateWebComponentsThemeSass function from webcomponents.ts can be reused for Blazor.
|
|
143
|
+
* The main difference is in the build pipeline (npm + sass CLI vs Angular CLI).
|
|
144
|
+
*/
|
|
145
|
+
//#endregion
|
|
146
|
+
export { BLAZOR_PLATFORM, BLAZOR_USAGE_EXAMPLES };
|
|
@@ -1,75 +1,90 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
//#region src/knowledge/platforms/common.ts
|
|
2
|
+
/**
|
|
3
|
+
* Available palettes preset paths
|
|
4
|
+
*/
|
|
5
|
+
var PALETTE_PRESETS_PATHS = {
|
|
6
|
+
light: {
|
|
7
|
+
material: "igniteui-theming/sass/color/presets/light/material",
|
|
8
|
+
fluent: "igniteui-theming/sass/color/presets/light/fluent",
|
|
9
|
+
bootstrap: "igniteui-theming/sass/color/presets/light/bootstrap",
|
|
10
|
+
indigo: "igniteui-theming/sass/color/presets/light/indigo"
|
|
11
|
+
},
|
|
12
|
+
dark: {
|
|
13
|
+
material: "igniteui-theming/sass/color/presets/dark/material",
|
|
14
|
+
fluent: "igniteui-theming/sass/color/presets/dark/fluent",
|
|
15
|
+
bootstrap: "igniteui-theming/sass/color/presets/dark/bootstrap",
|
|
16
|
+
indigo: "igniteui-theming/sass/color/presets/dark/indigo"
|
|
17
|
+
}
|
|
14
18
|
};
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Available typography preset paths
|
|
21
|
+
*/
|
|
22
|
+
var TYPOGRAPHY_PRESETS_PATHS = {
|
|
23
|
+
material: "igniteui-theming/sass/typography/presets/material",
|
|
24
|
+
fluent: "igniteui-theming/sass/typography/presets/fluent",
|
|
25
|
+
bootstrap: "igniteui-theming/sass/typography/presets/bootstrap",
|
|
26
|
+
indigo: "igniteui-theming/sass/typography/presets/indigo"
|
|
20
27
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Available schema presets
|
|
30
|
+
*/
|
|
31
|
+
var SCHEMAS = {
|
|
32
|
+
light: {
|
|
33
|
+
material: "$light-material-schema",
|
|
34
|
+
fluent: "$light-fluent-schema",
|
|
35
|
+
bootstrap: "$light-bootstrap-schema",
|
|
36
|
+
indigo: "$light-indigo-schema"
|
|
37
|
+
},
|
|
38
|
+
dark: {
|
|
39
|
+
material: "$dark-material-schema",
|
|
40
|
+
fluent: "$dark-fluent-schema",
|
|
41
|
+
bootstrap: "$dark-bootstrap-schema",
|
|
42
|
+
indigo: "$dark-indigo-schema"
|
|
43
|
+
}
|
|
34
44
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
/**
|
|
46
|
+
* Available palettes presets
|
|
47
|
+
*/
|
|
48
|
+
var PALETTES = {
|
|
49
|
+
light: {
|
|
50
|
+
material: "$light-material-palette",
|
|
51
|
+
fluent: "$light-fluent-palette",
|
|
52
|
+
bootstrap: "$light-bootstrap-palette",
|
|
53
|
+
indigo: "$light-indigo-palette"
|
|
54
|
+
},
|
|
55
|
+
dark: {
|
|
56
|
+
material: "$dark-material-palette",
|
|
57
|
+
fluent: "$dark-fluent-palette",
|
|
58
|
+
bootstrap: "$dark-bootstrap-palette",
|
|
59
|
+
indigo: "$dark-indigo-palette"
|
|
60
|
+
}
|
|
48
61
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
62
|
+
/**
|
|
63
|
+
* Available typefaces
|
|
64
|
+
*/
|
|
65
|
+
var TYPEFACES = {
|
|
66
|
+
material: "$material-typeface",
|
|
67
|
+
fluent: "$fluent-typeface",
|
|
68
|
+
bootstrap: "$bootstrap-typeface",
|
|
69
|
+
indigo: "$indigo-typeface"
|
|
54
70
|
};
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
71
|
+
/**
|
|
72
|
+
* Available type scales
|
|
73
|
+
*/
|
|
74
|
+
var TYPE_SCALES = {
|
|
75
|
+
material: "$material-type-scale",
|
|
76
|
+
fluent: "$fluent-type-scale",
|
|
77
|
+
bootstrap: "$bootstrap-type-scale",
|
|
78
|
+
indigo: "$indigo-type-scale"
|
|
60
79
|
};
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
PALETTES,
|
|
70
|
-
PALETTE_PRESETS_PATHS,
|
|
71
|
-
SCHEMAS,
|
|
72
|
-
TYPEFACES,
|
|
73
|
-
TYPE_SCALES,
|
|
74
|
-
TYPOGRAPHY_PRESETS_PATHS
|
|
80
|
+
/**
|
|
81
|
+
* Available elevation presets
|
|
82
|
+
*/
|
|
83
|
+
var ELEVATIONS = {
|
|
84
|
+
material: "$material-elevations",
|
|
85
|
+
bootstrap: "$material-elevations",
|
|
86
|
+
fluent: "$material-elevations",
|
|
87
|
+
indigo: "$indigo-elevations"
|
|
75
88
|
};
|
|
89
|
+
//#endregion
|
|
90
|
+
export { ELEVATIONS, PALETTES, PALETTE_PRESETS_PATHS, SCHEMAS, TYPEFACES, TYPE_SCALES, TYPOGRAPHY_PRESETS_PATHS };
|