@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 +69 -64
- package/package.json +1 -1
- package/src/lib/styles/components/_snackbar.scss +21 -0
- package/src/lib/styles/{styles.scss → components.scss} +5 -37
- package/src/lib/styles/layout.scss +1 -0
- package/src/lib/styles/{fonts → tokens}/_typo.scss +19 -23
- package/src/lib/styles/tokens.scss +3 -0
- /package/src/lib/styles/{components → layout}/_layout.scss +0 -0
- /package/src/lib/styles/{components → tokens}/_colors.scss +0 -0
- /package/src/lib/styles/{components → tokens}/_elevation.scss +0 -0
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
|
-
|
|
8
|
-
|
|
7
|
+
- Angular >= 20
|
|
8
|
+
- Angular material >= 20
|
|
9
9
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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/
|
|
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]
|
|
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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
Name
|
|
36
|
-
|
|
|
37
|
-
| Primary
|
|
38
|
-
| Primary fixed
|
|
39
|
-
| Primary container
|
|
40
|
-
| Secondary
|
|
41
|
-
| Secondary fixed
|
|
42
|
-
| Secondary container
|
|
43
|
-
| Tertiary
|
|
44
|
-
| Tertiary fixed
|
|
45
|
-
| Tertiary container
|
|
46
|
-
| Error
|
|
47
|
-
| Error container
|
|
48
|
-
| Error fixed
|
|
49
|
-
| Outline
|
|
50
|
-
| Outline variant
|
|
51
|
-
| Surface
|
|
52
|
-
| Surface container lowest
|
|
53
|
-
| Surface container low
|
|
54
|
-
| Surface container
|
|
55
|
-
| Surface container high
|
|
56
|
-
| 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">
|
|
61
|
-
|
|
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
|
|
74
|
-
|
|
|
75
|
-
| .mat-display-large
|
|
76
|
-
| .mat-display-medium
|
|
77
|
-
| .mat-display-small
|
|
78
|
-
| .mat-headline-large | headline-large
|
|
79
|
-
| .mat-headline-medium | headline-medium
|
|
80
|
-
| .mat-headline-small | headline-small
|
|
81
|
-
| .mat-title-large
|
|
82
|
-
| .mat-title-medium
|
|
83
|
-
| .mat-title-small
|
|
84
|
-
| .mat-body-large
|
|
85
|
-
| .mat-body-medium
|
|
86
|
-
| .mat-body-small
|
|
87
|
-
| .mat-label-large
|
|
88
|
-
| .mat-label-medium
|
|
89
|
-
| .mat-label-small
|
|
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
|
|
98
|
-
|
|
|
99
|
-
| .level0
|
|
100
|
-
| .level1
|
|
101
|
-
| .level2
|
|
102
|
-
| .level3
|
|
103
|
-
| .level4
|
|
104
|
-
| .level5
|
|
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
|
@@ -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/
|
|
6
|
-
@use './components/
|
|
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 {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|