@smitag/angular-shared-ui 20.0.2 → 20.1.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 CHANGED
@@ -4,61 +4,66 @@ This repository contains themes for [Angular Material](https://github.com/angula
4
4
 
5
5
  ## Requirements
6
6
 
7
- * Angular >= 20
8
- * Angular material >= 20
7
+ - Angular >= 20
8
+ - Angular material >= 20
9
9
 
10
10
  ## Installation
11
11
 
12
- * Install Angular Material and it's peer dependencies as described on [material.angular.io](https://material.angular.io/guide/getting-started)
13
- * Skip including a prebuild theme
14
- * Install theme via npm `npm install @smitag/angular-shared-ui`
15
- * Add following code to your global style.scss
12
+ - Install Angular Material and it's peer dependencies as described on [material.angular.io](https://material.angular.io/guide/getting-started)
13
+ - Skip including a prebuild theme
14
+ - Install theme via npm `npm install @smitag/angular-shared-ui`
15
+ - Add following code to your global style.scss
16
16
  ```scss
17
- @use '@smitag/angular-shared-ui/src/lib/styles/styles';
17
+ @use '@smitag/angular-shared-ui/src/lib/styles/tokens';
18
+ @use '@smitag/angular-shared-ui/src/lib/styles/components';
19
+ @use '@smitag/angular-shared-ui/src/lib/styles/layout';
18
20
  @use '@smitag/angular-shared-ui/src/lib/styles/themes/default';
19
- @use '@smitag/angular-shared-ui/src/lib/styles/components/layout'; // optional
20
21
  ```
22
+
21
23
  ## Applying the theme color
22
24
 
23
- [Deprecated] it means that its use is not recommended, and it may be removed in future versions!
25
+ [Deprecated] it means that its use is not recommended, and it may be removed in future versions!
24
26
  If you want to apply the theme primary color to html elements, set the class to `theme-color-primary`.
25
27
  For the secondary color use `theme-color-secondary`. [/Deprecated]
26
28
 
27
29
  The system-level-colors generates a set of CSS classes based on color role that can be used across an app.
28
30
 
29
- * **Primary**, **Secondary**, **Tertiary** – Accent color roles used to emphasize or de-emphasize foreground elements.
30
- * **Container** – Roles used as a fill color for foreground elements like buttons.
31
- * **On** – Roles starting with this term indicate a color for text or icons on top of its paired parent color. For example, on primary is used for text and icons against the primary fill color.
32
- * **Variant** – Roles ending with this term offer a lower emphasis alternative to its non-variant pair. For example, outline variant is a less emphasized version of the outline color.
33
- * **Surface** – A role used for backgrounds and large, low-emphasis areas of the screen.
34
-
35
- Name | background-color | color |
36
- | --------------------------- | -------------------------- | ----------------------- |
37
- | Primary | .primary | .on-primary |
38
- | Primary fixed | - | .on-primary-fixed |
39
- | Primary container | .primary-container | .on-primary-container |
40
- | Secondary | .secondary | .on-secondary |
41
- | Secondary fixed | - | .on-secondary-fixed |
42
- | Secondary container | .secondary-container | .on-secondary-container |
43
- | Tertiary | .tertiary | .on-tertiary |
44
- | Tertiary fixed | - | .on-tertiary-fixed |
45
- | Tertiary container | .tertiary-container | .on-tertiary-container |
46
- | Error | .error | .on-error |
47
- | Error container | .error-container | .on-error-container |
48
- | Error fixed | - | .on-error-fixed |
49
- | Outline | - | .outline |
50
- | Outline variant | - | .outline-variant |
51
- | Surface | .surface | - |
52
- | Surface container lowest | .surface-container-lowest | - |
53
- | Surface container low | .surface-container-low | - |
54
- | Surface container | .surface-container | - |
55
- | Surface container high | .surface-container-high | - |
56
- | Surface container highest | .surface-container-highest | - |
31
+ - **Primary**, **Secondary**, **Tertiary** – Accent color roles used to emphasize or de-emphasize foreground elements.
32
+ - **Container** – Roles used as a fill color for foreground elements like buttons.
33
+ - **On** – Roles starting with this term indicate a color for text or icons on top of its paired parent color. For example, on primary is used for text and icons against the primary fill color.
34
+ - **Variant** – Roles ending with this term offer a lower emphasis alternative to its non-variant pair. For example, outline variant is a less emphasized version of the outline color.
35
+ - **Surface** – A role used for backgrounds and large, low-emphasis areas of the screen.
36
+
37
+ | Name | background-color | color |
38
+ | ------------------------- | -------------------------- | ----------------------- |
39
+ | Primary | .primary | .on-primary |
40
+ | Primary fixed | - | .on-primary-fixed |
41
+ | Primary container | .primary-container | .on-primary-container |
42
+ | Secondary | .secondary | .on-secondary |
43
+ | Secondary fixed | - | .on-secondary-fixed |
44
+ | Secondary container | .secondary-container | .on-secondary-container |
45
+ | Tertiary | .tertiary | .on-tertiary |
46
+ | Tertiary fixed | - | .on-tertiary-fixed |
47
+ | Tertiary container | .tertiary-container | .on-tertiary-container |
48
+ | Error | .error | .on-error |
49
+ | Error container | .error-container | .on-error-container |
50
+ | Error fixed | - | .on-error-fixed |
51
+ | Outline | - | .outline |
52
+ | Outline variant | - | .outline-variant |
53
+ | Surface | .surface | - |
54
+ | Surface container lowest | .surface-container-lowest | - |
55
+ | Surface container low | .surface-container-low | - |
56
+ | Surface container | .surface-container | - |
57
+ | Surface container high | .surface-container-high | - |
58
+ | Surface container highest | .surface-container-highest | - |
57
59
 
58
60
  #### Example:
61
+
59
62
  ```html
60
- <mat-card class="primary"> <!-- background-color -->
61
- <mat-card-content class="on-primary">primary</mat-card-content> <!-- color -->
63
+ <mat-card class="primary">
64
+ <!-- background-color -->
65
+ <mat-card-content class="on-primary">primary</mat-card-content>
66
+ <!-- color -->
62
67
  </mat-card>
63
68
  ```
64
69
 
@@ -70,23 +75,23 @@ There are large, medium, and small variations for Display, Headline, Title, Body
70
75
 
71
76
  The table below lists the CSS classes emitted and the native elements styled:
72
77
 
73
- | CSS class | Typescale level | Native Element |
74
- | ------------ | --------------- | -------------- |
75
- | .mat-display-large | display-large | \<h1\> |
76
- | .mat-display-medium | display-medium | \<h2\> |
77
- | .mat-display-small | display_small | \<h3\> |
78
- | .mat-headline-large | headline-large | \<h4\> |
79
- | .mat-headline-medium | headline-medium | \<h5\> |
80
- | .mat-headline-small | headline-small | \<h6\> |
81
- | .mat-title-large | title-large | none |
82
- | .mat-title-medium | title-medium | none |
83
- | .mat-title-small | title-small | none |
84
- | .mat-body-large | body-large | none |
85
- | .mat-body-medium | body-medium | none |
86
- | .mat-body-small | body-small | none |
87
- | .mat-label-large | label-large | none |
88
- | .mat-label-medium | label-medium | none |
89
- | .mat-label-small | label-small | none |
78
+ | CSS class | Typescale level | Native Element |
79
+ | -------------------- | --------------- | -------------- |
80
+ | .mat-display-large | display-large | \<h1\> |
81
+ | .mat-display-medium | display-medium | \<h2\> |
82
+ | .mat-display-small | display_small | \<h3\> |
83
+ | .mat-headline-large | headline-large | \<h4\> |
84
+ | .mat-headline-medium | headline-medium | \<h5\> |
85
+ | .mat-headline-small | headline-small | \<h6\> |
86
+ | .mat-title-large | title-large | none |
87
+ | .mat-title-medium | title-medium | none |
88
+ | .mat-title-small | title-small | none |
89
+ | .mat-body-large | body-large | none |
90
+ | .mat-body-medium | body-medium | none |
91
+ | .mat-body-small | body-small | none |
92
+ | .mat-label-large | label-large | none |
93
+ | .mat-label-medium | label-medium | none |
94
+ | .mat-label-small | label-small | none |
90
95
 
91
96
  ## Applying elevation
92
97
 
@@ -94,11 +99,11 @@ Material Design provides six levels of elevation that can be used to provide a s
94
99
 
95
100
  These levels are defined as CSS box-shadow values that can be styled to an element.
96
101
 
97
- | CSS class | Native Element |
98
- | ------------ | --------------- |
99
- | .level0 | none |
100
- | .level1 | .second-toolbar, .mat-mdc-card |
101
- | .level2 | none |
102
- | .level3 | .mat-mdc-mini-fab, .mat-mdc-fab |
103
- | .level4 | none |
104
- | .level5 | none |
102
+ | CSS class | Native Element |
103
+ | --------- | ------------------------------- |
104
+ | .level0 | none |
105
+ | .level1 | .second-toolbar, .mat-mdc-card |
106
+ | .level2 | none |
107
+ | .level3 | .mat-mdc-mini-fab, .mat-mdc-fab |
108
+ | .level4 | none |
109
+ | .level5 | none |
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@smitag/angular-shared-ui",
3
3
  "email": "benjamin.speidel@smartinsurtech.de",
4
- "version": "20.0.2",
4
+ "version": "20.1.0",
5
5
  "license": "MIT",
6
6
  "description": "Styling elements and methods shared by all frontends",
7
7
  "man": "README.md",
@@ -0,0 +1,21 @@
1
+ @use '@angular/material' as mat;
2
+
3
+ .mat-mdc-snack-bar-container.snack-bar-success {
4
+ @include mat.snack-bar-overrides(
5
+ (
6
+ button-color: #fff,
7
+ container-color: #058514,
8
+ container-shape: 4px,
9
+ )
10
+ );
11
+ }
12
+
13
+ .mat-mdc-snack-bar-container.snack-bar-error {
14
+ @include mat.snack-bar-overrides(
15
+ (
16
+ button-color: #fff,
17
+ container-color: #cc0000,
18
+ container-shape: 4px,
19
+ )
20
+ );
21
+ }
@@ -1,15 +1,12 @@
1
- @use '@angular/material' as mat;
2
- @use './components/helper';
3
- @use './components/header';
4
1
  @use './components/card';
5
- @use './components/colors';
6
- @use './components/elevation';
2
+ @use './components/dialog';
3
+ @use './components/drawer';
7
4
  @use './components/form';
5
+ @use './components/header';
6
+ @use './components/helper';
7
+ @use './components/snackbar';
8
8
  @use './components/tab';
9
9
  @use './components/toolbar';
10
- @use './components/dialog';
11
- @use './components/drawer';
12
- @use './fonts/typo';
13
10
 
14
11
  html,
15
12
  body {
@@ -90,11 +87,6 @@ strong {
90
87
  }
91
88
  }
92
89
 
93
- .mat-mdc-snack-bar-container
94
- .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) {
95
- color: #fff;
96
- }
97
-
98
90
  .mat-radio-label-content,
99
91
  .mat-checkbox-label {
100
92
  white-space: initial;
@@ -151,30 +143,6 @@ a:hover {
151
143
  text-decoration: underline;
152
144
  }
153
145
 
154
- .mat-mdc-snack-bar-container.snack-bar-success {
155
- @include mat.snack-bar-overrides(
156
- (
157
- button-color: #fff,
158
- container-color: #058514,
159
- container-shape: 4px,
160
- )
161
- );
162
- }
163
-
164
- .mat-mdc-snack-bar-container.snack-bar-error {
165
- @include mat.snack-bar-overrides(
166
- (
167
- button-color: #fff,
168
- container-color: #cc0000,
169
- container-shape: 4px,
170
- )
171
- );
172
- }
173
-
174
- .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) {
175
- --mat-mdc-snack-bar-button-color: #fff;
176
- }
177
-
178
146
  .material-icons {
179
147
  font-family: 'Material Icons', sans-serif;
180
148
  font-weight: normal;
@@ -0,0 +1 @@
1
+ @use './layout/layout';
@@ -2,19 +2,18 @@
2
2
  font-family: 'Material Icons';
3
3
  font-style: normal;
4
4
  font-weight: 400;
5
- src: url('MaterialIcons-Regular.ttf'); /* For IE6-8 */
5
+ src: url('../fonts/MaterialIcons-Regular.ttf'); /* For IE6-8 */
6
6
  src: local('Material Icons'), local('MaterialIcons-Regular'),
7
- url('MaterialIcons-Regular.ttf') format('truetype');
7
+ url('../fonts/MaterialIcons-Regular.ttf') format('truetype');
8
8
  }
9
9
 
10
10
  // IBM Plex Sans
11
-
12
11
  @font-face {
13
12
  font-family: 'IBM Plex Sans';
14
13
  font-style: normal;
15
14
  font-weight: 300;
16
15
  font-display: 'swap';
17
- src: url('IBMPlexSans-Light.ttf') format('truetype');
16
+ src: url('../fonts/IBMPlexSans-Light.ttf') format('truetype');
18
17
  }
19
18
 
20
19
  @font-face {
@@ -22,7 +21,7 @@
22
21
  font-style: normal;
23
22
  font-weight: 400;
24
23
  font-display: 'swap';
25
- src: url('IBMPlexSans-Regular.ttf') format('truetype');
24
+ src: url('../fonts/IBMPlexSans-Regular.ttf') format('truetype');
26
25
  }
27
26
 
28
27
  @font-face {
@@ -30,7 +29,7 @@
30
29
  font-style: normal;
31
30
  font-weight: 500;
32
31
  font-display: 'swap';
33
- src: url('IBMPlexSans-Medium.ttf') format('truetype');
32
+ src: url('../fonts/IBMPlexSans-Medium.ttf') format('truetype');
34
33
  }
35
34
 
36
35
  @font-face {
@@ -38,7 +37,7 @@
38
37
  font-style: normal;
39
38
  font-weight: 600;
40
39
  font-display: 'swap';
41
- src: url('IBMPlexSans-SemiBold.ttf') format('truetype');
40
+ src: url('../fonts/IBMPlexSans-SemiBold.ttf') format('truetype');
42
41
  }
43
42
 
44
43
  @font-face {
@@ -46,17 +45,16 @@
46
45
  font-style: normal;
47
46
  font-weight: 700;
48
47
  font-display: 'swap';
49
- src: url('IBMPlexSans-Bold.ttf') format('truetype');
48
+ src: url('../fonts/IBMPlexSans-Bold.ttf') format('truetype');
50
49
  }
51
50
 
52
51
  // Poppins
53
-
54
52
  @font-face {
55
53
  font-family: 'Poppins';
56
54
  font-style: normal;
57
55
  font-weight: 300;
58
56
  font-display: swap;
59
- src: url('Poppins-Light.ttf') format('truetype');
57
+ src: url('../fonts/Poppins-Light.ttf') format('truetype');
60
58
  }
61
59
 
62
60
  @font-face {
@@ -64,7 +62,7 @@
64
62
  font-style: normal;
65
63
  font-weight: 400;
66
64
  font-display: swap;
67
- src: url('Poppins-Regular.ttf') format('truetype');
65
+ src: url('../fonts/Poppins-Regular.ttf') format('truetype');
68
66
  }
69
67
 
70
68
  @font-face {
@@ -72,7 +70,7 @@
72
70
  font-style: normal;
73
71
  font-weight: 500;
74
72
  font-display: swap;
75
- src: url('Poppins-Medium.ttf') format('truetype');
73
+ src: url('../fonts/Poppins-Medium.ttf') format('truetype');
76
74
  }
77
75
 
78
76
  @font-face {
@@ -80,7 +78,7 @@
80
78
  font-style: normal;
81
79
  font-weight: 600;
82
80
  font-display: swap;
83
- src: url('Poppins-SemiBold.ttf') format('truetype');
81
+ src: url('../fonts/Poppins-SemiBold.ttf') format('truetype');
84
82
  }
85
83
 
86
84
  @font-face {
@@ -88,17 +86,16 @@
88
86
  font-style: normal;
89
87
  font-weight: 700;
90
88
  font-display: swap;
91
- src: url('Poppins-Bold.ttf') format('truetype');
89
+ src: url('../fonts/Poppins-Bold.ttf') format('truetype');
92
90
  }
93
91
 
94
92
  // Source Sans Pro
95
-
96
93
  @font-face {
97
94
  font-family: 'Source Sans Pro';
98
95
  font-style: normal;
99
96
  font-weight: 300;
100
97
  font-display: 'swap';
101
- src: url('SourceSansPro-Light.ttf') format('truetype');
98
+ src: url('../fonts/SourceSansPro-Light.ttf') format('truetype');
102
99
  }
103
100
 
104
101
  @font-face {
@@ -106,7 +103,7 @@
106
103
  font-style: normal;
107
104
  font-weight: 400;
108
105
  font-display: 'swap';
109
- src: url('SourceSansPro-Regular.ttf') format('truetype');
106
+ src: url('../fonts/SourceSansPro-Regular.ttf') format('truetype');
110
107
  }
111
108
 
112
109
  @font-face {
@@ -114,7 +111,7 @@
114
111
  font-style: normal;
115
112
  font-weight: 600;
116
113
  font-display: 'swap';
117
- src: url('SourceSansPro-SemiBold.ttf') format('truetype');
114
+ src: url('../fonts/SourceSansPro-SemiBold.ttf') format('truetype');
118
115
  }
119
116
 
120
117
  @font-face {
@@ -122,17 +119,16 @@
122
119
  font-style: normal;
123
120
  font-weight: 700;
124
121
  font-display: 'swap';
125
- src: url('SourceSansPro-Bold.ttf') format('truetype');
122
+ src: url('../fonts/SourceSansPro-Bold.ttf') format('truetype');
126
123
  }
127
124
 
128
125
  // IBM Plex Sans Condensed
129
-
130
126
  @font-face {
131
127
  font-family: 'IBM Plex Sans Condensed';
132
128
  font-style: normal;
133
129
  font-weight: 400;
134
130
  font-display: 'swap';
135
- src: url('IBMPlexSansCondensed-Regular.ttf') format('truetype');
131
+ src: url('../fonts/IBMPlexSansCondensed-Regular.ttf') format('truetype');
136
132
  }
137
133
 
138
134
  @font-face {
@@ -140,7 +136,7 @@
140
136
  font-style: normal;
141
137
  font-weight: 500;
142
138
  font-display: 'swap';
143
- src: url('IBMPlexSansCondensed-Medium.ttf') format('truetype');
139
+ src: url('../fonts/IBMPlexSansCondensed-Medium.ttf') format('truetype');
144
140
  }
145
141
 
146
142
  @font-face {
@@ -148,7 +144,7 @@
148
144
  font-style: normal;
149
145
  font-weight: 600;
150
146
  font-display: 'swap';
151
- src: url('IBMPlexSansCondensed-SemiBold.ttf') format('truetype');
147
+ src: url('../fonts/IBMPlexSansCondensed-SemiBold.ttf') format('truetype');
152
148
  }
153
149
 
154
150
  h1 {
@@ -0,0 +1,3 @@
1
+ @use './tokens/colors';
2
+ @use './tokens/typo';
3
+ @use './tokens/elevation';