@porscheinformatik/material-addons 21.0.4 → 22.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/README.md +46 -3
- package/fesm2022/porscheinformatik-material-addons.mjs +45 -43
- package/fesm2022/porscheinformatik-material-addons.mjs.map +1 -1
- package/package.json +1 -1
- package/themes/carcat-palettes.scss +137 -0
- package/themes/carcat.scss +26 -26
- package/themes/common/components/_button.scss +147 -0
- package/themes/common/components/_color-overrides.scss +33 -0
- package/themes/common/components/_flowbar.scss +27 -0
- package/themes/common/components/_material-overrides.scss +44 -0
- package/themes/common/components/_readonly.scss +7 -0
- package/themes/common/components/_toolbar.scss +6 -0
- package/themes/common/foundation/_base.scss +9 -0
- package/themes/common/foundation/_fonts.scss +16 -0
- package/themes/common/foundation/_typography.scss +6 -0
- package/themes/common/foundation/_utilities.scss +313 -0
- package/themes/common/styles.scss +21 -530
- package/themes/common/theme-entry.scss +52 -0
- package/themes/common/theme.scss +72 -34
- package/themes/common/tokens/_tokens.scss +89 -0
- package/themes/pbv-palettes.scss +137 -0
- package/themes/pbv.scss +34 -43
- package/themes/poa-palettes.scss +137 -0
- package/themes/poa.scss +23 -43
- package/types/porscheinformatik-material-addons.d.ts.map +1 -1
- package/themes/common/button.scss +0 -34
package/README.md
CHANGED
|
@@ -2,10 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
The goal of "material addons" is to achieve a stylesheet similar to [Clarity Addons](https://www.npmjs.com/package/@porscheinformatik/clr-addons) for [Angular Material](https://material.angular.io/).
|
|
4
4
|
|
|
5
|
+
### Material Design 3 (M3)
|
|
6
|
+
|
|
7
|
+
**Version 22.0.0+** fully supports Material Design 3 (M3):
|
|
8
|
+
- Modern M3 design tokens and color system
|
|
9
|
+
- Improved accessibility and contrast
|
|
10
|
+
- All existing CSS variables preserved
|
|
11
|
+
- No breaking API changes
|
|
12
|
+
- See [MIGRATION_M2_TO_M3.md](https://github.com/porscheinformatik/material-addons/blob/master/MIGRATION_M2_TO_M3.md) for upgrade details
|
|
13
|
+
|
|
5
14
|
### Requirements
|
|
6
15
|
|
|
7
16
|
Material addons requires an already set-up Angular Material project. To do a fresh start please follow [the official Angular Material guide](https://material.angular.io/guide/getting-started) before you continue, but exclude step 4 ("include a theme").
|
|
8
17
|
|
|
18
|
+
**Version compatibility:**
|
|
19
|
+
- Angular 22.x → Material Addons 22.x (M3)
|
|
20
|
+
- Angular 21.x → Material Addons 21.x (M2)
|
|
21
|
+
- See [full version matrix](https://github.com/porscheinformatik/material-addons#versioning)
|
|
22
|
+
|
|
9
23
|
### Installation
|
|
10
24
|
|
|
11
25
|
1. Install Material Addons package using npm.
|
|
@@ -14,14 +28,43 @@ Material addons requires an already set-up Angular Material project. To do a fre
|
|
|
14
28
|
npm install @porscheinformatik/material-addons
|
|
15
29
|
```
|
|
16
30
|
|
|
17
|
-
2. Add
|
|
31
|
+
2. Add font stylesheets and theme to your `angular.json` build configuration:
|
|
18
32
|
|
|
33
|
+
```json
|
|
34
|
+
"styles": [
|
|
35
|
+
"node_modules/roboto-fontface/css/roboto/roboto-fontface.css",
|
|
36
|
+
"node_modules/material-icons/iconfont/material-icons.css",
|
|
37
|
+
"node_modules/@porscheinformatik/material-addons/themes/poa.scss"
|
|
38
|
+
]
|
|
19
39
|
```
|
|
20
|
-
|
|
21
|
-
|
|
40
|
+
|
|
41
|
+
**Available themes (all with M3 support from v22.0.0+):**
|
|
42
|
+
- `poa.scss` - Porsche Informatik Austria (cyan primary)
|
|
43
|
+
- `pbv.scss` - Porsche BVW (dark blue primary)
|
|
44
|
+
- `carcat.scss` - CARCAT (light blue primary, custom alert density)
|
|
45
|
+
|
|
46
|
+
**Note**: Font CSS files must be loaded via `angular.json` (not SCSS `@import`) due to SCSS module system requirements. The `roboto-fontface` and `material-icons` packages are included as dependencies.
|
|
22
47
|
|
|
23
48
|
3. To use a component, you need to import the Module of the component in your app.module.ts:
|
|
24
49
|
|
|
50
|
+
### CSS Variables
|
|
51
|
+
|
|
52
|
+
Material Addons exposes CSS variables for customization:
|
|
53
|
+
|
|
54
|
+
```scss
|
|
55
|
+
// Existing variables (v21.x and earlier)
|
|
56
|
+
--main-primary, --selection-background, --hover-color
|
|
57
|
+
--panel-color, --panel-background-color, --panel-border-color
|
|
58
|
+
--alert-*-background-color, --alert-*-border-color, --alert-*-text-color
|
|
59
|
+
|
|
60
|
+
// New M3 system tokens (v22.0.0+)
|
|
61
|
+
--mat-sys-primary, --mat-sys-surface, --mat-sys-on-surface
|
|
62
|
+
--mat-sys-outline, --mat-sys-outline-variant
|
|
63
|
+
--step-border-color, --toolbar-background, --datatable-background
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
See [MIGRATION_M2_TO_M3.md](https://github.com/porscheinformatik/material-addons/blob/master/MIGRATION_M2_TO_M3.md) for full CSS variable reference.
|
|
67
|
+
|
|
25
68
|
### Demo
|
|
26
69
|
|
|
27
70
|
The demo website is linked on the [github repository page](https://github.com/porscheinformatik/material-addons).
|