@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.
- package/package.json +28 -0
- package/src/styles/_accessibility.scss +9 -0
- package/src/styles/_all-variables.scss +7 -0
- package/src/styles/_bootstrap.scss +26 -0
- package/src/styles/_themes.scss +35 -0
- package/src/styles/_variables.scss +10 -0
- package/src/styles/bootstrap/_alert.scss +60 -0
- package/src/styles/bootstrap/_badges.scss +115 -0
- package/src/styles/bootstrap/_breadcrumb.scss +32 -0
- package/src/styles/bootstrap/_button-group.scss +101 -0
- package/src/styles/bootstrap/_buttons.scss +244 -0
- package/src/styles/bootstrap/_card.scss +208 -0
- package/src/styles/bootstrap/_containers.scss +44 -0
- package/src/styles/bootstrap/_dropdowns.scss +216 -0
- package/src/styles/bootstrap/_forms.scss +10 -0
- package/src/styles/bootstrap/_functions.scss +188 -0
- package/src/styles/bootstrap/_grid.scss +33 -0
- package/src/styles/bootstrap/_helpers.scss +6 -0
- package/src/styles/bootstrap/_images.scss +45 -0
- package/src/styles/bootstrap/_list-group.scss +197 -0
- package/src/styles/bootstrap/_mixins.scss +30 -0
- package/src/styles/bootstrap/_modals.scss +234 -0
- package/src/styles/bootstrap/_nav.scss +155 -0
- package/src/styles/bootstrap/_pagination.scss +58 -0
- package/src/styles/bootstrap/_popovers.scss +188 -0
- package/src/styles/bootstrap/_progress.scss +42 -0
- package/src/styles/bootstrap/_reboot.scss +618 -0
- package/src/styles/bootstrap/_root.scss +22 -0
- package/src/styles/bootstrap/_tables.scss +186 -0
- package/src/styles/bootstrap/_tooltip.scss +145 -0
- package/src/styles/bootstrap/_transitions.scss +28 -0
- package/src/styles/bootstrap/_type.scss +235 -0
- package/src/styles/bootstrap/_utilities.scss +105 -0
- package/src/styles/bootstrap/_variables.scss +654 -0
- package/src/styles/bootstrap/forms/_form-check.scss +249 -0
- package/src/styles/bootstrap/forms/_form-control.scss +151 -0
- package/src/styles/bootstrap/forms/_form-file.scss +29 -0
- package/src/styles/bootstrap/forms/_form-label.scss +39 -0
- package/src/styles/bootstrap/forms/_form-range.scss +68 -0
- package/src/styles/bootstrap/forms/_input-group.scss +103 -0
- package/src/styles/bootstrap/forms/_validation.scss +95 -0
- package/src/styles/bootstrap/helpers/_clearfix.scss +5 -0
- package/src/styles/bootstrap/helpers/_position.scss +34 -0
- package/src/styles/bootstrap/helpers/_stacks.scss +13 -0
- package/src/styles/bootstrap/helpers/_stretched-link.scss +14 -0
- package/src/styles/bootstrap/helpers/_text-truncation.scss +9 -0
- package/src/styles/bootstrap/helpers/_visually-hidden.scss +10 -0
- package/src/styles/bootstrap/mixins/_backdrop.scss +19 -0
- package/src/styles/bootstrap/mixins/_breakpoints.scss +136 -0
- package/src/styles/bootstrap/mixins/_clearfix.scss +7 -0
- package/src/styles/bootstrap/mixins/_container.scss +7 -0
- package/src/styles/bootstrap/mixins/_deprecate.scss +12 -0
- package/src/styles/bootstrap/mixins/_gradients.scss +14 -0
- package/src/styles/bootstrap/mixins/_grid.scss +171 -0
- package/src/styles/bootstrap/mixins/_image.scss +15 -0
- package/src/styles/bootstrap/mixins/_lists.scss +5 -0
- package/src/styles/bootstrap/mixins/_reset-text.scss +18 -0
- package/src/styles/bootstrap/mixins/_table-row.scss +31 -0
- package/src/styles/bootstrap/mixins/_text-truncate.scss +7 -0
- package/src/styles/bootstrap/mixins/_transition.scss +28 -0
- package/src/styles/bootstrap/mixins/_utilities.scss +86 -0
- package/src/styles/bootstrap/mixins/_visually-hidden.scss +29 -0
- package/src/styles/components/_application-header.scss +244 -0
- package/src/styles/components/_container-grid.scss +99 -0
- package/src/styles/components/_datatable.scss +328 -0
- package/src/styles/components/_drag_drop.scss +105 -0
- package/src/styles/components/_electron-titlebar.scss +5 -0
- package/src/styles/components/_elevation.scss +21 -0
- package/src/styles/components/_focus.scss +21 -0
- package/src/styles/components/_icons.scss +25 -0
- package/src/styles/components/_layout.scss +105 -0
- package/src/styles/components/_links.scss +34 -0
- package/src/styles/components/_pills.scss +45 -0
- package/src/styles/components/_scrollbar.scss +10 -0
- package/src/styles/components/_skeleton.scss +42 -0
- package/src/styles/components/_switch.scss +77 -0
- package/src/styles/components/_system-banner.scss +5 -0
- package/src/styles/components/_widgets.scss +58 -0
- package/src/styles/variables/_animations.scss +7 -0
- package/src/styles/variables/_elevation.scss +25 -0
- package/src/styles/variables/_focus.scss +55 -0
- package/src/styles/variables/_layout.scss +6 -0
- package/src/styles/variables/_semantic-tokens.scss +178 -0
- package/src/styles/variables/_si-vars.scss +19 -0
- package/src/styles/variables/_spacers.scss +28 -0
- package/src/styles/variables/_typography.scss +66 -0
- package/src/styles/variables/_utilities.scss +599 -0
- package/src/styles/variables/_zindex.scss +20 -0
- package/src/theme/_base-colors.scss +79 -0
- package/src/theme/_data-colors.scss +105 -0
- package/src/theme/_theme-element.scss +339 -0
- package/src/theme.scss +49 -0
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
@use '../../variables/semantic-tokens';
|
|
2
|
+
@use '../../variables/spacers';
|
|
3
|
+
@use '../functions';
|
|
4
|
+
@use '../variables';
|
|
5
|
+
|
|
6
|
+
// ----------------------------------------------------------------------------
|
|
7
|
+
// this is a drop-in replacement to bootstrap's _form-check.scss
|
|
8
|
+
// there's too many differences between what BS5 does and what the design system expects
|
|
9
|
+
@use 'sass:map';
|
|
10
|
+
|
|
11
|
+
$form-check-size: map.get(spacers.$spacers, 6);
|
|
12
|
+
$form-radio-size: map.get(spacers.$spacers, 6);
|
|
13
|
+
$form-radio-inner-size: map.get(spacers.$spacers, 3);
|
|
14
|
+
$form-radio-offset: ($form-radio-size - $form-radio-inner-size) * 0.5 - 1px;
|
|
15
|
+
$form-check-padding-x: map.get(spacers.$spacers, 2);
|
|
16
|
+
|
|
17
|
+
$form-check-label-start: $form-check-size + map.get(spacers.$spacers, 4);
|
|
18
|
+
|
|
19
|
+
.form-check {
|
|
20
|
+
padding-block: map.get(spacers.$spacers, 1);
|
|
21
|
+
|
|
22
|
+
:is(.valid-feedback, .invalid-feedback) {
|
|
23
|
+
margin-inline-start: $form-check-label-start;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.form-check-inline {
|
|
28
|
+
display: inline-block;
|
|
29
|
+
margin-inline-end: variables.$form-check-inline-margin-end;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
%form-check-base {
|
|
33
|
+
position: relative;
|
|
34
|
+
appearance: none;
|
|
35
|
+
background-color: semantic-tokens.$element-ui-5;
|
|
36
|
+
border: 1px solid semantic-tokens.$element-ui-1;
|
|
37
|
+
flex-shrink: 0;
|
|
38
|
+
float: inline-start;
|
|
39
|
+
|
|
40
|
+
&:is(:hover, .hover) {
|
|
41
|
+
border-color: semantic-tokens.$element-action-secondary-border-hover;
|
|
42
|
+
background: semantic-tokens.$element-action-secondary-hover;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:is([disabled], .disabled) {
|
|
46
|
+
border-color: semantic-tokens.$element-ui-3;
|
|
47
|
+
background-color: semantic-tokens.$element-ui-5;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
%form-check-checkbox {
|
|
52
|
+
inline-size: $form-check-size !important; // stylelint-disable-line declaration-no-important
|
|
53
|
+
block-size: $form-check-size !important; // stylelint-disable-line declaration-no-important
|
|
54
|
+
border-radius: semantic-tokens.$element-button-radius;
|
|
55
|
+
inset-inline-start: map.get(spacers.$spacers, 1);
|
|
56
|
+
|
|
57
|
+
&::after {
|
|
58
|
+
content: '';
|
|
59
|
+
position: absolute;
|
|
60
|
+
display: block;
|
|
61
|
+
inset-inline-start: -1px;
|
|
62
|
+
inset-block-start: -1px;
|
|
63
|
+
inline-size: $form-check-size;
|
|
64
|
+
block-size: $form-check-size;
|
|
65
|
+
mask-image: functions.escape-svg(variables.$form-check-input-checked-bg-image);
|
|
66
|
+
opacity: 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&:is(:checked, .checked) {
|
|
70
|
+
background-color: semantic-tokens.$element-ui-0;
|
|
71
|
+
border-color: semantic-tokens.$element-ui-0;
|
|
72
|
+
|
|
73
|
+
&:hover {
|
|
74
|
+
background-color: semantic-tokens.$element-ui-0-hover;
|
|
75
|
+
border-color: semantic-tokens.$element-ui-0-hover;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&::after {
|
|
79
|
+
background-color: semantic-tokens.$element-text-inverse;
|
|
80
|
+
opacity: 1;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&[disabled] {
|
|
84
|
+
background-color: semantic-tokens.$element-ui-3;
|
|
85
|
+
border-color: semantic-tokens.$element-ui-3;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&:indeterminate {
|
|
90
|
+
border-color: semantic-tokens.$element-ui-0;
|
|
91
|
+
|
|
92
|
+
&::after {
|
|
93
|
+
mask-image: none;
|
|
94
|
+
background-color: semantic-tokens.$element-ui-0;
|
|
95
|
+
inline-size: 10px;
|
|
96
|
+
block-size: 2px;
|
|
97
|
+
opacity: 1;
|
|
98
|
+
inset-inline-start: 2px;
|
|
99
|
+
inset-block-start: 6px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&:hover {
|
|
103
|
+
border-color: semantic-tokens.$element-ui-0-hover;
|
|
104
|
+
|
|
105
|
+
&::after {
|
|
106
|
+
background-color: semantic-tokens.$element-ui-0-hover;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&:disabled {
|
|
111
|
+
border-color: semantic-tokens.$element-ui-3;
|
|
112
|
+
|
|
113
|
+
&::after {
|
|
114
|
+
background-color: semantic-tokens.$element-ui-3;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
%form-check-radio {
|
|
121
|
+
inline-size: $form-radio-size;
|
|
122
|
+
block-size: $form-radio-size;
|
|
123
|
+
border-radius: 50%;
|
|
124
|
+
inset-inline-start: 0;
|
|
125
|
+
|
|
126
|
+
&::after {
|
|
127
|
+
content: '';
|
|
128
|
+
position: absolute;
|
|
129
|
+
display: block;
|
|
130
|
+
inset-block-start: $form-radio-offset;
|
|
131
|
+
inset-inline-start: $form-radio-offset;
|
|
132
|
+
inline-size: $form-radio-inner-size;
|
|
133
|
+
block-size: $form-radio-inner-size;
|
|
134
|
+
border-radius: 50%;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&:checked {
|
|
138
|
+
border-color: semantic-tokens.$element-ui-0;
|
|
139
|
+
|
|
140
|
+
&::after {
|
|
141
|
+
background-color: semantic-tokens.$element-ui-0;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
&:hover {
|
|
145
|
+
border-color: semantic-tokens.$element-ui-0-hover;
|
|
146
|
+
|
|
147
|
+
&::after {
|
|
148
|
+
background-color: semantic-tokens.$element-ui-0-hover;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&[disabled] {
|
|
153
|
+
border-color: semantic-tokens.$element-ui-3;
|
|
154
|
+
|
|
155
|
+
&::after {
|
|
156
|
+
background-color: semantic-tokens.$element-ui-3;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
%form-check-label {
|
|
163
|
+
display: inline-block;
|
|
164
|
+
position: relative;
|
|
165
|
+
padding-inline: map.get(spacers.$spacers, 4) $form-check-padding-x;
|
|
166
|
+
color: semantic-tokens.$element-text-primary;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.form-check-input {
|
|
170
|
+
@extend %form-check-base;
|
|
171
|
+
|
|
172
|
+
~ .form-check-label {
|
|
173
|
+
@extend %form-check-label;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
&[disabled] ~ .form-check-label {
|
|
177
|
+
color: semantic-tokens.$element-text-disabled;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
&:is([type='checkbox'], .si-form-checkbox) {
|
|
181
|
+
@extend %form-check-checkbox;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
&[type='radio'] {
|
|
185
|
+
@extend %form-check-radio;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// button group
|
|
190
|
+
.btn-check {
|
|
191
|
+
position: absolute;
|
|
192
|
+
clip: rect(0, 0, 0, 0);
|
|
193
|
+
pointer-events: none;
|
|
194
|
+
|
|
195
|
+
&:is([disabled], :disabled) {
|
|
196
|
+
+ .btn {
|
|
197
|
+
pointer-events: none;
|
|
198
|
+
filter: none;
|
|
199
|
+
color: semantic-tokens.$element-text-disabled;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.ngx-datatable {
|
|
205
|
+
.datatable-checkbox {
|
|
206
|
+
inline-size: $form-check-size !important; // stylelint-disable-line declaration-no-important
|
|
207
|
+
block-size: $form-check-size !important; // stylelint-disable-line declaration-no-important
|
|
208
|
+
inset-block-start: 1px !important; // stylelint-disable-line declaration-no-important
|
|
209
|
+
|
|
210
|
+
input[type='checkbox'] {
|
|
211
|
+
@extend %form-check-base;
|
|
212
|
+
@extend %form-check-checkbox;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.datatable-body .datatable-checkbox {
|
|
217
|
+
inset-block-start: 3px !important; // stylelint-disable-line declaration-no-important
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
formly-field-multicheckbox {
|
|
222
|
+
input[type='checkbox'] {
|
|
223
|
+
@extend %form-check-base;
|
|
224
|
+
@extend %form-check-checkbox;
|
|
225
|
+
|
|
226
|
+
~ label {
|
|
227
|
+
@extend %form-check-label;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
&[disabled] ~ label {
|
|
231
|
+
color: semantic-tokens.$element-text-disabled;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
formly-field-radio {
|
|
237
|
+
input[type='radio'] {
|
|
238
|
+
@extend %form-check-base;
|
|
239
|
+
@extend %form-check-radio;
|
|
240
|
+
|
|
241
|
+
~ label {
|
|
242
|
+
@extend %form-check-label;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
&[disabled] ~ label {
|
|
246
|
+
color: semantic-tokens.$element-text-disabled;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
@use '../../variables/focus';
|
|
2
|
+
@use '../../variables/semantic-tokens';
|
|
3
|
+
@use '../../variables/spacers';
|
|
4
|
+
@use '../../variables/typography';
|
|
5
|
+
@use '../../variables/utilities';
|
|
6
|
+
@use '../variables';
|
|
7
|
+
|
|
8
|
+
@use 'sass:map';
|
|
9
|
+
|
|
10
|
+
:is(.form-control, .form-select) {
|
|
11
|
+
--border-color: #{semantic-tokens.$element-ui-2};
|
|
12
|
+
display: block;
|
|
13
|
+
inline-size: 100%;
|
|
14
|
+
padding-block: variables.$input-padding-y;
|
|
15
|
+
padding-inline-start: variables.$input-padding-x;
|
|
16
|
+
padding-inline-end: calc(
|
|
17
|
+
var(--si-feedback-icon-offset, 0px) + var(--si-action-icon-offset, 0px) +
|
|
18
|
+
#{variables.$input-padding-x}
|
|
19
|
+
);
|
|
20
|
+
font-family: variables.$input-font-family;
|
|
21
|
+
font-size: variables.$input-font-size;
|
|
22
|
+
font-weight: variables.$input-font-weight;
|
|
23
|
+
line-height: variables.$input-line-height;
|
|
24
|
+
color: variables.$input-color;
|
|
25
|
+
background-color: variables.$input-bg;
|
|
26
|
+
background-clip: padding-box;
|
|
27
|
+
border: variables.$input-border-width solid var(--border-color);
|
|
28
|
+
border-radius: variables.$input-border-radius;
|
|
29
|
+
appearance: none; // Fix appearance for date inputs in Safari
|
|
30
|
+
background-image: var(--si-feedback-icon, none);
|
|
31
|
+
background-repeat: no-repeat;
|
|
32
|
+
background-size: 1.25rem;
|
|
33
|
+
background-position: top 5px right calc(6px + var(--si-action-icon-offset, 0px));
|
|
34
|
+
|
|
35
|
+
@include utilities.rtl {
|
|
36
|
+
background-position: top 5px left 6px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&.hide-feedback-icon {
|
|
40
|
+
background-image: none;
|
|
41
|
+
padding-inline-end: variables.$input-padding-x;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&:autofill {
|
|
45
|
+
background: semantic-tokens.$element-base-information;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&:is(:focus, :hover) {
|
|
49
|
+
--border-color: #{semantic-tokens.$element-ui-1};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&:is(.readonly, [readonly]) {
|
|
53
|
+
&,
|
|
54
|
+
:is(:hover, :focus) {
|
|
55
|
+
--border-color: #{semantic-tokens.$element-ui-4};
|
|
56
|
+
background-color: variables.$input-bg;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&:is(.disabled, :disabled) {
|
|
61
|
+
&,
|
|
62
|
+
&:is(:hover, :focus) {
|
|
63
|
+
--border-color: #{semantic-tokens.$element-ui-3};
|
|
64
|
+
color: semantic-tokens.$element-text-disabled;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&::placeholder {
|
|
68
|
+
color: variables.$input-placeholder-disabled-color;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&:is(:disabled, [readonly]) {
|
|
73
|
+
// iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
|
|
74
|
+
opacity: 1;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&:focus {
|
|
78
|
+
@include focus.make-outline-focus();
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&::placeholder {
|
|
82
|
+
color: variables.$input-placeholder-color;
|
|
83
|
+
// Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526.
|
|
84
|
+
opacity: 1;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.form-control:not(textarea):not(select[multiple]) {
|
|
89
|
+
// force height to fix line-height issue in firefox
|
|
90
|
+
block-size: calc(#{typography.$si-line-height-body-2}em + #{2 * map.get(spacers.$spacers, 4)});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.addon-second-icon {
|
|
94
|
+
--input-addon-inset-end: #{map.get(spacers.$spacers, 9)};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
textarea.form-control {
|
|
98
|
+
min-block-size: variables.$input-height;
|
|
99
|
+
padding-block: variables.$input-padding-y;
|
|
100
|
+
line-height: 1.5;
|
|
101
|
+
// prevent scrollbar overlapping rounded borders
|
|
102
|
+
box-shadow: 0 0 0 1px var(--border-color);
|
|
103
|
+
border: 3px solid variables.$input-bg !important; // stylelint-disable-line declaration-no-important
|
|
104
|
+
outline-offset: 2px !important; // stylelint-disable-line declaration-no-important
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
select.form-control {
|
|
108
|
+
&.readonly {
|
|
109
|
+
pointer-events: none;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
select:is(.form-control, .form-select):not([multiple]) {
|
|
114
|
+
padding-block: variables.$input-padding-y;
|
|
115
|
+
padding-inline: map.get(spacers.$spacers, 4) map.get(spacers.$spacers, 8);
|
|
116
|
+
appearance: none;
|
|
117
|
+
background-image:
|
|
118
|
+
var(--si-feedback-icon, none),
|
|
119
|
+
url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M352.79 203.21a12.45 12.45 0 011.44 15.86l-1.44 1.72-88 88a12.45 12.45 0 01-15.86 1.44l-1.72-1.44-88-88a12.43 12.43 0 0115.86-19l1.72 1.44L256 282.42l79.21-79.21a12.45 12.45 0 0115.86-1.44z'/></svg>");
|
|
120
|
+
background-repeat: no-repeat;
|
|
121
|
+
background-position:
|
|
122
|
+
right 20px center,
|
|
123
|
+
right 2px top 50%;
|
|
124
|
+
background-size: 1.25rem, 1.5rem;
|
|
125
|
+
|
|
126
|
+
@include utilities.rtl {
|
|
127
|
+
background-position: left map.get(spacers.$spacers, 2) top 50%;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.app--dark & {
|
|
131
|
+
background-image:
|
|
132
|
+
var(--si-feedback-icon, none),
|
|
133
|
+
url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='white' d='M352.79 203.21a12.45 12.45 0 011.44 15.86l-1.44 1.72-88 88a12.45 12.45 0 01-15.86 1.44l-1.72-1.44-88-88a12.43 12.43 0 0115.86-19l1.72 1.44L256 282.42l79.21-79.21a12.45 12.45 0 0115.86-1.44z'/></svg>");
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
select:is(.form-control, .form-select)[multiple] {
|
|
138
|
+
border-start-end-radius: 0;
|
|
139
|
+
border-end-end-radius: 0;
|
|
140
|
+
padding: 0;
|
|
141
|
+
|
|
142
|
+
option {
|
|
143
|
+
padding: map.get(spacers.$spacers, 4);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
option:checked,
|
|
147
|
+
&:not(:disabled) option:not(:disabled):hover {
|
|
148
|
+
background: semantic-tokens.$element-base-0;
|
|
149
|
+
color: semantic-tokens.$element-text-active;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@use '../../variables/semantic-tokens';
|
|
2
|
+
@use '../variables';
|
|
3
|
+
|
|
4
|
+
.form-control {
|
|
5
|
+
&[type='file'] {
|
|
6
|
+
overflow: hidden; // prevent pseudo element button overlap
|
|
7
|
+
|
|
8
|
+
&:not(:disabled):not([readonly]) {
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&::file-selector-button {
|
|
14
|
+
color: semantic-tokens.$element-action-secondary-text;
|
|
15
|
+
background: semantic-tokens.$element-action-secondary;
|
|
16
|
+
border-color: inherit;
|
|
17
|
+
border-block-width: 0;
|
|
18
|
+
border-inline-width: 0 1px;
|
|
19
|
+
margin-block: -(variables.$input-padding-y);
|
|
20
|
+
margin-inline: -(variables.$input-padding-x) variables.$input-padding-x;
|
|
21
|
+
block-size: inherit;
|
|
22
|
+
padding-inline: variables.$btn-padding-x;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&:hover::file-selector-button {
|
|
26
|
+
color: semantic-tokens.$element-action-secondary-text-hover;
|
|
27
|
+
background: semantic-tokens.$element-action-secondary-hover;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
@use '../../variables/spacers';
|
|
2
|
+
@use '../variables';
|
|
3
|
+
|
|
4
|
+
@use 'sass:map';
|
|
5
|
+
|
|
6
|
+
.form-label,
|
|
7
|
+
.col-form-label {
|
|
8
|
+
font-size: variables.$form-label-font-size;
|
|
9
|
+
font-style: variables.$form-label-font-style;
|
|
10
|
+
font-weight: variables.$form-label-font-weight;
|
|
11
|
+
color: variables.$form-label-color;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.form-label {
|
|
15
|
+
display: inline-block;
|
|
16
|
+
line-height: 0.875rem;
|
|
17
|
+
padding-block: map.get(spacers.$spacers, 3) map.get(spacers.$spacers, 2);
|
|
18
|
+
|
|
19
|
+
.text-end & {
|
|
20
|
+
padding-inline-end: variables.$input-padding-x;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.col-form-label {
|
|
25
|
+
padding-block: map.get(spacers.$spacers, 4) - 1px 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.required:is(.form-label, .col-form-label, .form-check-label)::after {
|
|
29
|
+
content: '*';
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.form-text {
|
|
33
|
+
display: block;
|
|
34
|
+
margin-block-start: variables.$form-text-margin-top;
|
|
35
|
+
font-size: variables.$form-text-font-size;
|
|
36
|
+
font-style: variables.$form-text-font-style;
|
|
37
|
+
font-weight: variables.$form-text-font-weight;
|
|
38
|
+
color: variables.$form-text-color;
|
|
39
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
@use '../../variables/elevation';
|
|
2
|
+
@use '../../variables/focus';
|
|
3
|
+
@use '../../variables/semantic-tokens';
|
|
4
|
+
|
|
5
|
+
$track-color: semantic-tokens.$element-ui-4 !default;
|
|
6
|
+
$track-height: 4px !default;
|
|
7
|
+
$thumb-size: 24px !default;
|
|
8
|
+
|
|
9
|
+
@mixin range-track {
|
|
10
|
+
block-size: $track-height;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
animation-duration: 0.2s;
|
|
13
|
+
background: $track-color;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@mixin range-thumb {
|
|
17
|
+
box-shadow: var(--thumb-shadow);
|
|
18
|
+
border: 1px solid semantic-tokens.$element-action-secondary-border;
|
|
19
|
+
block-size: $thumb-size;
|
|
20
|
+
inline-size: $thumb-size;
|
|
21
|
+
border-radius: 50%;
|
|
22
|
+
background: semantic-tokens.$element-base-1;
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
|
|
25
|
+
&:hover {
|
|
26
|
+
border-color: semantic-tokens.$element-action-secondary-border-hover;
|
|
27
|
+
background: radial-gradient(
|
|
28
|
+
circle,
|
|
29
|
+
semantic-tokens.$element-action-secondary-text-hover 0%,
|
|
30
|
+
semantic-tokens.$element-action-secondary-text-hover 35%,
|
|
31
|
+
semantic-tokens.$element-action-secondary-hover 36%
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.form-range {
|
|
37
|
+
--thumb-shadow: #{elevation.$element-elevation-1};
|
|
38
|
+
-webkit-appearance: none; // stylelint-disable-line property-no-vendor-prefix
|
|
39
|
+
background: transparent;
|
|
40
|
+
inline-size: 100%;
|
|
41
|
+
|
|
42
|
+
&:focus-visible {
|
|
43
|
+
--thumb-shadow: #{focus.$si-focus-styling-box-shadow};
|
|
44
|
+
outline: none;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&::-webkit-slider-runnable-track {
|
|
48
|
+
@include range-track;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&::-webkit-slider-thumb {
|
|
52
|
+
@include range-thumb;
|
|
53
|
+
-webkit-appearance: none; // stylelint-disable-line property-no-vendor-prefix
|
|
54
|
+
margin-block-start: -0.5 * $thumb-size;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&::-moz-range-track {
|
|
58
|
+
@include range-track;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&::-moz-range-thumb {
|
|
62
|
+
@include range-thumb;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&::-moz-focus-outer {
|
|
66
|
+
border: 0;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
@use '../variables';
|
|
2
|
+
|
|
3
|
+
@use 'sass:string';
|
|
4
|
+
@use 'sass:map';
|
|
5
|
+
|
|
6
|
+
//
|
|
7
|
+
// Base styles
|
|
8
|
+
//
|
|
9
|
+
|
|
10
|
+
.input-group {
|
|
11
|
+
position: relative;
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-wrap: wrap; // For form validation feedback
|
|
14
|
+
align-items: stretch;
|
|
15
|
+
inline-size: 100%;
|
|
16
|
+
|
|
17
|
+
> :is(.form-control, .form-select) {
|
|
18
|
+
position: relative; // For focus state's z-index
|
|
19
|
+
flex: 1 1 auto;
|
|
20
|
+
inline-size: 1%;
|
|
21
|
+
min-inline-size: 0; // https://stackoverflow.com/questions/36247140/why-dont-flex-items-shrink-past-content-size
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Bring the "active" form control to the top of surrounding elements
|
|
25
|
+
> :is(.form-control, .form-select):focus {
|
|
26
|
+
z-index: 3;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Ensure buttons are always above inputs for more visually pleasing borders.
|
|
30
|
+
// This isn't needed for `.input-group-text` since it shares the same border-color
|
|
31
|
+
// as our inputs.
|
|
32
|
+
.btn {
|
|
33
|
+
position: relative;
|
|
34
|
+
z-index: 2;
|
|
35
|
+
|
|
36
|
+
&:focus {
|
|
37
|
+
z-index: 3;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Textual addons
|
|
43
|
+
//
|
|
44
|
+
// Serves as a catch-all element for any text or radio/checkbox input you wish
|
|
45
|
+
// to prepend or append to an input.
|
|
46
|
+
|
|
47
|
+
.input-group-text {
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
padding-block: variables.$input-group-addon-padding-y;
|
|
51
|
+
padding-inline: variables.$input-group-addon-padding-x;
|
|
52
|
+
font-size: variables.$input-font-size; // Match inputs
|
|
53
|
+
font-weight: variables.$input-group-addon-font-weight;
|
|
54
|
+
line-height: variables.$input-line-height;
|
|
55
|
+
color: variables.$input-group-addon-color;
|
|
56
|
+
text-align: center;
|
|
57
|
+
white-space: nowrap;
|
|
58
|
+
background-color: variables.$input-group-addon-bg;
|
|
59
|
+
border: variables.$input-border-width solid variables.$input-group-addon-border-color;
|
|
60
|
+
border-radius: variables.$input-border-radius;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Rounded corners
|
|
64
|
+
//
|
|
65
|
+
// These rulesets must come after the sizing ones to properly override sm and lg
|
|
66
|
+
// border-radius values when extending. They're more specific than we'd like
|
|
67
|
+
// with the `.input-group >` part, but without it, we cannot override the sizing.
|
|
68
|
+
|
|
69
|
+
// stylelint-disable-next-line no-duplicate-selectors
|
|
70
|
+
.input-group {
|
|
71
|
+
&:not(.has-validation) {
|
|
72
|
+
> :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu),
|
|
73
|
+
> .dropdown-toggle:nth-last-child(n + 3) {
|
|
74
|
+
border-start-end-radius: 0;
|
|
75
|
+
border-end-end-radius: 0;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&.has-validation {
|
|
80
|
+
> :nth-last-child(n + 3):not(.dropdown-toggle):not(.dropdown-menu),
|
|
81
|
+
> .dropdown-toggle:nth-last-child(n + 4) {
|
|
82
|
+
border-start-end-radius: 0;
|
|
83
|
+
border-end-end-radius: 0;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
$validation-messages: '';
|
|
88
|
+
@each $state in map.keys(variables.$form-validation-states) {
|
|
89
|
+
$validation-messages: $validation-messages +
|
|
90
|
+
':not(.' +
|
|
91
|
+
string.unquote($state) +
|
|
92
|
+
'-tooltip)' +
|
|
93
|
+
':not(.' +
|
|
94
|
+
string.unquote($state) +
|
|
95
|
+
'-feedback)';
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
> :not(:first-child):not(.dropdown-menu)#{$validation-messages} {
|
|
99
|
+
margin-inline-start: -(variables.$input-border-width);
|
|
100
|
+
border-start-start-radius: 0;
|
|
101
|
+
border-end-start-radius: 0;
|
|
102
|
+
}
|
|
103
|
+
}
|