@filip.mazev/blocks 1.0.18 → 1.0.34

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 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 (Default or Orange Company).
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
 
@@ -30,6 +30,8 @@ Running the schematic will automatically install the following libraries:
30
30
 
31
31
  * @filip.mazev/toastr: A component-driven toast notification system featuring smart queue management, auto-dismissal, and built-in status views.
32
32
 
33
+ * @filip.mazev/icons: The icon package used across the blocks components
34
+
33
35
  ## Manual Setup (Without Angular CLI)
34
36
 
35
37
  If you prefer not to use `ng add` or are in an environment that doesn't support Angular Schematics, you can install the packages manually:
@@ -43,17 +45,15 @@ Then, manually configure your styles.scss:
43
45
  ```scss
44
46
  @use '@filip.mazev/blocks-core/src/lib/styles/index' as *;
45
47
  @use '@filip.mazev/modal/lib/styles/index' as modal;
46
- @use '@filip.mazev/toastr/lib/styles/index' as toastr;
47
48
 
48
49
  @layer base {
49
50
  :root {
50
- @include core-theme($default-light-theme-config);
51
+ @include core-theme($purple-light-theme);
51
52
  @include modal.modal-theme();
52
- @include toastr.toastr-theme(());
53
53
  }
54
54
 
55
55
  [data-theme='dark'] {
56
- @include core-theme($default-dark-theme-config);
56
+ @include core-theme($purple-dark-theme);
57
57
  }
58
58
  }
59
59
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@filip.mazev/blocks",
3
- "version": "1.0.18",
3
+ "version": "1.0.34",
4
4
  "schematics": "./schematics/collection.json",
5
5
  "peerDependencies": {
6
6
  "@angular/core": "^21.1.1",
@@ -20,6 +20,7 @@
20
20
  }
21
21
  },
22
22
  "sideEffects": false,
23
+ "type": "module",
23
24
  "dependencies": {
24
25
  "tslib": "^2.3.0"
25
26
  }
@@ -25,7 +25,9 @@ function addDependencies(tree, context) {
25
25
  const packages = [
26
26
  '@filip.mazev/blocks-core',
27
27
  '@filip.mazev/modal',
28
- '@filip.mazev/toastr'
28
+ '@filip.mazev/toastr',
29
+ '@filip.mazev/icons',
30
+ '@filip.mazev/button'
29
31
  ];
30
32
  let dependenciesAdded = false;
31
33
  packages.forEach(pkg => {
@@ -77,18 +79,16 @@ function injectStyles(tree, context, options) {
77
79
  context.logger.info('Blocks SCSS configuration already exists. Skipping style injection.');
78
80
  return;
79
81
  }
80
- const lightThemeVar = options.theme === 'orange-company' ? '$orange-company-light-theme-config' : '$default-light-theme-config';
81
- const darkThemeVar = options.theme === 'orange-company' ? '$orange-company-dark-theme-config' : '$default-dark-theme-config';
82
+ const lightThemeVar = `$${options.theme}-light-theme`;
83
+ const darkThemeVar = `$${options.theme}-dark-theme`;
82
84
  const blocksThemeSnippet = `
83
85
  @use '@filip.mazev/blocks-core/src/lib/styles/index' as *;
84
86
  @use '@filip.mazev/modal/lib/styles/index' as modal;
85
- @use '@filip.mazev/toastr/lib/styles/index' as toastr;
86
87
 
87
88
  @layer base {
88
89
  :root {
89
90
  @include core-theme(${lightThemeVar});
90
91
  @include modal.modal-theme();
91
- @include toastr.toastr-theme(());
92
92
  }
93
93
 
94
94
  [data-theme='dark'] {
@@ -6,26 +6,26 @@
6
6
  "properties": {
7
7
  "theme": {
8
8
  "type": "string",
9
- "description": "Select the default theme for your UI blocks.",
9
+ "description": "Select the theme for your UI.",
10
10
  "enum": [
11
- "default",
12
- "orange-company"
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": "default",
20
- "label": "Default Theme"
19
+ "value": "purple",
20
+ "label": "Purple Theme"
21
21
  },
22
22
  {
23
- "value": "orange-company",
24
- "label": "Orange Company Theme"
23
+ "value": "orange",
24
+ "label": "Orange Theme"
25
25
  }
26
26
  ]
27
27
  },
28
- "default": "default"
28
+ "default": "purple"
29
29
  }
30
30
  },
31
31
  "required": [