@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,188 @@
1
+ @use '../variables/semantic-tokens';
2
+ @use '../variables/spacers';
3
+ @use '../variables/zindex';
4
+ @use './mixins/reset-text';
5
+ @use './variables';
6
+
7
+ @use 'sass:map';
8
+
9
+ $si-popover-arrow-width: var(--popover-arrow-width, variables.$popover-arrow-width);
10
+ $si-popover-arrow-height: var(--popover-arrow-height, variables.$popover-arrow-height);
11
+ $si-popover-bg: var(--popover-bg-color, variables.$popover-bg);
12
+
13
+ .popover {
14
+ position: absolute;
15
+ top: 0; // stylelint-disable-line liberty/use-logical-spec
16
+ left: 0; // stylelint-disable-line liberty/use-logical-spec
17
+ z-index: zindex.$zindex-popover;
18
+ display: block;
19
+ min-block-size: 50px;
20
+ min-inline-size: 176px;
21
+ max-inline-size: variables.$popover-max-width;
22
+ // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
23
+ // So reset our font and text properties to avoid inheriting weird values.
24
+ @include reset-text.reset-text();
25
+ font-size: variables.$popover-font-size;
26
+ // Allow breaking very long words so they don't overflow the popover's bounds
27
+ word-wrap: break-word;
28
+ background-color: $si-popover-bg;
29
+ background-clip: padding-box;
30
+ box-shadow: variables.$popover-box-shadow;
31
+ border-radius: semantic-tokens.$element-radius-2;
32
+
33
+ &.auto-width {
34
+ max-inline-size: unset;
35
+ }
36
+
37
+ &.no-content-padding {
38
+ .popover-body {
39
+ padding: 0;
40
+ overflow: hidden;
41
+ border-radius: semantic-tokens.$element-radius-2;
42
+ }
43
+ }
44
+
45
+ .popover-arrow {
46
+ position: absolute;
47
+ display: block;
48
+ inline-size: $si-popover-arrow-width;
49
+ block-size: $si-popover-arrow-height;
50
+
51
+ &::before {
52
+ position: absolute;
53
+ display: block;
54
+ content: '';
55
+ border-color: transparent;
56
+ border-style: solid;
57
+ }
58
+ }
59
+ }
60
+
61
+ .popover-header {
62
+ display: flex;
63
+ align-items: center;
64
+ padding-block: variables.$popover-header-padding-y 0;
65
+ padding-inline: variables.$popover-header-padding-x;
66
+ margin-block-end: 0; // Reset the default from Reboot
67
+ font-size: variables.$font-size-base;
68
+ background-color: variables.$popover-header-bg;
69
+ border-start-start-radius: variables.$popover-inner-border-radius;
70
+ border-start-end-radius: variables.$popover-inner-border-radius;
71
+
72
+ &:empty {
73
+ display: none;
74
+ }
75
+
76
+ + .popover-body {
77
+ padding-block-start: map.get(spacers.$spacers, 4);
78
+ }
79
+
80
+ &:has(> .icon) {
81
+ padding-inline-start: calc(variables.$popover-header-padding-y - 4px);
82
+ }
83
+ }
84
+
85
+ .popover-body {
86
+ padding-block: variables.$popover-body-padding-y;
87
+ padding-inline: variables.$popover-body-padding-x;
88
+ color: variables.$popover-body-color;
89
+ }
90
+
91
+ // .bs-popover-*: standard BS
92
+ // .popover-*-*: si-popover with CDK overlay
93
+ // .bs-popover-auto*: popper.js
94
+ // FIXME: remove popper.js selectors in next breaking release
95
+
96
+ :is(
97
+ .bs-popover-top,
98
+ .popover-start-bottom,
99
+ .popover-end-bottom,
100
+ .popover-center-bottom,
101
+ .bs-popover-auto[data-popper-placement^='top']
102
+ ) {
103
+ margin-block-end: $si-popover-arrow-height;
104
+
105
+ > .popover-arrow {
106
+ inset-block-end: calc(-1 * $si-popover-arrow-height);
107
+ margin-inline-start: calc(-0.5 * $si-popover-arrow-width);
108
+
109
+ &::before {
110
+ inset-block-end: 0;
111
+ border-block-width: $si-popover-arrow-height 0;
112
+ border-inline-width: calc($si-popover-arrow-width * 0.5);
113
+ border-block-start-color: $si-popover-bg;
114
+ }
115
+ }
116
+ }
117
+
118
+ :is(.bs-popover-end, .popover-start-center, .bs-popover-auto[data-popper-placement^='right']) {
119
+ margin-inline-start: $si-popover-arrow-height;
120
+
121
+ > .popover-arrow {
122
+ inset-inline-start: calc(-1 * $si-popover-arrow-height);
123
+ inline-size: $si-popover-arrow-height;
124
+ block-size: $si-popover-arrow-width;
125
+ margin-block-start: calc(-0.5 * $si-popover-arrow-width);
126
+
127
+ &::before {
128
+ inset-inline-start: 0;
129
+ border-block-width: calc($si-popover-arrow-width * 0.5);
130
+ border-inline-width: 0 $si-popover-arrow-height;
131
+ border-inline-end-color: $si-popover-bg;
132
+ }
133
+ }
134
+ }
135
+
136
+ :is(
137
+ .bs-popover-bottom,
138
+ .popover-start-top,
139
+ .popover-end-top,
140
+ .popover-center-top,
141
+ .bs-popover-auto[data-popper-placement^='bottom']
142
+ ) {
143
+ margin-block-start: $si-popover-arrow-height;
144
+
145
+ > .popover-arrow {
146
+ inset-block-start: calc(-1 * $si-popover-arrow-height);
147
+ margin-inline-start: calc(-0.5 * $si-popover-arrow-width);
148
+
149
+ &::before {
150
+ inset-block-start: 0;
151
+ border-block-width: 0 $si-popover-arrow-height;
152
+ border-inline-width: calc($si-popover-arrow-width * 0.5);
153
+ border-block-end-color: $si-popover-bg;
154
+ }
155
+ }
156
+ }
157
+
158
+ :is(.bs-popover-start, .popover-end-center, .bs-popover-auto[data-popper-placement^='left']) {
159
+ margin-inline-end: $si-popover-arrow-height;
160
+
161
+ > .popover-arrow {
162
+ inset-inline-end: calc(-1 * $si-popover-arrow-height);
163
+ inline-size: $si-popover-arrow-height;
164
+ block-size: $si-popover-arrow-width;
165
+ margin-block-start: calc(-0.5 * $si-popover-arrow-width);
166
+
167
+ &::before {
168
+ inset-inline-end: 0;
169
+ border-block-width: calc($si-popover-arrow-width * 0.5);
170
+ border-inline-width: $si-popover-arrow-height 0;
171
+ border-inline-start-color: $si-popover-bg;
172
+ }
173
+ }
174
+ }
175
+
176
+ // center arrow in block direction
177
+ :is(.popover-start-center, .popover-end-center) {
178
+ .popover-arrow {
179
+ inset-block-start: 50%;
180
+ }
181
+ }
182
+
183
+ // center arrow in inline direction
184
+ :is(.popover-center-top, .popover-center-bottom) {
185
+ .popover-arrow {
186
+ inset-inline-start: 50%;
187
+ }
188
+ }
@@ -0,0 +1,42 @@
1
+ @use './mixins/gradients';
2
+ @use './variables';
3
+
4
+ @keyframes progress-bar-stripes {
5
+ 0% {
6
+ background-position-x: variables.$progress-height;
7
+ }
8
+ }
9
+
10
+ .progress {
11
+ display: flex;
12
+ block-size: variables.$progress-height;
13
+ overflow: hidden; // force rounded corners by cropping it
14
+ font-size: variables.$progress-font-size;
15
+ background-color: variables.$progress-bg;
16
+ border-radius: variables.$progress-border-radius;
17
+ }
18
+
19
+ .progress-bar {
20
+ display: flex;
21
+ flex-direction: column;
22
+ justify-content: center;
23
+ overflow: hidden;
24
+ color: variables.$progress-bar-color;
25
+ text-align: center;
26
+ white-space: nowrap;
27
+ background-color: variables.$progress-bar-bg;
28
+ transition: variables.$progress-bar-transition;
29
+ }
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
+ }