@siemens/element-theme 51.0.0-rc.3 → 51.0.0-rc.4
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 +13 -0
- package/package.json +3 -2
- package/src/styles/_accessibility.scss +4 -0
- package/src/styles/bootstrap/_forms.scss +1 -0
- package/src/styles/bootstrap/_mixins.scss +1 -0
- package/src/styles/bootstrap/_type.scss +11 -33
- package/src/styles/bootstrap/forms/_form-layout.scss +10 -0
- package/src/styles/bootstrap/forms/_validation.scss +0 -3
- package/src/styles/bootstrap/mixins/_form-layout.scss +60 -0
- package/src/styles/components/_datatable.scss +7 -10
- package/src/styles/components/_list-item.scss +21 -7
- package/src/styles/variables/_typography.scss +0 -60
package/README.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://element.siemens.io" target="_blank">
|
|
3
|
+
<img src="https://raw.githubusercontent.com/siemens/element/refs/heads/main/element-logo.svg" alt="Siemens Element" height="132" width="132">
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<h1 align="center">@siemens/element-theme</h1>
|
|
8
|
+
|
|
9
|
+
The Element theme provides the CSS and SCSS that implement the Siemens Design Language.
|
|
10
|
+
It includes design tokens, typography, and color schemes with light and dark theme support.
|
|
11
|
+
It is used by the Element Angular components.
|
|
12
|
+
|
|
13
|
+
**Get started, explore components and read the docs at [element.siemens.io](https://element.siemens.io).**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@siemens/element-theme",
|
|
3
|
-
"version": "51.0.0-rc.
|
|
3
|
+
"version": "51.0.0-rc.4",
|
|
4
4
|
"description": "Element CSS theme.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -24,5 +24,6 @@
|
|
|
24
24
|
"responsive",
|
|
25
25
|
"front-end",
|
|
26
26
|
"framework"
|
|
27
|
-
]
|
|
27
|
+
],
|
|
28
|
+
"readme": "<p align=\"center\">\n <a href=\"https://element.siemens.io\" target=\"_blank\">\n <img src=\"https://raw.githubusercontent.com/siemens/element/refs/heads/main/element-logo.svg\" alt=\"Siemens Element\" height=\"132\" width=\"132\">\n </a>\n</p>\n\n<h1 align=\"center\">@siemens/element-theme</h1>\n\nThe Element theme provides the CSS and SCSS that implement the Siemens Design Language.\nIt includes design tokens, typography, and color schemes with light and dark theme support.\nIt is used by the Element Angular components.\n\n**Get started, explore components and read the docs at [element.siemens.io](https://element.siemens.io).**\n"
|
|
28
29
|
}
|
|
@@ -112,9 +112,7 @@ h1,
|
|
|
112
112
|
);
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
.si-h1-bold
|
|
116
|
-
// @deprecated Will be removed in a future major version, use `.si-h1-bold` instead.
|
|
117
|
-
.si-h1-black {
|
|
115
|
+
.si-h1-bold {
|
|
118
116
|
@include typography.si-font(
|
|
119
117
|
typography.$si-font-size-h1-bold,
|
|
120
118
|
typography.$si-line-height-h1-bold,
|
|
@@ -142,9 +140,7 @@ h3,
|
|
|
142
140
|
);
|
|
143
141
|
}
|
|
144
142
|
|
|
145
|
-
.si-h4-bold
|
|
146
|
-
// @deprecated Will be removed in a future major version, use `.si-h4-bold` instead.
|
|
147
|
-
.si-title-1-bold {
|
|
143
|
+
.si-h4-bold {
|
|
148
144
|
@include typography.si-font(
|
|
149
145
|
typography.$si-font-size-h4-bold,
|
|
150
146
|
typography.$si-line-height-h4-bold,
|
|
@@ -154,9 +150,7 @@ h3,
|
|
|
154
150
|
|
|
155
151
|
h4,
|
|
156
152
|
.h4,
|
|
157
|
-
.si-h4
|
|
158
|
-
// @deprecated Will be removed in a future major version, use `.si-h4` instead.
|
|
159
|
-
.si-title-1 {
|
|
153
|
+
.si-h4 {
|
|
160
154
|
@include typography.si-font(
|
|
161
155
|
typography.$si-font-size-h4,
|
|
162
156
|
typography.$si-line-height-h4,
|
|
@@ -164,9 +158,7 @@ h4,
|
|
|
164
158
|
);
|
|
165
159
|
}
|
|
166
160
|
|
|
167
|
-
.si-h5-bold
|
|
168
|
-
// @deprecated Will be removed in a future major version, use `.si-h5-bold` instead.
|
|
169
|
-
.si-title-2-bold {
|
|
161
|
+
.si-h5-bold {
|
|
170
162
|
@include typography.si-font(
|
|
171
163
|
typography.$si-font-size-h5-bold,
|
|
172
164
|
typography.$si-line-height-h5-bold,
|
|
@@ -178,9 +170,7 @@ h5,
|
|
|
178
170
|
h6,
|
|
179
171
|
.h5,
|
|
180
172
|
.h6,
|
|
181
|
-
.si-h5
|
|
182
|
-
// @deprecated Will be removed in a future major version, use `.si-h5` instead.
|
|
183
|
-
.si-title-2 {
|
|
173
|
+
.si-h5 {
|
|
184
174
|
@include typography.si-font(
|
|
185
175
|
typography.$si-font-size-h5,
|
|
186
176
|
typography.$si-line-height-h5,
|
|
@@ -188,9 +178,7 @@ h6,
|
|
|
188
178
|
);
|
|
189
179
|
}
|
|
190
180
|
|
|
191
|
-
.si-body-lg
|
|
192
|
-
// @deprecated Will be removed in a future major version, use `.si-body-lg` instead.
|
|
193
|
-
.si-body-1 {
|
|
181
|
+
.si-body-lg {
|
|
194
182
|
@include typography.si-font(
|
|
195
183
|
typography.$si-font-size-body-lg,
|
|
196
184
|
typography.$si-line-height-body-lg,
|
|
@@ -198,9 +186,7 @@ h6,
|
|
|
198
186
|
);
|
|
199
187
|
}
|
|
200
188
|
|
|
201
|
-
.si-body
|
|
202
|
-
// @deprecated Will be removed in a future major version, use `.si-body` instead.
|
|
203
|
-
.si-body-2 {
|
|
189
|
+
.si-body {
|
|
204
190
|
@include typography.si-font(
|
|
205
191
|
typography.$si-font-size-body,
|
|
206
192
|
typography.$si-line-height-body,
|
|
@@ -217,9 +203,7 @@ h6,
|
|
|
217
203
|
}
|
|
218
204
|
|
|
219
205
|
.si-display-xl,
|
|
220
|
-
.display-1
|
|
221
|
-
// @deprecated Will be removed in a future major version, use `.si-display-xl` instead.
|
|
222
|
-
.si-display-1 {
|
|
206
|
+
.display-1 {
|
|
223
207
|
@include typography.si-font(
|
|
224
208
|
typography.$si-font-size-display-xl,
|
|
225
209
|
typography.$si-line-height-display-xl,
|
|
@@ -228,9 +212,7 @@ h6,
|
|
|
228
212
|
}
|
|
229
213
|
|
|
230
214
|
.si-display-lg,
|
|
231
|
-
.display-2
|
|
232
|
-
// @deprecated Will be removed in a future major version, use `.si-display-lg` instead.
|
|
233
|
-
.si-display-2 {
|
|
215
|
+
.display-2 {
|
|
234
216
|
@include typography.si-font(
|
|
235
217
|
typography.$si-font-size-display-lg,
|
|
236
218
|
typography.$si-line-height-display-lg,
|
|
@@ -239,9 +221,7 @@ h6,
|
|
|
239
221
|
}
|
|
240
222
|
|
|
241
223
|
.si-display-bold,
|
|
242
|
-
.display-3
|
|
243
|
-
// @deprecated Will be removed in a future major version, use `.si-display-bold` instead.
|
|
244
|
-
.si-display-3 {
|
|
224
|
+
.display-3 {
|
|
245
225
|
@include typography.si-font(
|
|
246
226
|
typography.$si-font-size-display-bold,
|
|
247
227
|
typography.$si-line-height-display-bold,
|
|
@@ -250,9 +230,7 @@ h6,
|
|
|
250
230
|
}
|
|
251
231
|
|
|
252
232
|
.si-display,
|
|
253
|
-
.display-4
|
|
254
|
-
// @deprecated Will be removed in a future major version, use `.si-display` instead.
|
|
255
|
-
.si-display-4 {
|
|
233
|
+
.display-4 {
|
|
256
234
|
@include typography.si-font(
|
|
257
235
|
typography.$si-font-size-display,
|
|
258
236
|
typography.$si-line-height-display,
|
|
@@ -43,9 +43,6 @@
|
|
|
43
43
|
@mixin form-validation-styles($state, $color, $icon) {
|
|
44
44
|
@if ($state and $icon) {
|
|
45
45
|
--si-feedback-icon: #{$icon};
|
|
46
|
-
// TODO: remove with v50
|
|
47
|
-
// DEPRECATED: use --si-feedback-icon-size instead
|
|
48
|
-
--si-feedback-icon-offset: 1.5rem;
|
|
49
46
|
--si-feedback-icon-size: #{si-vars.$si-icon-font-size};
|
|
50
47
|
}
|
|
51
48
|
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../variables/spacers';
|
|
3
|
+
@use '../variables';
|
|
4
|
+
|
|
5
|
+
$form-col-layout-label-width: 16ch !default;
|
|
6
|
+
|
|
7
|
+
/* Turns every inner form-field into a column layout */
|
|
8
|
+
@mixin form-col-layout {
|
|
9
|
+
.si-form-input:not(.form-check),
|
|
10
|
+
.si-form-input.form-check:not(.form-check-inline) {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: row;
|
|
13
|
+
align-items: start;
|
|
14
|
+
column-gap: map.get(spacers.$spacers, 6);
|
|
15
|
+
|
|
16
|
+
> .form-label {
|
|
17
|
+
flex: 0 0 var(--si-form-label-width, #{$form-col-layout-label-width});
|
|
18
|
+
max-inline-size: var(--si-form-label-width, #{$form-col-layout-label-width});
|
|
19
|
+
align-self: start;
|
|
20
|
+
padding-block: variables.$input-padding-y + variables.$input-border-width;
|
|
21
|
+
line-height: variables.$input-line-height;
|
|
22
|
+
|
|
23
|
+
&:empty {
|
|
24
|
+
display: block;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
> :not(.form-label) {
|
|
29
|
+
flex: 1 1 auto;
|
|
30
|
+
min-inline-size: 0;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.si-form-input.form-check:not(.form-check-inline) {
|
|
35
|
+
padding-inline-start: 0;
|
|
36
|
+
|
|
37
|
+
.form-check-input {
|
|
38
|
+
margin-inline-start: 0;
|
|
39
|
+
margin-inline-end: map.get(spacers.$spacers, 4);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
si-form-fieldset.si-form-input {
|
|
44
|
+
align-items: start;
|
|
45
|
+
|
|
46
|
+
> .form-label {
|
|
47
|
+
align-self: start;
|
|
48
|
+
padding-block: map.get(spacers.$spacers, 1) 0 !important; // stylelint-disable-line declaration-no-important
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* Turns every inner form-field into a column layout above a min-width. */
|
|
54
|
+
@mixin responsive-form-col-layout($min-width) {
|
|
55
|
+
container-type: inline-size;
|
|
56
|
+
|
|
57
|
+
@container (min-width: #{$min-width}) {
|
|
58
|
+
@include form-col-layout;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
@use 'sass:map';
|
|
11
11
|
|
|
12
12
|
$datatable-header-border-color: variables.$table-border-color !default;
|
|
13
|
-
$datatable-header-background-color:
|
|
13
|
+
$datatable-header-background-color: variables.$table-bg !default;
|
|
14
14
|
$datatable-header-color: semantic-tokens.$element-text-primary !default;
|
|
15
15
|
$datatable-footer-background-color: transparent !default;
|
|
16
16
|
|
|
@@ -46,6 +46,11 @@ $datatable-ghost-cell-strip-radius: 0 !default;
|
|
|
46
46
|
background-color: variables.$table-bg;
|
|
47
47
|
border-radius: semantic-tokens.$element-radius-2;
|
|
48
48
|
|
|
49
|
+
// Compat for v26. This element hos no class.
|
|
50
|
+
[role='table'] {
|
|
51
|
+
flex: 1;
|
|
52
|
+
}
|
|
53
|
+
|
|
49
54
|
&.table-custom {
|
|
50
55
|
--si-datatable-row-min-height: 24px;
|
|
51
56
|
}
|
|
@@ -202,13 +207,10 @@ $datatable-ghost-cell-strip-radius: 0 !default;
|
|
|
202
207
|
// Header Styles
|
|
203
208
|
.datatable-header {
|
|
204
209
|
padding: 0;
|
|
205
|
-
display: flex;
|
|
206
|
-
align-items: center;
|
|
207
210
|
border-block-end: 4px solid $datatable-header-border-color;
|
|
208
211
|
background-color: $datatable-header-background-color;
|
|
209
212
|
color: $datatable-header-color;
|
|
210
213
|
block-size: $datatable-header-height;
|
|
211
|
-
vertical-align: baseline;
|
|
212
214
|
font-size: typography.$si-font-size-h5;
|
|
213
215
|
font-weight: typography.$si-font-weight-h5;
|
|
214
216
|
line-height: typography.$si-line-height-h5;
|
|
@@ -251,7 +253,7 @@ $datatable-ghost-cell-strip-radius: 0 !default;
|
|
|
251
253
|
// Summary Styles
|
|
252
254
|
.datatable-summary-row .datatable-body-row {
|
|
253
255
|
background-color: $datatable-summary-background-color;
|
|
254
|
-
font-weight: typography.$si-font-weight-
|
|
256
|
+
font-weight: typography.$si-font-weight-h5;
|
|
255
257
|
}
|
|
256
258
|
|
|
257
259
|
// Body Styles
|
|
@@ -312,17 +314,12 @@ $datatable-ghost-cell-strip-radius: 0 !default;
|
|
|
312
314
|
}
|
|
313
315
|
}
|
|
314
316
|
}
|
|
315
|
-
|
|
316
|
-
.datatable-body-row:has(.datatable-row-group) {
|
|
317
|
-
min-inline-size: fit-content;
|
|
318
|
-
}
|
|
319
317
|
}
|
|
320
318
|
|
|
321
319
|
// Footer Styles
|
|
322
320
|
.datatable-footer {
|
|
323
321
|
display: flex;
|
|
324
322
|
align-items: flex-end;
|
|
325
|
-
flex: 1;
|
|
326
323
|
align-content: flex-end;
|
|
327
324
|
background-color: $datatable-footer-background-color;
|
|
328
325
|
color: semantic-tokens.$element-text-secondary;
|
|
@@ -13,13 +13,13 @@ ol:has(.list-item) {
|
|
|
13
13
|
|
|
14
14
|
.list-item {
|
|
15
15
|
display: grid;
|
|
16
|
-
grid-template-columns: 1fr auto;
|
|
16
|
+
grid-template-columns: auto 1fr auto;
|
|
17
17
|
grid-template-areas:
|
|
18
|
-
'timestamp
|
|
19
|
-
'title
|
|
20
|
-
'description
|
|
21
|
-
'metadata
|
|
22
|
-
'quick-actions quick-actions';
|
|
18
|
+
'. timestamp timestamp'
|
|
19
|
+
'indicator title action'
|
|
20
|
+
'. description description'
|
|
21
|
+
'. metadata metadata'
|
|
22
|
+
'. quick-actions quick-actions';
|
|
23
23
|
padding-block: map.get(variables.$spacers, 4);
|
|
24
24
|
padding-inline: map.get(variables.$spacers, 6);
|
|
25
25
|
|
|
@@ -30,7 +30,21 @@ ol:has(.list-item) {
|
|
|
30
30
|
);
|
|
31
31
|
|
|
32
32
|
> * {
|
|
33
|
-
grid-column:
|
|
33
|
+
grid-column: 2 / -1;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.list-item-indicator {
|
|
37
|
+
grid-area: indicator;
|
|
38
|
+
display: flex;
|
|
39
|
+
align-self: center;
|
|
40
|
+
align-items: center;
|
|
41
|
+
// This restricts the height on purpose.
|
|
42
|
+
// Content taller than the title remains centered and overflows on both sides.
|
|
43
|
+
max-block-size: calc(
|
|
44
|
+
#{typography.$si-line-height-h5 * typography.$si-font-size-h5} +
|
|
45
|
+
#{map.get(variables.$spacers, 4) * 2}
|
|
46
|
+
);
|
|
47
|
+
margin-inline-end: map.get(variables.$spacers, 4);
|
|
34
48
|
}
|
|
35
49
|
|
|
36
50
|
.list-item-timestamp {
|
|
@@ -86,63 +86,3 @@ $si-font-weight-display-bold: $si-font-weight-bold;
|
|
|
86
86
|
$si-font-size-display: px-to-rem(40px);
|
|
87
87
|
$si-line-height-display: px-to-ratio($si-font-size-display, 52px);
|
|
88
88
|
$si-font-weight-display: $si-font-weight-normal;
|
|
89
|
-
|
|
90
|
-
// @deprecated Will be removed in a future major version, use `$si-*-h1-bold` instead.
|
|
91
|
-
$si-font-size-h1-black: $si-font-size-h1-bold;
|
|
92
|
-
$si-line-height-h1-black: $si-line-height-h1-bold;
|
|
93
|
-
$si-font-weight-h1-black: $si-font-weight-h1-bold;
|
|
94
|
-
|
|
95
|
-
// @deprecated Will be removed in a future major version, use `$si-*-h4-bold` instead.
|
|
96
|
-
$si-font-size-title-1-bold: $si-font-size-h4-bold;
|
|
97
|
-
$si-line-height-title-1-bold: $si-line-height-h4-bold;
|
|
98
|
-
$si-font-weight-title-1-bold: $si-font-weight-h4-bold;
|
|
99
|
-
|
|
100
|
-
// @deprecated Will be removed in a future major version, use `$si-*-h4` instead.
|
|
101
|
-
$si-font-size-title-1: $si-font-size-h4;
|
|
102
|
-
$si-line-height-title-1: $si-line-height-h4;
|
|
103
|
-
$si-font-weight-title-1: $si-font-weight-h4;
|
|
104
|
-
|
|
105
|
-
// @deprecated Will be removed in a future major version, use `$si-*-h5-bold` instead.
|
|
106
|
-
$si-font-size-title-2-bold: $si-font-size-h5-bold;
|
|
107
|
-
$si-line-height-title-2-bold: $si-line-height-h5-bold;
|
|
108
|
-
$si-font-weight-title-2-bold: $si-font-weight-h5-bold;
|
|
109
|
-
|
|
110
|
-
// @deprecated Will be removed in a future major version, use `$si-*-h5` instead.
|
|
111
|
-
$si-font-size-title-2: $si-font-size-h5;
|
|
112
|
-
$si-line-height-title-2: $si-line-height-h5;
|
|
113
|
-
$si-font-weight-title-2: $si-font-weight-h5;
|
|
114
|
-
|
|
115
|
-
// @deprecated Will be removed in a future major version, use `$si-*-body-lg` instead.
|
|
116
|
-
$si-font-size-body-1: $si-font-size-body-lg;
|
|
117
|
-
$si-line-height-body-1: $si-line-height-body-lg;
|
|
118
|
-
$si-font-weight-body-1: $si-font-weight-body-lg;
|
|
119
|
-
|
|
120
|
-
// @deprecated Will be removed in a future major version, use `$si-*-body` instead.
|
|
121
|
-
$si-font-size-body-2: $si-font-size-body;
|
|
122
|
-
$si-line-height-body-2: $si-line-height-body;
|
|
123
|
-
$si-font-weight-body-2: $si-font-weight-body;
|
|
124
|
-
|
|
125
|
-
// @deprecated Will be removed in a future major version, use `$si-*-caption` instead.
|
|
126
|
-
$si-font-size-caption-1: $si-font-size-caption;
|
|
127
|
-
$si-line-height-caption-1: $si-line-height-caption;
|
|
128
|
-
$si-font-weight-caption-1: $si-font-weight-caption;
|
|
129
|
-
|
|
130
|
-
// @deprecated Will be removed in a future major version, use `$si-*-display-xl` instead.
|
|
131
|
-
$si-font-size-display-1: $si-font-size-display-xl;
|
|
132
|
-
$si-line-height-display-1: $si-line-height-display-xl;
|
|
133
|
-
$si-font-weight-display-1: $si-font-weight-display-xl;
|
|
134
|
-
|
|
135
|
-
// @deprecated Will be removed in a future major version, use `$si-*-display-lg` instead.
|
|
136
|
-
$si-font-size-display-2: $si-font-size-display-lg;
|
|
137
|
-
$si-line-height-display-2: $si-line-height-display-lg;
|
|
138
|
-
$si-font-weight-display-2: $si-font-weight-display-lg;
|
|
139
|
-
|
|
140
|
-
// @deprecated Will be removed in a future major version, use `$si-*-display-bold` instead.
|
|
141
|
-
$si-font-size-display-3: $si-font-size-display-bold;
|
|
142
|
-
$si-line-height-display-3: $si-line-height-display-bold;
|
|
143
|
-
$si-font-weight-display-3: $si-font-weight-display-bold;
|
|
144
|
-
|
|
145
|
-
// @deprecated Will be removed in a future major version, use `$si-*-display` instead.
|
|
146
|
-
$si-font-size-display-4: $si-font-size-display;
|
|
147
|
-
$si-line-height-display-4: $si-line-height-display;
|
|
148
|
-
$si-font-weight-display-4: $si-font-weight-display;
|