@resolve-components/theme 1.2.4 → 1.2.6
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/package.json
CHANGED
|
@@ -1,29 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@resolve-components/theme",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
4
|
+
"description": "Fully customizable Angular UI component library with 40+ standalone components, design tokens, and dark mode support.",
|
|
5
|
+
"main": "index.js",
|
|
4
6
|
"schematics": "./collection.json",
|
|
5
|
-
"description": "ðŸâ€ÂÂÂÂÂÂ¥ Fully customizable Angular UI components made with â¤︠using Angular CDK ðŸâ€ÂÂÂÂÂÂ¥",
|
|
6
|
-
"peerDependencies": {
|
|
7
|
-
"@angular/common": ">=17.0.0",
|
|
8
|
-
"@angular/core": ">=17.0.0",
|
|
9
|
-
"@angular/forms": ">=17.0.0",
|
|
10
|
-
"@angular/cdk": ">=17.0.0",
|
|
11
|
-
"rxjs": ">=7.4.0",
|
|
12
|
-
"@angular/platform-browser": ">=17.0.0",
|
|
13
|
-
"eva-icons": "^1.1.3",
|
|
14
|
-
"@angular-devkit/schematics": ">=17.0.0"
|
|
15
|
-
},
|
|
16
|
-
"peerDependenciesMeta": {
|
|
17
|
-
"eva-icons": {
|
|
18
|
-
"optional": true
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
7
|
"website": "https://resolve-components.web.app",
|
|
22
8
|
"keywords": [
|
|
23
9
|
"@resolve-components/theme",
|
|
24
10
|
"@resolve-components",
|
|
25
11
|
"resolve-components",
|
|
26
|
-
"r components",
|
|
27
12
|
"angular components",
|
|
28
13
|
"angular",
|
|
29
14
|
"components",
|
|
@@ -34,6 +19,21 @@
|
|
|
34
19
|
"ui library",
|
|
35
20
|
"ui framework"
|
|
36
21
|
],
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"@angular/common": ">=17.0.0",
|
|
24
|
+
"@angular/core": ">=17.0.0",
|
|
25
|
+
"@angular/forms": ">=17.0.0",
|
|
26
|
+
"@angular/cdk": ">=17.0.0",
|
|
27
|
+
"rxjs": ">=7.4.0",
|
|
28
|
+
"@angular/platform-browser": ">=17.0.0",
|
|
29
|
+
"eva-icons": "^1.1.3",
|
|
30
|
+
"@angular-devkit/schematics": ">=17.0.0"
|
|
31
|
+
},
|
|
32
|
+
"peerDependenciesMeta": {
|
|
33
|
+
"eva-icons": {
|
|
34
|
+
"optional": false
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
37
|
"sideEffects": false,
|
|
38
38
|
"module": "fesm2022/resolve-components-theme.mjs",
|
|
39
39
|
"typings": "types/resolve-components-theme.d.ts",
|
|
@@ -207,12 +207,17 @@ function addBuildConfig(options) {
|
|
|
207
207
|
ctx.logger.warn('⚠ Could not find build target options — add them manually.');
|
|
208
208
|
return tree;
|
|
209
209
|
}
|
|
210
|
-
// ── styles: add CDK overlay CSS ──
|
|
211
|
-
const cdkStyle = 'node_modules/@angular/cdk/overlay-prebuilt.css';
|
|
210
|
+
// ── styles: add CDK overlay CSS + resolve-components entry ──
|
|
212
211
|
if (!Array.isArray(buildOptions['styles']))
|
|
213
212
|
buildOptions['styles'] = [];
|
|
214
|
-
|
|
215
|
-
|
|
213
|
+
const stylesToAdd = [
|
|
214
|
+
'node_modules/@angular/cdk/overlay-prebuilt.css',
|
|
215
|
+
'node_modules/@resolve-components/theme/styles/resolve-components.scss',
|
|
216
|
+
];
|
|
217
|
+
for (const s of stylesToAdd) {
|
|
218
|
+
if (!buildOptions['styles'].includes(s)) {
|
|
219
|
+
buildOptions['styles'].push(s);
|
|
220
|
+
}
|
|
216
221
|
}
|
|
217
222
|
// ── stylePreprocessorOptions: add includePath ──
|
|
218
223
|
const includePath = 'node_modules/@resolve-components/theme/styles';
|
|
@@ -260,30 +265,14 @@ function addProviderToConfig(options) {
|
|
|
260
265
|
};
|
|
261
266
|
}
|
|
262
267
|
// ---------------------------------------------------------------------------
|
|
263
|
-
// Rule:
|
|
268
|
+
// Rule: global styles — handled via styles array entry, no styles.scss changes
|
|
264
269
|
// ---------------------------------------------------------------------------
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
ctx.logger.warn(`⚠ ${stylesPath} not found.\n` +
|
|
272
|
-
` Add the following to your global stylesheet:\n` +
|
|
273
|
-
` @use 'all' as *;\n @include rc-install();`);
|
|
274
|
-
return tree;
|
|
275
|
-
}
|
|
276
|
-
let content = tree.read(stylesPath).toString('utf-8');
|
|
277
|
-
if (content.includes('@resolve-components/theme') ||
|
|
278
|
-
content.includes(`@use 'all'`)) {
|
|
279
|
-
return tree;
|
|
280
|
-
}
|
|
281
|
-
// Minimal two-line setup — rc-install() emits all global resets and CSS vars
|
|
282
|
-
const addition = `@use 'all' as *;\n\n// Emit CSS custom property blocks\n@include rc-install();\n\n`;
|
|
283
|
-
tree.overwrite(stylesPath, addition + content);
|
|
284
|
-
ctx.logger.info(` Updated ${stylesPath} with @use 'all' as * and @include rc-install()`);
|
|
285
|
-
return tree;
|
|
286
|
-
};
|
|
270
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
271
|
+
function addGlobalStyles(_options) {
|
|
272
|
+
// All styles are now emitted through the resolve-components.scss entry file
|
|
273
|
+
// added to the project's styles array in addBuildConfig — no modifications to
|
|
274
|
+
// the consumer's styles.scss are needed (mirrors the Nebular/Material approach).
|
|
275
|
+
return (tree) => tree;
|
|
287
276
|
}
|
|
288
277
|
// ---------------------------------------------------------------------------
|
|
289
278
|
// Rule: wrap app.html with <rc-layout>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// Resolve Components — Prebuilt Entry Point
|
|
3
|
+
// =============================================================================
|
|
4
|
+
// Add this file to your project's styles array in angular.json / project.json:
|
|
5
|
+
//
|
|
6
|
+
// "styles": [
|
|
7
|
+
// "node_modules/@angular/cdk/overlay-prebuilt.css",
|
|
8
|
+
// "node_modules/@resolve-components/theme/styles/resolve-components.scss"
|
|
9
|
+
// ]
|
|
10
|
+
//
|
|
11
|
+
// This single import loads all component styles and emits the CSS custom
|
|
12
|
+
// property blocks required for theming. No changes to your styles.scss needed.
|
|
13
|
+
// =============================================================================
|
|
14
|
+
|
|
15
|
+
@use 'all' as *;
|
|
16
|
+
|
|
17
|
+
@include rc-install();
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
@use 'sass:map';
|
|
6
6
|
@use 'sass:meta';
|
|
7
|
+
@use 'sass:list';
|
|
7
8
|
@use 'theming-variables' as vars;
|
|
8
9
|
@use 'functions' as fn;
|
|
9
10
|
@use 'mapping' as mp;
|
|
@@ -51,7 +52,7 @@
|
|
|
51
52
|
/// If $rc-enabled-themes is empty, returns all registered theme names.
|
|
52
53
|
/// @return {List} Theme names.
|
|
53
54
|
@function rc-get-enabled-themes() {
|
|
54
|
-
@if length(vars.$rc-enabled-themes) > 0 {
|
|
55
|
+
@if list.length(vars.$rc-enabled-themes) > 0 {
|
|
55
56
|
@return vars.$rc-enabled-themes;
|
|
56
57
|
}
|
|
57
58
|
@return map.keys(vars.$rc-themes);
|