@siemens/element-theme 51.0.0-rc.1 → 51.0.0-rc.10
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 +8 -2
- package/src/styles/_density.scss +144 -0
- package/src/styles/_reboot-shadow-dom.scss +5 -0
- package/src/styles/_root-font-size.scss +4 -2
- package/src/styles/_selectors.scss +3 -0
- package/src/styles/_themes.scss +15 -3
- package/src/styles/_utilities.scss +5 -0
- package/src/styles/_variables.scss +2 -0
- package/src/styles/bootstrap/_alert.scss +19 -19
- package/src/styles/bootstrap/_badges.scss +41 -41
- package/src/styles/bootstrap/_button-group.scss +12 -11
- package/src/styles/bootstrap/_buttons.scss +85 -85
- package/src/styles/bootstrap/_card.scss +23 -17
- package/src/styles/bootstrap/_dropdowns.scss +18 -18
- package/src/styles/bootstrap/_forms.scss +1 -0
- package/src/styles/bootstrap/_images.scss +4 -2
- package/src/styles/bootstrap/_list-group.scss +52 -14
- package/src/styles/bootstrap/_mixins.scss +1 -0
- package/src/styles/bootstrap/_modals.scss +11 -10
- package/src/styles/bootstrap/_nav.scss +17 -8
- package/src/styles/bootstrap/_pagination.scss +6 -5
- package/src/styles/bootstrap/_popovers.scss +3 -2
- package/src/styles/bootstrap/_reboot.scss +9 -3
- package/src/styles/bootstrap/_root.scss +2 -1
- package/src/styles/bootstrap/_tables.scss +8 -6
- package/src/styles/bootstrap/_type.scss +144 -36
- package/src/styles/bootstrap/_utilities.scss +41 -45
- package/src/styles/bootstrap/_variables.scss +154 -140
- package/src/styles/bootstrap/forms/_form-check.scss +43 -73
- package/src/styles/bootstrap/forms/_form-control.scss +35 -29
- package/src/styles/bootstrap/forms/_form-file.scss +9 -9
- package/src/styles/bootstrap/forms/_form-label.scss +1 -1
- package/src/styles/bootstrap/forms/_form-layout.scss +46 -0
- package/src/styles/bootstrap/forms/_form-range.scss +13 -14
- package/src/styles/bootstrap/forms/_validation.scss +3 -6
- package/src/styles/bootstrap/mixins/_badge-text.scss +3 -3
- package/src/styles/bootstrap/mixins/_form-layout.scss +62 -0
- package/src/styles/bootstrap/mixins/_grid.scss +3 -3
- package/src/styles/bootstrap/mixins/_utilities.scss +14 -3
- package/src/styles/components/_application-header.scss +30 -30
- package/src/styles/components/_datatable.scss +57 -48
- package/src/styles/components/_drag_drop.scss +7 -6
- package/src/styles/components/_elevation.scss +11 -6
- package/src/styles/components/_layout.scss +26 -13
- package/src/styles/components/_links.scss +2 -2
- package/src/styles/components/_list-item.scss +69 -30
- package/src/styles/components/_markdown.scss +33 -19
- package/src/styles/components/_pills.scss +6 -6
- package/src/styles/components/_scrollbar.scss +6 -5
- package/src/styles/components/_search-bar.scss +67 -0
- package/src/styles/components/_skeleton.scss +4 -3
- package/src/styles/components/_switch.scss +16 -18
- package/src/styles/components/_widgets.scss +12 -10
- package/src/styles/mixins/_utilities.scss +271 -0
- package/src/styles/variables/_elevation.scss +14 -12
- package/src/styles/variables/_focus.scss +4 -3
- package/src/styles/variables/_si-vars.scss +13 -7
- package/src/styles/variables/_sizing.scss +22 -0
- package/src/styles/variables/_spacers.scss +53 -25
- package/src/styles/variables/_system-tokens.scss +190 -0
- package/src/styles/variables/_typography.scss +112 -99
- package/src/styles/variables/_utilities.scss +64 -51
- package/src/theme/_theme-element.scss +386 -2
- package/src/theme-shadow-dom.scss +17 -0
- package/src/theme.scss +14 -3
- /package/{LICENSE.md → LICENSE} +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use '../../variables/semantic-tokens';
|
|
2
|
+
@use '../../variables/system-tokens';
|
|
2
3
|
@use '../../variables/spacers';
|
|
3
4
|
@use '../functions';
|
|
4
5
|
@use '../variables';
|
|
@@ -8,13 +9,13 @@
|
|
|
8
9
|
// there's too many differences between what BS5 does and what the design system expects
|
|
9
10
|
@use 'sass:map';
|
|
10
11
|
|
|
11
|
-
$form-check-size: 1rem;
|
|
12
|
-
$form-radio-size: 1rem;
|
|
13
|
-
$form-radio-inner-size: 0.375rem;
|
|
12
|
+
$form-check-size: max(1rem, 16px); // FIXME: ref value
|
|
13
|
+
$form-radio-size: max(1rem, 16px); // FIXME: ref value
|
|
14
|
+
$form-radio-inner-size: max(0.375rem, 6px); // FIXME: ref value
|
|
14
15
|
$form-radio-offset: calc((#{$form-radio-size} - #{$form-radio-inner-size}) * 0.5 - 1px);
|
|
15
|
-
$form-check-padding-x: map.get(spacers.$spacers, 2);
|
|
16
|
+
$form-check-padding-x: map.get(spacers.$spacers-inline, 2);
|
|
16
17
|
|
|
17
|
-
$form-check-label-start: calc($form-check-size + map.get(spacers.$spacers, 4));
|
|
18
|
+
$form-check-label-start: calc($form-check-size + map.get(spacers.$spacers-inline, 4));
|
|
18
19
|
|
|
19
20
|
%form-check-spacing {
|
|
20
21
|
.form-check-input {
|
|
@@ -23,8 +24,8 @@ $form-check-label-start: calc($form-check-size + map.get(spacers.$spacers, 4));
|
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
.form-check {
|
|
26
|
-
padding-block: map.get(spacers.$spacers, 1);
|
|
27
|
-
padding-inline-start: calc($form-check-size + map.get(spacers.$spacers, 4));
|
|
27
|
+
padding-block: map.get(spacers.$spacers-block, 1);
|
|
28
|
+
padding-inline-start: calc($form-check-size + map.get(spacers.$spacers-inline, 4));
|
|
28
29
|
|
|
29
30
|
@extend %form-check-spacing;
|
|
30
31
|
|
|
@@ -42,24 +43,22 @@ $form-check-label-start: calc($form-check-size + map.get(spacers.$spacers, 4));
|
|
|
42
43
|
%form-check-base {
|
|
43
44
|
position: relative;
|
|
44
45
|
appearance: none;
|
|
45
|
-
background-color:
|
|
46
|
-
border: 1px solid
|
|
46
|
+
background-color: system-tokens.$si-sys-background-1;
|
|
47
|
+
border: 1px solid system-tokens.$si-sys-border-2;
|
|
47
48
|
flex-shrink: 0;
|
|
48
49
|
float: inline-start;
|
|
49
50
|
|
|
50
51
|
&:is(:hover, .hover) {
|
|
51
|
-
|
|
52
|
-
background: semantic-tokens.$element-base-1-hover;
|
|
52
|
+
background: system-tokens.$si-sys-background-hover;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
&:is(:active, .active) {
|
|
56
|
-
|
|
57
|
-
background: semantic-tokens.$element-action-primary-active;
|
|
56
|
+
background: system-tokens.$si-sys-background-active;
|
|
58
57
|
}
|
|
59
58
|
|
|
60
59
|
&:is([disabled], .disabled) {
|
|
61
|
-
border-color:
|
|
62
|
-
background-color:
|
|
60
|
+
border-color: system-tokens.$si-sys-text-disabled;
|
|
61
|
+
background-color: transparent;
|
|
63
62
|
}
|
|
64
63
|
}
|
|
65
64
|
|
|
@@ -80,59 +79,39 @@ $form-check-label-start: calc($form-check-size + map.get(spacers.$spacers, 4));
|
|
|
80
79
|
opacity: 0;
|
|
81
80
|
}
|
|
82
81
|
|
|
83
|
-
&:is(:checked, .checked) {
|
|
84
|
-
background-color:
|
|
85
|
-
border-color:
|
|
82
|
+
&:is(:checked, .checked, :indeterminate) {
|
|
83
|
+
background-color: system-tokens.$si-sys-background-accent;
|
|
84
|
+
border-color: transparent;
|
|
86
85
|
|
|
87
86
|
&:hover {
|
|
88
|
-
background-color:
|
|
89
|
-
border-color:
|
|
87
|
+
background-color: system-tokens.$si-sys-background-accent-hover;
|
|
88
|
+
border-color: transparent;
|
|
90
89
|
}
|
|
91
90
|
|
|
92
91
|
&:active {
|
|
93
|
-
background-color:
|
|
94
|
-
border-color:
|
|
92
|
+
background-color: system-tokens.$si-sys-background-accent-active;
|
|
93
|
+
border-color: transparent;
|
|
95
94
|
}
|
|
96
95
|
|
|
97
96
|
&::after {
|
|
98
|
-
background-color:
|
|
97
|
+
background-color: system-tokens.$si-sys-text-on-accent;
|
|
99
98
|
opacity: 1;
|
|
100
99
|
}
|
|
101
100
|
|
|
102
101
|
&[disabled] {
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
border-color: transparent;
|
|
103
|
+
background-color: system-tokens.$si-sys-text-disabled;
|
|
105
104
|
}
|
|
106
105
|
}
|
|
107
106
|
|
|
108
107
|
&:indeterminate {
|
|
109
|
-
background-color: semantic-tokens.$element-base-1;
|
|
110
|
-
border-color: semantic-tokens.$element-action-primary;
|
|
111
|
-
|
|
112
108
|
&::after {
|
|
113
109
|
mask-image: none;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
block-size: 0.125rem;
|
|
110
|
+
inline-size: calc($form-check-size * 0.625);
|
|
111
|
+
block-size: calc($form-check-size * 0.125);
|
|
117
112
|
opacity: 1;
|
|
118
|
-
inset-inline-start: 0.
|
|
119
|
-
inset-block-start: 0.
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
&:hover {
|
|
123
|
-
border-color: semantic-tokens.$element-action-primary-hover;
|
|
124
|
-
|
|
125
|
-
&::after {
|
|
126
|
-
background-color: semantic-tokens.$element-action-primary-hover;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
&:disabled {
|
|
131
|
-
border-color: semantic-tokens.$element-ui-3;
|
|
132
|
-
|
|
133
|
-
&::after {
|
|
134
|
-
background-color: semantic-tokens.$element-ui-3;
|
|
135
|
-
}
|
|
113
|
+
inset-inline-start: calc($form-check-size * 0.125);
|
|
114
|
+
inset-block-start: calc($form-check-size * 0.375);
|
|
136
115
|
}
|
|
137
116
|
}
|
|
138
117
|
}
|
|
@@ -155,36 +134,27 @@ $form-check-label-start: calc($form-check-size + map.get(spacers.$spacers, 4));
|
|
|
155
134
|
}
|
|
156
135
|
|
|
157
136
|
&:checked {
|
|
158
|
-
border-color:
|
|
159
|
-
background-color:
|
|
137
|
+
border-color: transparent;
|
|
138
|
+
background-color: system-tokens.$si-sys-background-accent;
|
|
160
139
|
|
|
161
140
|
&::after {
|
|
162
|
-
|
|
141
|
+
border-color: transparent;
|
|
142
|
+
background-color: system-tokens.$si-sys-text-on-accent;
|
|
163
143
|
}
|
|
164
144
|
|
|
165
145
|
&:hover {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
&::after {
|
|
170
|
-
background-color: semantic-tokens.$element-action-primary-text;
|
|
171
|
-
}
|
|
146
|
+
border-color: transparent;
|
|
147
|
+
background-color: system-tokens.$si-sys-background-accent-hover;
|
|
172
148
|
}
|
|
173
149
|
|
|
174
150
|
&:active {
|
|
175
|
-
border-color:
|
|
176
|
-
|
|
177
|
-
&::after {
|
|
178
|
-
background-color: semantic-tokens.$element-action-primary-text;
|
|
179
|
-
}
|
|
151
|
+
border-color: transparent;
|
|
152
|
+
background-color: system-tokens.$si-sys-border-accent-active;
|
|
180
153
|
}
|
|
181
154
|
|
|
182
155
|
&[disabled] {
|
|
183
|
-
border-color:
|
|
184
|
-
|
|
185
|
-
&::after {
|
|
186
|
-
background-color: semantic-tokens.$element-ui-3;
|
|
187
|
-
}
|
|
156
|
+
border-color: transparent;
|
|
157
|
+
background-color: system-tokens.$si-sys-text-disabled;
|
|
188
158
|
}
|
|
189
159
|
}
|
|
190
160
|
}
|
|
@@ -193,7 +163,7 @@ $form-check-label-start: calc($form-check-size + map.get(spacers.$spacers, 4));
|
|
|
193
163
|
display: inline-block;
|
|
194
164
|
position: relative;
|
|
195
165
|
padding-inline-end: $form-check-padding-x;
|
|
196
|
-
color:
|
|
166
|
+
color: system-tokens.$si-sys-text-primary;
|
|
197
167
|
}
|
|
198
168
|
|
|
199
169
|
.form-check-input {
|
|
@@ -204,7 +174,7 @@ $form-check-label-start: calc($form-check-size + map.get(spacers.$spacers, 4));
|
|
|
204
174
|
}
|
|
205
175
|
|
|
206
176
|
&[disabled] ~ .form-check-label {
|
|
207
|
-
color:
|
|
177
|
+
color: system-tokens.$si-sys-text-disabled;
|
|
208
178
|
}
|
|
209
179
|
|
|
210
180
|
&:is([type='checkbox'], .si-form-checkbox) {
|
|
@@ -239,7 +209,7 @@ $form-check-label-start: calc($form-check-size + map.get(spacers.$spacers, 4));
|
|
|
239
209
|
+ .btn {
|
|
240
210
|
pointer-events: none;
|
|
241
211
|
filter: none;
|
|
242
|
-
color:
|
|
212
|
+
color: system-tokens.$si-sys-text-disabled;
|
|
243
213
|
}
|
|
244
214
|
}
|
|
245
215
|
}
|
|
@@ -271,7 +241,7 @@ formly-field-multicheckbox {
|
|
|
271
241
|
}
|
|
272
242
|
|
|
273
243
|
&[disabled] ~ label {
|
|
274
|
-
color:
|
|
244
|
+
color: system-tokens.$si-sys-text-disabled;
|
|
275
245
|
}
|
|
276
246
|
}
|
|
277
247
|
}
|
|
@@ -286,7 +256,7 @@ formly-field-radio {
|
|
|
286
256
|
}
|
|
287
257
|
|
|
288
258
|
&[disabled] ~ label {
|
|
289
|
-
color:
|
|
259
|
+
color: system-tokens.$si-sys-text-disabled;
|
|
290
260
|
}
|
|
291
261
|
}
|
|
292
262
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@use '../../variables/focus';
|
|
2
|
-
@use '../../variables/
|
|
2
|
+
@use '../../variables/system-tokens';
|
|
3
3
|
@use '../../variables/spacers';
|
|
4
|
+
@use '../../variables/sizing';
|
|
4
5
|
@use '../../variables/utilities';
|
|
5
6
|
@use '../../variables/si-vars';
|
|
6
7
|
@use '../variables';
|
|
@@ -8,15 +9,15 @@
|
|
|
8
9
|
@use 'sass:map';
|
|
9
10
|
|
|
10
11
|
:is(.form-control, .form-select) {
|
|
11
|
-
--border-color: #{
|
|
12
|
-
--si-textarea-mask: #{
|
|
12
|
+
--border-color: #{system-tokens.$si-sys-border-2};
|
|
13
|
+
--si-textarea-mask: #{system-tokens.$si-sys-background-1};
|
|
13
14
|
// Formula:
|
|
14
15
|
// (1.25rem / 0px) (feedback icon size)
|
|
15
16
|
// + (action-size / 0px) (action-offset includes a padding)
|
|
16
17
|
// + 3px (min padding between input and first action or validation icon)
|
|
17
18
|
--si-input-padding-inline-end: calc(
|
|
18
19
|
var(--si-feedback-icon-size, 0px) + var(--si-action-icon-offset, 0px) +
|
|
19
|
-
#{map.get(spacers.$spacers, 2) - variables.$input-border-width}
|
|
20
|
+
#{map.get(spacers.$spacers-block, 2)} - #{variables.$input-border-width}
|
|
20
21
|
);
|
|
21
22
|
display: block;
|
|
22
23
|
inline-size: 100%;
|
|
@@ -27,8 +28,8 @@
|
|
|
27
28
|
font-size: variables.$input-font-size;
|
|
28
29
|
font-weight: variables.$input-font-weight;
|
|
29
30
|
line-height: variables.$input-line-height;
|
|
30
|
-
color:
|
|
31
|
-
background-color:
|
|
31
|
+
color: system-tokens.$si-sys-text-primary;
|
|
32
|
+
background-color: system-tokens.$si-sys-background-1;
|
|
32
33
|
background-clip: padding-box;
|
|
33
34
|
border: variables.$input-border-width solid var(--border-color);
|
|
34
35
|
border-radius: variables.$input-border-radius;
|
|
@@ -40,14 +41,15 @@
|
|
|
40
41
|
calc((#{variables.$input-height-inner} - #{variables.$form-feedback-icon-size}) * 0.5);
|
|
41
42
|
background-position-x: right
|
|
42
43
|
calc(
|
|
43
|
-
|
|
44
|
+
map.get(spacers.$spacers-block, 2) - variables.$input-border-width +
|
|
44
45
|
var(--si-action-icon-offset, 0px)
|
|
45
46
|
);
|
|
46
47
|
|
|
47
48
|
@include utilities.rtl {
|
|
48
49
|
background-position-x: left
|
|
49
50
|
calc(
|
|
50
|
-
map.get(spacers.$spacers, 1) +
|
|
51
|
+
map.get(spacers.$spacers-block, 1) +
|
|
52
|
+
var(--si-action-icon-offset, variables.$input-border-width)
|
|
51
53
|
);
|
|
52
54
|
}
|
|
53
55
|
|
|
@@ -61,36 +63,38 @@
|
|
|
61
63
|
// form-control must not add extra `padding-inline-end` for it.
|
|
62
64
|
&:has(.form-control-actions) {
|
|
63
65
|
background-image: none;
|
|
64
|
-
--si-input-padding-inline-end:
|
|
66
|
+
--si-input-padding-inline-end: calc(
|
|
67
|
+
#{map.get(spacers.$spacers-block, 2)} - #{variables.$input-border-width}
|
|
68
|
+
);
|
|
65
69
|
}
|
|
66
70
|
|
|
67
71
|
&:autofill {
|
|
68
|
-
background:
|
|
72
|
+
background: system-tokens.$si-sys-background-information-subtle;
|
|
69
73
|
}
|
|
70
74
|
|
|
71
75
|
&:is(:focus, :hover, :has(+ .form-control-actions:is(:hover, :focus-within))) {
|
|
72
|
-
--border-color: #{
|
|
73
|
-
--si-textarea-mask: #{
|
|
74
|
-
background-color:
|
|
76
|
+
--border-color: #{system-tokens.$si-sys-border-1};
|
|
77
|
+
--si-textarea-mask: #{system-tokens.$si-sys-background-4};
|
|
78
|
+
background-color: system-tokens.$si-sys-background-4;
|
|
75
79
|
}
|
|
76
80
|
|
|
77
81
|
&:is(.readonly, [readonly]) {
|
|
78
82
|
&,
|
|
79
83
|
&:is(:hover, :focus, :has(+ .form-control-actions:is(:hover, :focus-within))) {
|
|
80
|
-
--border-color: #{
|
|
84
|
+
--border-color: #{system-tokens.$si-sys-border-4};
|
|
81
85
|
--si-textarea-mask: transparent;
|
|
82
86
|
background-color: transparent;
|
|
83
|
-
color:
|
|
87
|
+
color: system-tokens.$si-sys-text-primary;
|
|
84
88
|
}
|
|
85
89
|
}
|
|
86
90
|
|
|
87
91
|
&:is(.disabled, :disabled) {
|
|
88
92
|
&,
|
|
89
93
|
&:is(:hover, :focus, :has(+ .form-control-actions:is(:hover, :focus-within))) {
|
|
90
|
-
--border-color: #{
|
|
94
|
+
--border-color: #{system-tokens.$si-sys-border-4};
|
|
91
95
|
--si-textarea-mask: transparent;
|
|
92
96
|
background-color: transparent;
|
|
93
|
-
color:
|
|
97
|
+
color: system-tokens.$si-sys-text-disabled;
|
|
94
98
|
}
|
|
95
99
|
|
|
96
100
|
&::placeholder {
|
|
@@ -117,10 +121,11 @@
|
|
|
117
121
|
.form-control:not(textarea):not(select[multiple]) {
|
|
118
122
|
// force height to fix line-height issue in firefox
|
|
119
123
|
block-size: variables.$input-height;
|
|
124
|
+
min-block-size: map.get(sizing.$sizing, 80);
|
|
120
125
|
}
|
|
121
126
|
|
|
122
127
|
.addon-second-icon {
|
|
123
|
-
--input-addon-inset-end: #{map.get(spacers.$spacers, 9)};
|
|
128
|
+
--input-addon-inset-end: #{map.get(spacers.$spacers-block, 9)};
|
|
124
129
|
}
|
|
125
130
|
|
|
126
131
|
// Wrapper for trailing actions (buttons, icons, unit labels) inside
|
|
@@ -135,7 +140,7 @@
|
|
|
135
140
|
display: inline-flex;
|
|
136
141
|
align-items: center;
|
|
137
142
|
block-size: variables.$input-height-inner;
|
|
138
|
-
padding-inline-start: map.get(spacers.$spacers, 1);
|
|
143
|
+
padding-inline-start: map.get(spacers.$spacers-inline, 1);
|
|
139
144
|
}
|
|
140
145
|
|
|
141
146
|
.form-control .form-control-actions::before {
|
|
@@ -143,13 +148,13 @@
|
|
|
143
148
|
margin-block: auto;
|
|
144
149
|
inline-size: variables.$form-feedback-icon-size;
|
|
145
150
|
block-size: variables.$form-feedback-icon-size;
|
|
146
|
-
padding-inline-end: map.get(spacers.$spacers, 1);
|
|
151
|
+
padding-inline-end: map.get(spacers.$spacers-inline, 1);
|
|
147
152
|
content: var(--si-feedback-icon, none);
|
|
148
153
|
}
|
|
149
154
|
|
|
150
155
|
.form-control + .form-control-actions {
|
|
151
156
|
position: absolute;
|
|
152
|
-
inset-inline-end: map.get(spacers.$spacers, 2);
|
|
157
|
+
inset-inline-end: map.get(spacers.$spacers-inline, 2);
|
|
153
158
|
inset-block-start: variables.$input-border-width;
|
|
154
159
|
z-index: 2;
|
|
155
160
|
}
|
|
@@ -187,15 +192,15 @@ select:is(.form-control, .form-select):not([multiple]) {
|
|
|
187
192
|
// + spacer-1(between arrow and validation)
|
|
188
193
|
right
|
|
189
194
|
calc(
|
|
190
|
-
|
|
191
|
-
map.get(spacers.$spacers, 1)
|
|
195
|
+
map.get(spacers.$spacers-block, 2) - variables.$input-border-width +
|
|
196
|
+
map.get(spacers.$spacers-block, 1) + si-vars.$si-icon-font-size
|
|
192
197
|
)
|
|
193
198
|
center,
|
|
194
|
-
right map.get(spacers.$spacers, 2) - variables.$input-border-width top 50%;
|
|
195
|
-
background-size: si-vars.$si-icon-font-size, variables.$form-feedback-icon-size;
|
|
199
|
+
right calc(map.get(spacers.$spacers-block, 2) - variables.$input-border-width) top 50%;
|
|
196
200
|
|
|
197
201
|
@include utilities.rtl {
|
|
198
|
-
background-position: left
|
|
202
|
+
background-position: left
|
|
203
|
+
calc(map.get(spacers.$spacers-inline, 2) - variables.$input-border-width) top 50%;
|
|
199
204
|
}
|
|
200
205
|
|
|
201
206
|
.app--dark & {
|
|
@@ -209,14 +214,15 @@ select:is(.form-control, .form-select)[multiple] {
|
|
|
209
214
|
border-start-end-radius: 0;
|
|
210
215
|
border-end-end-radius: 0;
|
|
211
216
|
padding: 0;
|
|
217
|
+
block-size: unset;
|
|
212
218
|
|
|
213
219
|
option {
|
|
214
|
-
padding: map.get(spacers.$spacers, 4);
|
|
220
|
+
padding: map.get(spacers.$spacers-block, 4) map.get(spacers.$spacers-inline, 4);
|
|
215
221
|
}
|
|
216
222
|
|
|
217
223
|
option:checked,
|
|
218
224
|
&:not(:disabled) option:not(:disabled):hover {
|
|
219
|
-
background:
|
|
220
|
-
color:
|
|
225
|
+
background: system-tokens.$si-sys-background-0;
|
|
226
|
+
color: system-tokens.$si-sys-text-accent;
|
|
221
227
|
}
|
|
222
228
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use '../../variables/
|
|
1
|
+
@use '../../variables/system-tokens';
|
|
2
2
|
@use '../variables';
|
|
3
3
|
|
|
4
4
|
.form-control {
|
|
@@ -11,24 +11,24 @@
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
&::file-selector-button {
|
|
14
|
-
color:
|
|
15
|
-
background:
|
|
14
|
+
color: system-tokens.$si-sys-text-on-accent-secondary;
|
|
15
|
+
background: system-tokens.$si-sys-background-accent-secondary;
|
|
16
16
|
border-color: inherit;
|
|
17
17
|
border-block-width: 0;
|
|
18
18
|
border-inline-width: 0 1px;
|
|
19
|
-
margin-block:
|
|
20
|
-
margin-inline:
|
|
19
|
+
margin-block: calc(variables.$input-padding-y * -1);
|
|
20
|
+
margin-inline: calc(variables.$input-padding-x * -1) variables.$input-padding-x;
|
|
21
21
|
block-size: inherit;
|
|
22
22
|
padding-inline: variables.$btn-padding-x;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
&:hover::file-selector-button {
|
|
26
|
-
color:
|
|
27
|
-
background:
|
|
26
|
+
color: system-tokens.$si-sys-text-on-accent-secondary-hover;
|
|
27
|
+
background: system-tokens.$si-sys-background-accent-secondary-hover;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
&:active::file-selector-button {
|
|
31
|
-
color:
|
|
32
|
-
background:
|
|
31
|
+
color: system-tokens.$si-sys-text-on-accent-secondary-active;
|
|
32
|
+
background: system-tokens.$si-sys-background-accent-secondary-active;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../mixins/form-layout';
|
|
3
|
+
@use '../../variables/spacers';
|
|
4
|
+
|
|
5
|
+
.si-form-fieldset,
|
|
6
|
+
.si-form-input {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
margin-block-end: map.get(spacers.$spacers-block, 6);
|
|
10
|
+
|
|
11
|
+
.form-item-content {
|
|
12
|
+
flex-grow: 1;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.si-form-fieldset {
|
|
17
|
+
.form-label {
|
|
18
|
+
margin-block-end: map.get(spacers.$spacers-block, 2);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.form-check:not(.form-check-inline) {
|
|
22
|
+
display: block;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:is(.si-form-fieldset, .si-form-input) .form-label:empty {
|
|
27
|
+
display: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Maintain compatibility with the old si-form-item style which allows wrapping multiple checkboxes.
|
|
31
|
+
:is(.si-form-fieldset, .si-form-input).form-check:not(.form-check-inline) {
|
|
32
|
+
display: block;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:is(.si-form-fieldset, .si-form-input).form-check:has(.form-check) {
|
|
36
|
+
padding-block: 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.form-col-layout {
|
|
40
|
+
@include form-layout.form-col-layout;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* Default responsive layout. */
|
|
44
|
+
.responsive-form-col-layout {
|
|
45
|
+
@include form-layout.responsive-form-col-layout(48ch);
|
|
46
|
+
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
@use '../../variables/elevation';
|
|
2
1
|
@use '../../variables/focus';
|
|
3
|
-
@use '../../variables/
|
|
2
|
+
@use '../../variables/system-tokens';
|
|
4
3
|
|
|
5
|
-
$track-color:
|
|
4
|
+
$track-color: system-tokens.$si-sys-border-4 !default;
|
|
6
5
|
$track-height: 4px !default;
|
|
7
6
|
$thumb-size: 24px !default;
|
|
8
7
|
|
|
@@ -15,36 +14,36 @@ $thumb-size: 24px !default;
|
|
|
15
14
|
|
|
16
15
|
@mixin range-thumb {
|
|
17
16
|
box-shadow: var(--thumb-shadow);
|
|
18
|
-
border: 1px solid
|
|
17
|
+
border: 1px solid system-tokens.$si-sys-border-accent;
|
|
19
18
|
block-size: $thumb-size;
|
|
20
19
|
inline-size: $thumb-size;
|
|
21
20
|
border-radius: 50%;
|
|
22
|
-
background:
|
|
21
|
+
background: system-tokens.$si-sys-background-1;
|
|
23
22
|
cursor: pointer;
|
|
24
23
|
|
|
25
24
|
&:hover {
|
|
26
|
-
border-color:
|
|
25
|
+
border-color: system-tokens.$si-sys-border-accent-hover;
|
|
27
26
|
background: radial-gradient(
|
|
28
27
|
circle,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
system-tokens.$si-sys-text-accent-hover 0%,
|
|
29
|
+
system-tokens.$si-sys-text-accent-hover 35%,
|
|
30
|
+
system-tokens.$si-sys-background-accent-secondary-hover 36%
|
|
32
31
|
);
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
&:active {
|
|
36
|
-
border-color:
|
|
35
|
+
border-color: system-tokens.$si-sys-border-accent-active;
|
|
37
36
|
background: radial-gradient(
|
|
38
37
|
circle,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
system-tokens.$si-sys-background-accent-active 0%,
|
|
39
|
+
system-tokens.$si-sys-background-accent-active 35%,
|
|
40
|
+
system-tokens.$si-sys-background-accent-secondary-active 36%
|
|
42
41
|
);
|
|
43
42
|
}
|
|
44
43
|
}
|
|
45
44
|
|
|
46
45
|
.form-range {
|
|
47
|
-
--thumb-shadow: #{
|
|
46
|
+
--thumb-shadow: #{system-tokens.$si-sys-effects-shadow-2};
|
|
48
47
|
-webkit-appearance: none; // stylelint-disable-line property-no-vendor-prefix
|
|
49
48
|
background: transparent;
|
|
50
49
|
inline-size: 100%;
|
|
@@ -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
|
|
|
@@ -65,9 +62,9 @@
|
|
|
65
62
|
font-size: variables.$form-feedback-font-size;
|
|
66
63
|
display: none;
|
|
67
64
|
inline-size: 100%;
|
|
68
|
-
line-height: typography.$si-line-height-
|
|
69
|
-
margin-block: map.get(spacers.$spacers, 1);
|
|
70
|
-
margin-inline: map.get(spacers.$spacers, 1);
|
|
65
|
+
line-height: typography.$si-line-height-body-sm;
|
|
66
|
+
margin-block: map.get(spacers.$spacers-block, 1);
|
|
67
|
+
margin-inline: map.get(spacers.$spacers-inline, 1);
|
|
71
68
|
}
|
|
72
69
|
|
|
73
70
|
@mixin form-validation-state-enh($state, $color, $icon, $text-color) {
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
@mixin badge-text {
|
|
8
8
|
min-inline-size: 0.875rem;
|
|
9
9
|
border-radius: 0.4375rem;
|
|
10
|
-
font-size: typography.$si-font-size-
|
|
10
|
+
font-size: typography.$si-font-size-body-sm;
|
|
11
11
|
line-height: 0.875rem;
|
|
12
12
|
padding-block: 0;
|
|
13
|
-
padding-inline: map.get(spacers.$spacers, 2);
|
|
13
|
+
padding-inline: map.get(spacers.$spacers-inline, 2);
|
|
14
14
|
font-family: variables.$font-family-sans-serif;
|
|
15
|
-
font-weight: typography.$si-font-weight-
|
|
15
|
+
font-weight: typography.$si-font-weight-sbold;
|
|
16
16
|
text-align: center;
|
|
17
17
|
}
|
|
@@ -0,0 +1,62 @@
|
|
|
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-fieldset,
|
|
10
|
+
.si-form-input:not(.form-check),
|
|
11
|
+
.si-form-input.form-check:not(.form-check-inline) {
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: row;
|
|
14
|
+
align-items: start;
|
|
15
|
+
column-gap: map.get(spacers.$spacers-inline, 6);
|
|
16
|
+
|
|
17
|
+
> .form-label {
|
|
18
|
+
flex: 0 0 var(--si-form-label-width, #{$form-col-layout-label-width});
|
|
19
|
+
max-inline-size: var(--si-form-label-width, #{$form-col-layout-label-width});
|
|
20
|
+
align-self: start;
|
|
21
|
+
padding-block: variables.$input-padding-y-full;
|
|
22
|
+
line-height: variables.$input-line-height;
|
|
23
|
+
|
|
24
|
+
&:empty {
|
|
25
|
+
display: block;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
> :not(.form-label) {
|
|
30
|
+
flex: 1 1 auto;
|
|
31
|
+
min-inline-size: 0;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.si-form-input.form-check:not(.form-check-inline) {
|
|
36
|
+
padding-inline-start: 0;
|
|
37
|
+
|
|
38
|
+
.form-check-input {
|
|
39
|
+
margin-inline-start: 0;
|
|
40
|
+
margin-inline-end: map.get(spacers.$spacers-inline, 4);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.si-form-fieldset {
|
|
45
|
+
align-items: start;
|
|
46
|
+
|
|
47
|
+
> .form-label {
|
|
48
|
+
align-self: start;
|
|
49
|
+
padding-block: map.get(spacers.$spacers-block, 1) 0 !important; // stylelint-disable-line declaration-no-important
|
|
50
|
+
margin-block-end: 0 !important; // stylelint-disable-line declaration-no-important
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Turns every inner form-field into a column layout above a min-width. */
|
|
56
|
+
@mixin responsive-form-col-layout($min-width) {
|
|
57
|
+
container-type: inline-size;
|
|
58
|
+
|
|
59
|
+
@container (min-width: #{$min-width}) {
|
|
60
|
+
@include form-col-layout;
|
|
61
|
+
}
|
|
62
|
+
}
|