@siemens/element-theme 51.3.0 → 51.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@siemens/element-theme",
3
- "version": "51.3.0",
3
+ "version": "51.5.0",
4
4
  "description": "Element CSS theme.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -59,6 +59,13 @@
59
59
  }
60
60
  }
61
61
 
62
+ // Only leading icons reserve a column; nested dropdowns handle their own alignment.
63
+ @scope (.dropdown-menu:has(.dropdown-item-icon)) to (.dropdown-menu) {
64
+ .item-title:first-child {
65
+ padding-inline-start: calc(variables.$si-icon-font-size + map.get(spacers.$spacers-inline, 4));
66
+ }
67
+ }
68
+
62
69
  .dropdown-toggle {
63
70
  --caret-rotate: 0deg;
64
71
  text-align: start;
@@ -186,34 +193,6 @@
186
193
  border-block-start: 1px solid bootstrap-variables.$dropdown-divider-bg;
187
194
  }
188
195
 
189
- .dropdown > .dropdown-menu {
190
- inset-block: 100% auto;
191
- inset-inline: 0 auto;
192
- margin-block: bootstrap-variables.$dropdown-spacer 0;
193
- margin-inline: 0;
194
- }
195
-
196
- .dropup > .dropdown-menu {
197
- inset-block: auto 100%;
198
- inset-inline: auto;
199
- margin-block: 0 bootstrap-variables.$dropdown-spacer;
200
- margin-inline: 0;
201
- }
202
-
203
- .dropend > .dropdown-menu {
204
- inset-block: 0 auto;
205
- inset-inline: 100% auto;
206
- margin-block: 0;
207
- margin-inline: bootstrap-variables.$dropdown-spacer 0;
208
- }
209
-
210
- .dropstart > .dropdown-menu {
211
- inset-block: 0 auto;
212
- inset-inline: auto 100%;
213
- margin-block: 0;
214
- margin-inline: 0 bootstrap-variables.$dropdown-spacer;
215
- }
216
-
217
196
  .dropdown-menu {
218
197
  &.align-center {
219
198
  left: 0; // stylelint-disable-line property-layout-mappings
@@ -8,8 +8,8 @@
8
8
 
9
9
  // Rough mapping, the markup has to be restructured, this is not a class rename:
10
10
  // `.list-group` -> `.list`, optionally with `.list-divider`, `.list-filled` or `.list-outline`
11
- // `.list-group-item` -> `.list-item`, children need explicit slot classes
12
- // (`.list-item-title`, `.list-item-description`, ...)
11
+ // `.list-group-item` -> `.list-item`, slot classes such as `.list-item-title`
12
+ // and `.list-item-description` are optional
13
13
  // `.list-group-item-action` -> `.list-item.list-item-action`
14
14
  // `.list-group-flush` -> `.list.list-divider` to preserve dividers; otherwise
15
15
  // `.list`, which has no outer border
@@ -89,18 +89,7 @@ $si-popover-bg: var(--popover-bg-color, variables.$popover-bg);
89
89
  color: variables.$popover-body-color;
90
90
  }
91
91
 
92
- // .bs-popover-*: standard BS
93
- // .popover-*-*: si-popover with CDK overlay
94
- // .bs-popover-auto*: popper.js
95
- // FIXME: remove popper.js selectors in next breaking release
96
-
97
- :is(
98
- .bs-popover-top,
99
- .popover-start-bottom,
100
- .popover-end-bottom,
101
- .popover-center-bottom,
102
- .bs-popover-auto[data-popper-placement^='top']
103
- ) {
92
+ :is(.popover-start-bottom, .popover-end-bottom, .popover-center-bottom) {
104
93
  margin-block-end: $si-popover-arrow-height;
105
94
 
106
95
  > .popover-arrow {
@@ -116,7 +105,7 @@ $si-popover-bg: var(--popover-bg-color, variables.$popover-bg);
116
105
  }
117
106
  }
118
107
 
119
- :is(.bs-popover-end, .popover-start-center, .bs-popover-auto[data-popper-placement^='right']) {
108
+ .popover-start-center {
120
109
  margin-inline-start: $si-popover-arrow-height;
121
110
 
122
111
  > .popover-arrow {
@@ -134,13 +123,7 @@ $si-popover-bg: var(--popover-bg-color, variables.$popover-bg);
134
123
  }
135
124
  }
136
125
 
137
- :is(
138
- .bs-popover-bottom,
139
- .popover-start-top,
140
- .popover-end-top,
141
- .popover-center-top,
142
- .bs-popover-auto[data-popper-placement^='bottom']
143
- ) {
126
+ :is(.popover-start-top, .popover-end-top, .popover-center-top) {
144
127
  margin-block-start: $si-popover-arrow-height;
145
128
 
146
129
  > .popover-arrow {
@@ -156,7 +139,7 @@ $si-popover-bg: var(--popover-bg-color, variables.$popover-bg);
156
139
  }
157
140
  }
158
141
 
159
- :is(.bs-popover-start, .popover-end-center, .bs-popover-auto[data-popper-placement^='left']) {
142
+ .popover-end-center {
160
143
  margin-inline-end: $si-popover-arrow-height;
161
144
 
162
145
  > .popover-arrow {
@@ -1,12 +1,6 @@
1
1
  @use './mixins/gradients';
2
2
  @use './variables';
3
3
 
4
- @keyframes progress-bar-stripes {
5
- 0% {
6
- background-position-x: variables.$progress-height;
7
- }
8
- }
9
-
10
4
  .progress {
11
5
  display: flex;
12
6
  block-size: variables.$progress-height;
@@ -27,16 +21,3 @@
27
21
  background-color: variables.$progress-bar-bg;
28
22
  transition: variables.$progress-bar-transition;
29
23
  }
30
-
31
- .progress-bar-striped {
32
- @include gradients.gradient-striped();
33
- background-size: variables.$progress-height variables.$progress-height;
34
- }
35
-
36
- .progress-bar-animated {
37
- animation: variables.$progress-bar-animation-timing progress-bar-stripes;
38
-
39
- @media (prefers-reduced-motion: reduce) {
40
- animation: none;
41
- }
42
- }
@@ -47,8 +47,7 @@
47
47
 
48
48
  // Highlight border color between thead, tbody and tfoot.
49
49
  > :not(:first-child) {
50
- border-block-start: (2 * variables.$table-border-width) solid
51
- variables.$table-group-separator-color;
50
+ border-block-start: variables.$table-border-width solid variables.$table-group-separator-color;
52
51
  }
53
52
 
54
53
  :is(th, td) {
@@ -65,7 +64,7 @@
65
64
 
66
65
  thead {
67
66
  border-width: 0;
68
- border-block-end: map.get(spacers.$spacers-block, 2) solid variables.$table-border-color;
67
+ border-block-end: variables.$table-border-width solid variables.$table-border-color;
69
68
 
70
69
  th {
71
70
  vertical-align: baseline;
@@ -44,18 +44,7 @@
44
44
  border-radius: variables.$tooltip-border-radius;
45
45
  }
46
46
 
47
- // .bs-tooltip-*: standard BS
48
- // .tooltip-*-*: si-tooltip with CDK overlay
49
- // .bs-tooltip-auto*: popper.js
50
- // FIXME: remove popper.js selectors in next breaking release
51
-
52
- :is(
53
- .bs-tooltip-top,
54
- .tooltip-start-bottom,
55
- .tooltip-end-bottom,
56
- .tooltip-center-bottom,
57
- .bs-tooltip-auto[data-popper-placement^='top']
58
- ) {
47
+ :is(.tooltip-start-bottom, .tooltip-end-bottom, .tooltip-center-bottom) {
59
48
  padding-block: variables.$tooltip-arrow-height;
60
49
 
61
50
  .tooltip-arrow {
@@ -71,7 +60,7 @@
71
60
  }
72
61
  }
73
62
 
74
- :is(.bs-tooltip-end, .tooltip-start-center, .bs-tooltip-auto[data-popper-placement^='right']) {
63
+ .tooltip-start-center {
75
64
  padding-inline: variables.$tooltip-arrow-height;
76
65
 
77
66
  .tooltip-arrow {
@@ -89,13 +78,7 @@
89
78
  }
90
79
  }
91
80
 
92
- :is(
93
- .bs-tooltip-bottom,
94
- .tooltip-start-top,
95
- .tooltip-end-top,
96
- .tooltip-center-top,
97
- .bs-tooltip-auto[data-popper-placement^='bottom']
98
- ) {
81
+ :is(.tooltip-start-top, .tooltip-end-top, .tooltip-center-top) {
99
82
  padding-block: variables.$tooltip-arrow-height;
100
83
 
101
84
  .tooltip-arrow {
@@ -111,7 +94,7 @@
111
94
  }
112
95
  }
113
96
 
114
- :is(.bs-tooltip-start, .tooltip-end-center, .bs-tooltip-auto[data-popper-placement^='left']) {
97
+ .tooltip-end-center {
115
98
  padding-inline: variables.$tooltip-arrow-height;
116
99
 
117
100
  .tooltip-arrow {
@@ -260,7 +260,7 @@ $table-color: $body-color !default;
260
260
  $table-bg: system-tokens.$si-sys-color-background-1 !default;
261
261
  $table-accent-bg: transparent !default;
262
262
 
263
- $table-th-font-weight: null !default;
263
+ $table-th-font-weight: typography.$si-font-weight-sbold !default;
264
264
 
265
265
  $table-striped-color: $table-color !default;
266
266
  $table-striped-bg: system-tokens.$si-sys-color-background-0 !default;
@@ -55,7 +55,10 @@
55
55
  order: initial;
56
56
 
57
57
  .dropdown-header {
58
- padding-inline-start: 28px;
58
+ padding-inline-start: calc(
59
+ bootstrap-variables.$dropdown-item-padding-x + si-vars.$si-icon-font-size +
60
+ map.get(spacers.$spacers-inline, 4)
61
+ );
59
62
  }
60
63
  }
61
64
  }
@@ -209,7 +209,7 @@ $datatable-ghost-cell-strip-radius: 0 !default;
209
209
  // Header Styles
210
210
  .datatable-header {
211
211
  padding: 0;
212
- border-block-end: 4px solid $datatable-header-border-color;
212
+ border-block-end: variables.$table-border-width solid $datatable-header-border-color;
213
213
  background-color: $datatable-header-background-color;
214
214
  color: $datatable-header-color;
215
215
  block-size: $datatable-header-height;
@@ -267,6 +267,11 @@ $datatable-ghost-cell-strip-radius: 0 !default;
267
267
  }
268
268
 
269
269
  // Summary Styles
270
+ .datatable-summary-row.sticky {
271
+ // ngx-datatable v27 scrolls the header and body in the same container.
272
+ inset-block-start: $datatable-header-height + variables.$table-border-width;
273
+ }
274
+
270
275
  .datatable-summary-row .datatable-body-row {
271
276
  background-color: $datatable-summary-background-color;
272
277
  font-weight: typography.$si-font-weight-h5;
@@ -136,9 +136,5 @@
136
136
  .cdk-drop-list-dragging {
137
137
  @include variables.make-outline-focus-inside();
138
138
  cursor: grabbing !important;
139
-
140
- &.focus-none > .focus-direct-sub-inside {
141
- @include variables.make-outline-focus-inside();
142
- }
143
139
  }
144
140
  }
@@ -3,16 +3,11 @@
3
3
  // Unified focus styling
4
4
 
5
5
  *:focus-visible,
6
- *.focus-default:focus-visible,
7
- *:focus-visible .focus-sub,
8
- *:focus-visible > .focus-direct-sub,
9
- *:focus-visible > .focus-direct-sub-inside {
6
+ *.focus-default:focus-visible {
10
7
  @include focus.make-outline-focus();
11
8
  }
12
9
 
13
- *.focus-inside:focus-visible,
14
- *:focus-visible .focus-sub-inside,
15
- *:focus-visible > .focus-direct-sub-inside {
10
+ *.focus-inside:focus-visible {
16
11
  outline-offset: focus.$focus-style-outline-inside-offset;
17
12
  }
18
13
 
@@ -15,7 +15,7 @@ ol:has(.list-item) {
15
15
  }
16
16
 
17
17
  .list {
18
- &.list-divider > li:not(:last-child) {
18
+ &.list-divider > .list-item:not(:last-child) {
19
19
  border-block-end: 1px solid variables.$si-sys-color-border-4;
20
20
  }
21
21
 
@@ -44,7 +44,7 @@ ol:has(.list-item) {
44
44
  '. . description description'
45
45
  '. . metadata metadata'
46
46
  '. . quick-actions quick-actions';
47
- padding-block: map.get(variables.$spacers-block, 4);
47
+ padding-block: map.get(variables.$spacers-block, 2);
48
48
  padding-inline: map.get(variables.$spacers-inline, 6);
49
49
 
50
50
  @include typography.si-font(
@@ -68,15 +68,24 @@ ol:has(.list-item) {
68
68
  display: flex;
69
69
  align-self: center;
70
70
  align-items: center;
71
- // This restricts the height on purpose.
72
- // Content taller than the title remains centered and overflows on both sides.
73
- max-block-size: calc(
74
- #{typography.$si-line-height-h5} * #{typography.$si-font-size-h5} +
75
- #{map.get(variables.$spacers-block, 4)} * 2
76
- );
71
+ // Exclude the indicator from row sizing without constraining its actual height.
72
+ // Equal negative margins keep it centered, overflowing on both sides of the title.
73
+ // Assume indicators exceed the title row by no more than 1lh on each side.
74
+ margin-block: -1lh;
77
75
  margin-inline-end: map.get(variables.$spacers-inline, 4);
78
76
  }
79
77
 
78
+ &.align-indicator-center {
79
+ .list-item-check,
80
+ .list-item-indicator {
81
+ grid-row: 1 / -1;
82
+ }
83
+
84
+ .list-item-indicator {
85
+ margin-block: 0;
86
+ }
87
+ }
88
+
80
89
  .list-item-timestamp {
81
90
  grid-area: timestamp;
82
91
  color: variables.$si-sys-color-text-secondary;
@@ -162,6 +171,7 @@ ol:has(.list-item) {
162
171
  background-color: variables.$si-sys-color-background-hover;
163
172
  }
164
173
 
174
+ &.active,
165
175
  &:active {
166
176
  background-color: variables.$si-sys-color-background-active;
167
177
  }
@@ -169,6 +179,12 @@ ol:has(.list-item) {
169
179
  &:focus-visible {
170
180
  outline-offset: focus.$focus-style-outline-inside-offset;
171
181
  }
182
+
183
+ &:is(.disabled, :disabled) {
184
+ opacity: 0.5;
185
+ cursor: default;
186
+ pointer-events: none;
187
+ }
172
188
  }
173
189
 
174
190
  &:is(button, a) {
@@ -50,7 +50,7 @@ $si-switch-knob-size: calc(#{$si-switch-size} - 2 * #{$si-switch-slider-margin})
50
50
  background-color: variables.$si-sys-color-background-hover;
51
51
  }
52
52
 
53
- &:is(:checked, .checked) {
53
+ &:is(:checked, .checked, :indeterminate) {
54
54
  background-color: variables.$si-sys-color-background-accent;
55
55
 
56
56
  &:hover {
@@ -76,5 +76,10 @@ $si-switch-knob-size: calc(#{$si-switch-size} - 2 * #{$si-switch-slider-margin})
76
76
  inset-inline-start: calc(#{$si-switch-slider-margin} + #{$si-switch-size} - 1px);
77
77
  background-color: $si-switch-slider-on-color;
78
78
  }
79
+
80
+ &:indeterminate::before {
81
+ inset-inline-start: calc(#{$si-switch-slider-margin} + #{$si-switch-size} / 2 - 1px);
82
+ background-color: $si-switch-slider-on-color;
83
+ }
79
84
  }
80
85
  }
@@ -0,0 +1,26 @@
1
+ @use '../bootstrap/mixins/breakpoints';
2
+ @use '../variables/si-vars';
3
+
4
+ @mixin spacing(
5
+ $collapsed: '.nav-collapsed',
6
+ $text-only: '.nav-text-only',
7
+ $hidden: '.ready:not(.visible)'
8
+ ) {
9
+ --element-navbar-vertical-spacing: 0;
10
+
11
+ @include breakpoints.media-breakpoint-up(sm) {
12
+ &:not(#{$text-only}) {
13
+ --element-navbar-vertical-spacing: #{si-vars.$si-navbar-vertical-collapsed-width};
14
+ }
15
+ }
16
+
17
+ @include breakpoints.media-breakpoint-up(lg) {
18
+ &:not(#{$collapsed}) {
19
+ --element-navbar-vertical-spacing: #{si-vars.$si-navbar-vertical-width};
20
+ }
21
+ }
22
+
23
+ &#{$hidden} {
24
+ --element-navbar-vertical-spacing: 0;
25
+ }
26
+ }
@@ -19,6 +19,8 @@ $btn-width-normal: map.get(sizing.$sizing, 120);
19
19
  // Component styling
20
20
 
21
21
  $si-application-header-height: calc(map.get(sizing.$sizing, 100) + 1px);
22
+ $si-navbar-vertical-width: 240px;
23
+ $si-navbar-vertical-collapsed-width: calc(1.5rem + 2 * map.get(spacers.$spacers-inline, 5));
22
24
  $si-titlebar-padding-y: map.get(spacers.$spacers-block, 3);
23
25
  $si-titlebar-height: calc(1.5rem + 2 * $si-titlebar-padding-y);
24
26
  $si-system-banner-padding-y: map.get(spacers.$spacers-block, 2);
@@ -28,3 +30,4 @@ $si-system-banner-height: calc(1rem + 2 * $si-system-banner-padding-y);
28
30
  // stylelint-disable-next-line length-zero-no-unit
29
31
  $si-titlebar-spacing: var(--element-titlebar-spacing, 0px);
30
32
  $si-system-banner-spacing: var(--element-system-banner-spacing, 0px);
33
+ $si-navbar-vertical-spacing: var(--element-navbar-vertical-spacing, 0px);