@filip.mazev/blocks 1.0.15 → 1.0.28
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/README.md +3 -3
- package/package.json +1 -1
- package/schematics/ng-add/index.js +2 -2
- package/schematics/ng-add/schema.json +8 -8
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ ng add @filip.mazev/blocks
|
|
|
16
16
|
|
|
17
17
|
When you run the command above, the Angular CLI will execute our custom schematic to handle the boilerplate for you:
|
|
18
18
|
|
|
19
|
-
* Interactive Theme Selection: You will be prompted to choose your preferred global theme (
|
|
19
|
+
* Interactive Theme Selection: You will be prompted to choose your preferred global theme (Purple or Orange Company).
|
|
20
20
|
* Dependency Management: Automatically adds the latest versions of the Blocks ecosystem to your package.json and runs npm install.
|
|
21
21
|
* SCSS Injection: Intelligently locates your project's global stylesheet (styles.scss or styles.sass) and injects the required @use statements, mixins, and both light/dark mode CSS variables based on your theme selection.
|
|
22
22
|
|
|
@@ -47,13 +47,13 @@ Then, manually configure your styles.scss:
|
|
|
47
47
|
|
|
48
48
|
@layer base {
|
|
49
49
|
:root {
|
|
50
|
-
@include core-theme($
|
|
50
|
+
@include core-theme($purple-light-theme);
|
|
51
51
|
@include modal.modal-theme();
|
|
52
52
|
@include toastr.toastr-theme(());
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
[data-theme='dark'] {
|
|
56
|
-
@include core-theme($
|
|
56
|
+
@include core-theme($purple-dark-theme);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
```
|
package/package.json
CHANGED
|
@@ -77,8 +77,8 @@ function injectStyles(tree, context, options) {
|
|
|
77
77
|
context.logger.info('Blocks SCSS configuration already exists. Skipping style injection.');
|
|
78
78
|
return;
|
|
79
79
|
}
|
|
80
|
-
const lightThemeVar = options.theme
|
|
81
|
-
const darkThemeVar = options.theme
|
|
80
|
+
const lightThemeVar = `$${options.theme}-light-theme`;
|
|
81
|
+
const darkThemeVar = `$${options.theme}-dark-theme`;
|
|
82
82
|
const blocksThemeSnippet = `
|
|
83
83
|
@use '@filip.mazev/blocks-core/src/lib/styles/index' as *;
|
|
84
84
|
@use '@filip.mazev/modal/lib/styles/index' as modal;
|
|
@@ -6,26 +6,26 @@
|
|
|
6
6
|
"properties": {
|
|
7
7
|
"theme": {
|
|
8
8
|
"type": "string",
|
|
9
|
-
"description": "Select the
|
|
9
|
+
"description": "Select the theme for your UI.",
|
|
10
10
|
"enum": [
|
|
11
|
-
"
|
|
12
|
-
"orange
|
|
11
|
+
"purple",
|
|
12
|
+
"orange"
|
|
13
13
|
],
|
|
14
14
|
"x-prompt": {
|
|
15
15
|
"message": "Which theme would you like to use?",
|
|
16
16
|
"type": "list",
|
|
17
17
|
"items": [
|
|
18
18
|
{
|
|
19
|
-
"value": "
|
|
20
|
-
"label": "
|
|
19
|
+
"value": "purple",
|
|
20
|
+
"label": "Purple Theme"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
"value": "orange
|
|
24
|
-
"label": "Orange
|
|
23
|
+
"value": "orange",
|
|
24
|
+
"label": "Orange Theme"
|
|
25
25
|
}
|
|
26
26
|
]
|
|
27
27
|
},
|
|
28
|
-
"default": "
|
|
28
|
+
"default": "purple"
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"required": [
|