@siemens/element-theme 47.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.
Files changed (92) hide show
  1. package/package.json +28 -0
  2. package/src/styles/_accessibility.scss +9 -0
  3. package/src/styles/_all-variables.scss +7 -0
  4. package/src/styles/_bootstrap.scss +26 -0
  5. package/src/styles/_themes.scss +35 -0
  6. package/src/styles/_variables.scss +10 -0
  7. package/src/styles/bootstrap/_alert.scss +60 -0
  8. package/src/styles/bootstrap/_badges.scss +115 -0
  9. package/src/styles/bootstrap/_breadcrumb.scss +32 -0
  10. package/src/styles/bootstrap/_button-group.scss +101 -0
  11. package/src/styles/bootstrap/_buttons.scss +244 -0
  12. package/src/styles/bootstrap/_card.scss +208 -0
  13. package/src/styles/bootstrap/_containers.scss +44 -0
  14. package/src/styles/bootstrap/_dropdowns.scss +216 -0
  15. package/src/styles/bootstrap/_forms.scss +10 -0
  16. package/src/styles/bootstrap/_functions.scss +188 -0
  17. package/src/styles/bootstrap/_grid.scss +33 -0
  18. package/src/styles/bootstrap/_helpers.scss +6 -0
  19. package/src/styles/bootstrap/_images.scss +45 -0
  20. package/src/styles/bootstrap/_list-group.scss +197 -0
  21. package/src/styles/bootstrap/_mixins.scss +30 -0
  22. package/src/styles/bootstrap/_modals.scss +234 -0
  23. package/src/styles/bootstrap/_nav.scss +155 -0
  24. package/src/styles/bootstrap/_pagination.scss +58 -0
  25. package/src/styles/bootstrap/_popovers.scss +188 -0
  26. package/src/styles/bootstrap/_progress.scss +42 -0
  27. package/src/styles/bootstrap/_reboot.scss +618 -0
  28. package/src/styles/bootstrap/_root.scss +22 -0
  29. package/src/styles/bootstrap/_tables.scss +186 -0
  30. package/src/styles/bootstrap/_tooltip.scss +145 -0
  31. package/src/styles/bootstrap/_transitions.scss +28 -0
  32. package/src/styles/bootstrap/_type.scss +235 -0
  33. package/src/styles/bootstrap/_utilities.scss +105 -0
  34. package/src/styles/bootstrap/_variables.scss +654 -0
  35. package/src/styles/bootstrap/forms/_form-check.scss +249 -0
  36. package/src/styles/bootstrap/forms/_form-control.scss +151 -0
  37. package/src/styles/bootstrap/forms/_form-file.scss +29 -0
  38. package/src/styles/bootstrap/forms/_form-label.scss +39 -0
  39. package/src/styles/bootstrap/forms/_form-range.scss +68 -0
  40. package/src/styles/bootstrap/forms/_input-group.scss +103 -0
  41. package/src/styles/bootstrap/forms/_validation.scss +95 -0
  42. package/src/styles/bootstrap/helpers/_clearfix.scss +5 -0
  43. package/src/styles/bootstrap/helpers/_position.scss +34 -0
  44. package/src/styles/bootstrap/helpers/_stacks.scss +13 -0
  45. package/src/styles/bootstrap/helpers/_stretched-link.scss +14 -0
  46. package/src/styles/bootstrap/helpers/_text-truncation.scss +9 -0
  47. package/src/styles/bootstrap/helpers/_visually-hidden.scss +10 -0
  48. package/src/styles/bootstrap/mixins/_backdrop.scss +19 -0
  49. package/src/styles/bootstrap/mixins/_breakpoints.scss +136 -0
  50. package/src/styles/bootstrap/mixins/_clearfix.scss +7 -0
  51. package/src/styles/bootstrap/mixins/_container.scss +7 -0
  52. package/src/styles/bootstrap/mixins/_deprecate.scss +12 -0
  53. package/src/styles/bootstrap/mixins/_gradients.scss +14 -0
  54. package/src/styles/bootstrap/mixins/_grid.scss +171 -0
  55. package/src/styles/bootstrap/mixins/_image.scss +15 -0
  56. package/src/styles/bootstrap/mixins/_lists.scss +5 -0
  57. package/src/styles/bootstrap/mixins/_reset-text.scss +18 -0
  58. package/src/styles/bootstrap/mixins/_table-row.scss +31 -0
  59. package/src/styles/bootstrap/mixins/_text-truncate.scss +7 -0
  60. package/src/styles/bootstrap/mixins/_transition.scss +28 -0
  61. package/src/styles/bootstrap/mixins/_utilities.scss +86 -0
  62. package/src/styles/bootstrap/mixins/_visually-hidden.scss +29 -0
  63. package/src/styles/components/_application-header.scss +244 -0
  64. package/src/styles/components/_container-grid.scss +99 -0
  65. package/src/styles/components/_datatable.scss +328 -0
  66. package/src/styles/components/_drag_drop.scss +105 -0
  67. package/src/styles/components/_electron-titlebar.scss +5 -0
  68. package/src/styles/components/_elevation.scss +21 -0
  69. package/src/styles/components/_focus.scss +21 -0
  70. package/src/styles/components/_icons.scss +25 -0
  71. package/src/styles/components/_layout.scss +105 -0
  72. package/src/styles/components/_links.scss +34 -0
  73. package/src/styles/components/_pills.scss +45 -0
  74. package/src/styles/components/_scrollbar.scss +10 -0
  75. package/src/styles/components/_skeleton.scss +42 -0
  76. package/src/styles/components/_switch.scss +77 -0
  77. package/src/styles/components/_system-banner.scss +5 -0
  78. package/src/styles/components/_widgets.scss +58 -0
  79. package/src/styles/variables/_animations.scss +7 -0
  80. package/src/styles/variables/_elevation.scss +25 -0
  81. package/src/styles/variables/_focus.scss +55 -0
  82. package/src/styles/variables/_layout.scss +6 -0
  83. package/src/styles/variables/_semantic-tokens.scss +178 -0
  84. package/src/styles/variables/_si-vars.scss +19 -0
  85. package/src/styles/variables/_spacers.scss +28 -0
  86. package/src/styles/variables/_typography.scss +66 -0
  87. package/src/styles/variables/_utilities.scss +599 -0
  88. package/src/styles/variables/_zindex.scss +20 -0
  89. package/src/theme/_base-colors.scss +79 -0
  90. package/src/theme/_data-colors.scss +105 -0
  91. package/src/theme/_theme-element.scss +339 -0
  92. package/src/theme.scss +49 -0
@@ -0,0 +1,86 @@
1
+ @use '../variables';
2
+
3
+ @use 'sass:map';
4
+ @use 'sass:list';
5
+ @use 'sass:string';
6
+ @use 'sass:meta';
7
+
8
+ // Utility generator
9
+ // Used to generate utilities & print utilities
10
+ @mixin generate-utility($utility, $infix, $is-rfs-media-query: false) {
11
+ $values: map.get($utility, values);
12
+
13
+ // If the values are a list or string, convert it into a map
14
+ @if meta.type-of($values) == 'string' or meta.type-of(list.nth($values, 1)) != 'list' {
15
+ $values: list.zip($values, $values);
16
+ }
17
+
18
+ @each $key, $value in $values {
19
+ $properties: map.get($utility, property);
20
+
21
+ // Multiple properties are possible, for example with vertical or horizontal margins or paddings
22
+ @if meta.type-of($properties) == 'string' {
23
+ $properties: list.append((), $properties);
24
+ }
25
+
26
+ // Use custom class if present
27
+ $property-class: if(
28
+ map.has-key($utility, class),
29
+ map.get($utility, class),
30
+ list.nth($properties, 1)
31
+ );
32
+ $property-class: if($property-class == null, '', $property-class);
33
+
34
+ // State params to generate pseudo-classes
35
+ $state: if(map.has-key($utility, state), map.get($utility, state), ());
36
+
37
+ $infix: if(
38
+ $property-class == '' and string.slice($infix, 1, 1) == '-',
39
+ string.slice($infix, 2),
40
+ $infix
41
+ );
42
+
43
+ // Don't prefix if value key is null (eg. with shadow class)
44
+ $property-class-modifier: if(
45
+ $key,
46
+ if($property-class == '' and $infix == '', '', '-') + $key,
47
+ ''
48
+ );
49
+
50
+ $is-css-var: map.get($utility, css-var);
51
+ $is-local-vars: map.get($utility, local-vars);
52
+
53
+ @if $value != null {
54
+ @if $is-css-var {
55
+ .#{$property-class + $infix + $property-class-modifier} {
56
+ --#{variables.$variable-prefix}#{$property-class}: #{$value};
57
+ }
58
+
59
+ @each $pseudo in $state {
60
+ .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {
61
+ --#{variables.$variable-prefix}#{$property-class}: #{$value};
62
+ }
63
+ }
64
+ } @else {
65
+ .#{$property-class + $infix + $property-class-modifier} {
66
+ @each $property in $properties {
67
+ @if $is-local-vars {
68
+ @each $local-var, $value in $is-local-vars {
69
+ --#{variables.$variable-prefix}#{$local-var}: #{$value};
70
+ }
71
+ }
72
+ #{$property}: $value if(variables.$enable-important-utilities, !important, null);
73
+ }
74
+ }
75
+
76
+ @each $pseudo in $state {
77
+ .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {
78
+ @each $property in $properties {
79
+ #{$property}: $value if(variables.$enable-important-utilities, !important, null);
80
+ }
81
+ }
82
+ }
83
+ }
84
+ }
85
+ }
86
+ }
@@ -0,0 +1,29 @@
1
+ // stylelint-disable declaration-no-important
2
+
3
+ // Hide content visually while keeping it accessible to assistive technologies
4
+ //
5
+ // See: https://www.a11yproject.com/posts/2013-01-11-how-to-hide-content/
6
+ // See: https://kittygiraudel.com/2016/10/13/css-hide-and-seek/
7
+
8
+ @mixin visually-hidden() {
9
+ position: absolute !important;
10
+ inline-size: 1px !important;
11
+ block-size: 1px !important;
12
+ padding: 0 !important;
13
+ margin: -1px !important; // Fix for https://github.com/twbs/bootstrap/issues/25686
14
+ overflow: hidden !important;
15
+ clip: rect(0, 0, 0, 0) !important;
16
+ white-space: nowrap !important;
17
+ border: 0 !important;
18
+ }
19
+
20
+ // Use to only display content when it's focused, or one of its child elements is focused
21
+ // (i.e. when focus is within the element/container that the class was applied to)
22
+ //
23
+ // Useful for "Skip to main content" links; see https://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
24
+
25
+ @mixin visually-hidden-focusable() {
26
+ &:not(:focus):not(:focus-within) {
27
+ @include visually-hidden();
28
+ }
29
+ }
@@ -0,0 +1,244 @@
1
+ @use '../bootstrap/mixins/breakpoints';
2
+ @use '../bootstrap/variables' as bootstrap-variables;
3
+ @use '../variables';
4
+ @use '../variables/elevation';
5
+ @use '../variables/semantic-tokens';
6
+ @use '../variables/spacers';
7
+ @use '../variables/typography';
8
+ @use '../variables/zindex';
9
+
10
+ @use 'sass:map';
11
+
12
+ .has-application-header,
13
+ .has-navbar-fixed-top {
14
+ padding-block-start: calc(
15
+ variables.$si-application-header-height + variables.$si-titlebar-spacing +
16
+ variables.$si-system-banner-spacing
17
+ );
18
+ }
19
+
20
+ .application-header {
21
+ display: flex;
22
+ flex-wrap: wrap;
23
+ position: fixed;
24
+ inset-inline: 0;
25
+ inset-block-start: calc(
26
+ var(--element-titlebar-spacing, 0px) + var(--element-system-banner-spacing, 0px)
27
+ );
28
+ z-index: zindex.$zindex-application-header;
29
+ background: semantic-tokens.$element-base-1;
30
+ min-block-size: variables.$si-application-header-height;
31
+ align-items: stretch;
32
+ border-block-end: 1px solid semantic-tokens.$element-ui-4;
33
+
34
+ // hide border when mobile styles are applied and either the dropdown-menu or header-toggle is shown
35
+ &:has(.dropdown-menu.show, .header-toggle.show) {
36
+ border-block-end: none;
37
+ }
38
+
39
+ // does not affect desktop styles, as in the desktop mode the dropdown-menu is rendered within the CDK overlay
40
+ .dropdown-menu {
41
+ order: 2;
42
+ flex-basis: 100%;
43
+ box-shadow: none;
44
+ border-block-start: 1px solid semantic-tokens.$element-ui-4;
45
+ margin-block: 0;
46
+ border-radius: 0;
47
+ }
48
+
49
+ // does not affect desktop styles, as in the desktop mode each dropdown-menu is rendered in a separate CDK overlay
50
+ :is(.header-navigation, .header-collapsible-actions, .dropdown-menu) .dropdown-menu {
51
+ border: 0;
52
+ box-shadow: none;
53
+ background: transparent;
54
+ order: initial;
55
+
56
+ .dropdown-header {
57
+ padding-inline-start: 28px;
58
+ }
59
+ }
60
+ }
61
+
62
+ .header-brand {
63
+ display: flex;
64
+ flex: 1 1 auto;
65
+ align-items: center;
66
+ }
67
+
68
+ .header-logo {
69
+ display: flex;
70
+ align-self: stretch;
71
+ align-items: center;
72
+ box-sizing: content-box;
73
+ inline-size: semantic-tokens.$element-brand-logo-width;
74
+ min-block-size: semantic-tokens.$element-brand-logo-height;
75
+ content: #{semantic-tokens.$element-brand-logo} / semantic-tokens.$element-brand-logo-text;
76
+ }
77
+
78
+ .application-name {
79
+ font-size: typography.$si-font-size-body-1;
80
+ font-weight: typography.$si-font-weight-body-1;
81
+ padding: map.get(spacers.$spacers, 5);
82
+ white-space: nowrap;
83
+ }
84
+
85
+ %collapsible-expanded {
86
+ order: 2;
87
+ flex-basis: 100%;
88
+ display: flex;
89
+ flex-flow: column;
90
+ padding-block: map.get(spacers.$spacers, 4);
91
+ border-block-start: 1px solid semantic-tokens.$element-ui-4;
92
+ }
93
+
94
+ .header-navigation {
95
+ display: none;
96
+
97
+ .application-header.show-navigation & {
98
+ @extend %collapsible-expanded;
99
+ }
100
+ }
101
+
102
+ .header-collapsible-actions {
103
+ display: none;
104
+
105
+ &.show {
106
+ @extend %collapsible-expanded;
107
+ }
108
+ }
109
+
110
+ .header-actions {
111
+ display: contents;
112
+ }
113
+
114
+ .header-toggle {
115
+ color: semantic-tokens.$element-text-primary;
116
+ border: 0;
117
+ line-height: 0;
118
+ padding: map.get(spacers.$spacers, 4);
119
+ font-size: 32px;
120
+ background-color: transparent; // remove default button style
121
+
122
+ &:is(:hover, .show, :active) {
123
+ background: semantic-tokens.$element-base-1-hover;
124
+ text-decoration: none;
125
+ }
126
+ }
127
+
128
+ .header-item {
129
+ --si-header-item-border: transparent;
130
+ display: flex;
131
+ flex-basis: 0;
132
+ align-items: center;
133
+ position: relative;
134
+ color: semantic-tokens.$element-text-primary;
135
+ inline-size: 100%;
136
+ font-size: typography.$si-font-size-title-1;
137
+ line-height: typography.$si-line-height-title-1;
138
+ font-weight: typography.$si-font-weight-title-1;
139
+ padding-block: 15px;
140
+ padding-inline: map.get(spacers.$spacers, 5);
141
+ background: none;
142
+ box-shadow: none;
143
+ border: 0;
144
+ white-space: nowrap;
145
+
146
+ .icon {
147
+ margin-block: -3px;
148
+
149
+ ~ .item-title {
150
+ padding-inline-start: map.get(spacers.$spacers, 5);
151
+ }
152
+ }
153
+
154
+ .dropdown-caret {
155
+ display: none;
156
+ }
157
+
158
+ :is(.header-navigation, .header-collapsible-actions) & .dropdown-caret {
159
+ display: block;
160
+ }
161
+
162
+ &:hover {
163
+ color: semantic-tokens.$element-text-primary;
164
+ background-color: semantic-tokens.$element-base-1-hover;
165
+ text-decoration: none;
166
+ }
167
+
168
+ &::after {
169
+ content: ' ';
170
+ position: absolute;
171
+ inset-block-end: 0;
172
+ inset-inline: 0;
173
+ block-size: map.get(spacers.$spacers, 2);
174
+ background: var(--si-header-item-border);
175
+ }
176
+
177
+ &.header-selection-item {
178
+ color: semantic-tokens.$element-action-secondary-text;
179
+ font-size: typography.$si-font-size-title-2;
180
+ font-weight: typography.$si-font-weight-title-2;
181
+ line-height: typography.$si-line-height-title-2;
182
+
183
+ &:hover {
184
+ color: semantic-tokens.$element-action-secondary-text-hover;
185
+ }
186
+ }
187
+ }
188
+
189
+ @each $breakpoint in map.keys(bootstrap-variables.$grid-breakpoints) {
190
+ @include breakpoints.media-breakpoint-up($breakpoint) {
191
+ .expand-#{$breakpoint} {
192
+ &.application-header {
193
+ flex-wrap: nowrap;
194
+ }
195
+
196
+ .header-brand {
197
+ display: flex;
198
+ flex: 1 1 33.333%;
199
+ justify-content: flex-start;
200
+ }
201
+
202
+ .header-navigation {
203
+ display: flex;
204
+ flex: 1 1 33.333%;
205
+ justify-content: center;
206
+
207
+ .header-item {
208
+ &.active {
209
+ color: semantic-tokens.$element-action-primary;
210
+ --si-header-item-border: #{semantic-tokens.$element-action-primary};
211
+ }
212
+
213
+ &:hover {
214
+ color: semantic-tokens.$element-action-primary-hover;
215
+ --si-header-item-border: #{semantic-tokens.$element-action-primary-hover};
216
+ }
217
+ }
218
+ }
219
+
220
+ .header-actions {
221
+ display: flex;
222
+ flex: 1 1 33.333%;
223
+ justify-content: flex-end;
224
+ }
225
+
226
+ .header-collapsible-actions {
227
+ display: contents;
228
+
229
+ .header-item .dropdown-caret {
230
+ display: none;
231
+ }
232
+ }
233
+
234
+ .header-toggle {
235
+ display: none;
236
+ }
237
+
238
+ .header-item {
239
+ inline-size: auto;
240
+ flex-basis: auto;
241
+ }
242
+ }
243
+ }
244
+ }
@@ -0,0 +1,99 @@
1
+ @use '../bootstrap/mixins/breakpoints';
2
+ @use '../bootstrap/mixins/grid';
3
+ @use '../bootstrap/variables';
4
+
5
+ // Extends the Bootstrap grid system with additional container classes which are
6
+ // not based on media queries for their responsiveness. Instead, the size
7
+ // classes are manually applied (or via JavaScript). Available classes:
8
+ // si-container-xs, si-container-sm, si-container-md, si-container-lg
9
+ //
10
+ // This is implemented by resetting (actually setting to "defaults") the bootstrap
11
+ // grid framework classes if we're in the context of a `container-*` class.
12
+
13
+ %reset-col {
14
+ flex: unset;
15
+ inline-size: 100%;
16
+ }
17
+
18
+ @mixin reset-grid($breakpoint) {
19
+ $infix: breakpoints.breakpoint-infix($breakpoint, variables.$grid-breakpoints);
20
+
21
+ @for $i from 1 through variables.$grid-columns {
22
+ .col#{$infix}-#{$i} {
23
+ @extend %reset-col;
24
+ }
25
+ }
26
+ }
27
+
28
+ @mixin make-grid($breakpoint) {
29
+ $infix: breakpoints.breakpoint-infix($breakpoint, variables.$grid-breakpoints);
30
+
31
+ @for $i from 1 through variables.$grid-columns {
32
+ .col#{$infix}-#{$i} {
33
+ @include grid.make-col($i, variables.$grid-columns);
34
+ }
35
+ }
36
+
37
+ // `$columns - 1` because offsetting by the width of an entire row isn't possible
38
+ @for $i from 0 through (variables.$grid-columns - 1) {
39
+ // Avoid emitting useless .offset-0
40
+ @if $infix != '' and $i > 0 {
41
+ .offset#{$infix}-#{$i} {
42
+ @include grid.make-col-offset($i, variables.$grid-columns);
43
+ }
44
+ }
45
+ }
46
+ }
47
+
48
+ // reset grid
49
+ .si-container-xs {
50
+ @include reset-grid(sm);
51
+ }
52
+
53
+ :is(.si-container-xs, .si-container-sm) {
54
+ @include reset-grid(md);
55
+ }
56
+
57
+ :is(.si-container-xs, .si-container-sm, .si-container-md) {
58
+ @include reset-grid(lg);
59
+ }
60
+
61
+ :is(.si-container-xs, .si-container-sm, .si-container-md, .si-container-lg) {
62
+ @include reset-grid(xl);
63
+ }
64
+
65
+ :is(.si-container-xs, .si-container-sm, .si-container-md, .si-container-lg, .si-container-xl) {
66
+ @include reset-grid(xxl);
67
+ }
68
+
69
+ // make grid
70
+ :is(
71
+ .si-container-xs,
72
+ .si-container-sm,
73
+ .si-container-md,
74
+ .si-container-lg,
75
+ .si-container-xl,
76
+ .si-container-xxl
77
+ ) {
78
+ @include make-grid(xs);
79
+ }
80
+
81
+ :is(.si-container-sm, .si-container-md, .si-container-lg, .si-container-xl, .si-container-xxl) {
82
+ @include make-grid(sm);
83
+ }
84
+
85
+ :is(.si-container-md, .si-container-lg, .si-container-xl, .si-container-xxl) {
86
+ @include make-grid(md);
87
+ }
88
+
89
+ :is(.si-container-lg, .si-container-xl, .si-container-xxl) {
90
+ @include make-grid(lg);
91
+ }
92
+
93
+ :is(.si-container-xl, .si-container-xxl) {
94
+ @include make-grid(xl);
95
+ }
96
+
97
+ .si-container-xxl {
98
+ @include make-grid(xxl);
99
+ }