@carbon/styles 1.42.0 → 1.43.0-rc.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/css/styles.css +277 -134
- package/css/styles.min.css +1 -1
- package/package.json +2 -2
- package/scss/components/button/_button.scss +6 -0
- package/scss/components/date-picker/_date-picker.scss +28 -14
- package/scss/components/fluid-date-picker/_fluid-date-picker.scss +13 -0
- package/scss/components/fluid-number-input/_fluid-number-input.scss +54 -59
- package/scss/components/fluid-text-area/_fluid-text-area.scss +6 -0
- package/scss/components/fluid-text-input/_fluid-text-input.scss +7 -0
- package/scss/components/inline-loading/_inline-loading.scss +9 -0
- package/scss/components/list-box/_list-box.scss +53 -0
- package/scss/components/number-input/_number-input.scss +65 -125
- package/scss/components/select/_select.scss +30 -2
- package/scss/components/slug/_slug.scss +19 -0
- package/scss/components/structured-list/_structured-list.scss +1 -1
- package/scss/components/text-area/_text-area.scss +34 -4
- package/scss/components/text-input/_text-input.scss +25 -0
- package/scss/utilities/_ai-gradient.scss +2 -2
|
@@ -6,12 +6,14 @@
|
|
|
6
6
|
//
|
|
7
7
|
|
|
8
8
|
@use '../form';
|
|
9
|
+
@use '../../colors' as *;
|
|
9
10
|
@use '../../config' as *;
|
|
10
11
|
@use '../../spacing' as *;
|
|
11
12
|
@use '../../motion' as *;
|
|
12
13
|
@use '../../type' as *;
|
|
13
14
|
@use '../../breakpoint' as *;
|
|
14
15
|
@use '../../theme' as *;
|
|
16
|
+
@use '../../utilities/ai-gradient' as *;
|
|
15
17
|
@use '../../utilities/component-reset';
|
|
16
18
|
@use '../../utilities/convert';
|
|
17
19
|
@use '../../utilities/focus-outline' as *;
|
|
@@ -171,7 +173,7 @@
|
|
|
171
173
|
}
|
|
172
174
|
|
|
173
175
|
.#{$prefix}--select__invalid-icon--warning path[fill] {
|
|
174
|
-
fill: $
|
|
176
|
+
fill: $black-100;
|
|
175
177
|
opacity: 1;
|
|
176
178
|
}
|
|
177
179
|
|
|
@@ -265,7 +267,7 @@
|
|
|
265
267
|
fill: $icon-disabled;
|
|
266
268
|
}
|
|
267
269
|
|
|
268
|
-
//Skeleton State
|
|
270
|
+
// Skeleton State
|
|
269
271
|
.#{$prefix}--select.#{$prefix}--skeleton {
|
|
270
272
|
@include skeleton;
|
|
271
273
|
|
|
@@ -278,6 +280,32 @@
|
|
|
278
280
|
display: none;
|
|
279
281
|
}
|
|
280
282
|
|
|
283
|
+
// Slug styles
|
|
284
|
+
.#{$prefix}--select--slug .#{$prefix}--slug {
|
|
285
|
+
position: absolute;
|
|
286
|
+
inset-block-start: 50%;
|
|
287
|
+
inset-inline-end: $spacing-08;
|
|
288
|
+
transform: translateY(-50%);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.#{$prefix}--select--slug .#{$prefix}--select-input {
|
|
292
|
+
@include ai-gradient;
|
|
293
|
+
|
|
294
|
+
padding-inline-end: $spacing-10;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.#{$prefix}--select--slug.#{$prefix}--select--invalid
|
|
298
|
+
.#{$prefix}--select-input,
|
|
299
|
+
.#{$prefix}--select--slug.#{$prefix}--select--warning
|
|
300
|
+
.#{$prefix}--select-input {
|
|
301
|
+
padding-inline-end: $spacing-12;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.#{$prefix}--select--slug.#{$prefix}--select--invalid .#{$prefix}--slug,
|
|
305
|
+
.#{$prefix}--select--slug.#{$prefix}--select--warning .#{$prefix}--slug {
|
|
306
|
+
inset-inline-end: $spacing-10;
|
|
307
|
+
}
|
|
308
|
+
|
|
281
309
|
// Windows HCM fix
|
|
282
310
|
// stylelint-disable-next-line no-duplicate-selectors
|
|
283
311
|
.#{$prefix}--select__arrow {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@use '../../config' as *;
|
|
2
2
|
@use '../../colors' as *;
|
|
3
3
|
@use '../../motion' as *;
|
|
4
|
+
@use '../../spacing' as *;
|
|
4
5
|
@use '../../theme' as *;
|
|
5
6
|
@use '../../type' as *;
|
|
6
7
|
@use '../../utilities/convert';
|
|
@@ -65,6 +66,10 @@ $sizes: (
|
|
|
65
66
|
display: flex;
|
|
66
67
|
}
|
|
67
68
|
|
|
69
|
+
.#{$prefix}--slug:has(> .#{$prefix}--popover--open) {
|
|
70
|
+
z-index: 2;
|
|
71
|
+
}
|
|
72
|
+
|
|
68
73
|
.#{$prefix}--slug .#{$prefix}--slug__button {
|
|
69
74
|
position: relative;
|
|
70
75
|
display: flex;
|
|
@@ -383,4 +388,18 @@ $sizes: (
|
|
|
383
388
|
order: 1;
|
|
384
389
|
border-end-end-radius: convert.to-rem(16px);
|
|
385
390
|
}
|
|
391
|
+
|
|
392
|
+
// Revert styles
|
|
393
|
+
.#{$prefix}--slug.#{$prefix}--slug--revert {
|
|
394
|
+
transform: translate($spacing-03, -50%);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.#{$prefix}--slug--revert .#{$prefix}--btn--icon-only {
|
|
398
|
+
align-items: center;
|
|
399
|
+
padding-block-start: 0;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.#{$prefix}--slug--revert .#{$prefix}--btn--icon-only svg {
|
|
403
|
+
margin: 0;
|
|
404
|
+
}
|
|
386
405
|
}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
@use '../../spacing' as *;
|
|
13
13
|
@use '../../theme' as *;
|
|
14
14
|
@use '../../type' as *;
|
|
15
|
+
@use '../../utilities/ai-gradient' as *;
|
|
15
16
|
@use '../../utilities/component-reset';
|
|
16
17
|
@use '../../utilities/convert';
|
|
17
18
|
@use '../../utilities/focus-outline' as *;
|
|
@@ -121,9 +122,39 @@
|
|
|
121
122
|
border-block-end-color: $border-subtle;
|
|
122
123
|
}
|
|
123
124
|
|
|
124
|
-
//
|
|
125
|
-
.#{$prefix}--text-
|
|
126
|
-
|
|
125
|
+
// Styles for `Slug` rendered inside `TextArea`
|
|
126
|
+
.#{$prefix}--text-area__wrapper--slug .#{$prefix}--slug {
|
|
127
|
+
position: absolute;
|
|
128
|
+
inset-block-start: $spacing-04;
|
|
129
|
+
inset-inline-end: $spacing-05;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.#{$prefix}--text-area__wrapper--slug
|
|
133
|
+
.#{$prefix}--slug.#{$prefix}--slug--revert {
|
|
134
|
+
inset-block-start: $spacing-02;
|
|
135
|
+
inset-inline-end: $spacing-03;
|
|
136
|
+
transform: translate(0);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.#{$prefix}--text-area__wrapper--slug .#{$prefix}--text-area {
|
|
140
|
+
@include ai-gradient;
|
|
141
|
+
|
|
142
|
+
padding-inline-end: $spacing-08;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.#{$prefix}--text-area--invalid:has(~ .#{$prefix}--slug),
|
|
146
|
+
.#{$prefix}--text-area--warn:has(~ .#{$prefix}--slug) {
|
|
147
|
+
padding-inline-end: $spacing-10;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.#{$prefix}--text-area--invalid ~ .#{$prefix}--slug,
|
|
151
|
+
.#{$prefix}--text-area--warn ~ .#{$prefix}--slug {
|
|
152
|
+
inset-inline-end: $spacing-08;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.#{$prefix}--text-area--invalid ~ .#{$prefix}--slug.#{$prefix}--slug--revert,
|
|
156
|
+
.#{$prefix}--text-area--warn ~ .#{$prefix}--slug.#{$prefix}--slug--revert {
|
|
157
|
+
inset-inline-end: $spacing-07;
|
|
127
158
|
}
|
|
128
159
|
|
|
129
160
|
// Skeleton State
|
|
@@ -131,7 +162,6 @@
|
|
|
131
162
|
@include skeleton;
|
|
132
163
|
|
|
133
164
|
block-size: convert.to-rem(100px);
|
|
134
|
-
|
|
135
165
|
inline-size: 100%;
|
|
136
166
|
|
|
137
167
|
&::placeholder {
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
@use '../../type' as *;
|
|
16
16
|
@use '../../spacing' as *;
|
|
17
17
|
@use '../../motion' as *;
|
|
18
|
+
@use '../../utilities/ai-gradient' as *;
|
|
18
19
|
@use '../../utilities/component-reset';
|
|
19
20
|
@use '../../utilities/placeholder-colors' as *;
|
|
20
21
|
@use '../../utilities/tooltip' as *;
|
|
@@ -414,6 +415,30 @@
|
|
|
414
415
|
border-block-end-color: $border-subtle;
|
|
415
416
|
}
|
|
416
417
|
|
|
418
|
+
// Styles for Slug rendered inside TextInput
|
|
419
|
+
.#{$prefix}--text-input__field-wrapper .#{$prefix}--slug {
|
|
420
|
+
position: absolute;
|
|
421
|
+
inset-block-start: 50%;
|
|
422
|
+
inset-inline-end: $spacing-05;
|
|
423
|
+
transform: translateY(-50%);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
.#{$prefix}--text-input__field-wrapper--slug .#{$prefix}--text-input {
|
|
427
|
+
@include ai-gradient;
|
|
428
|
+
|
|
429
|
+
padding-inline-end: $spacing-08;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
.#{$prefix}--text-input--invalid:has(~ .#{$prefix}--slug),
|
|
433
|
+
.#{$prefix}--text-input--warning:has(~ .#{$prefix}--slug) {
|
|
434
|
+
padding-inline-end: $spacing-10;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
.#{$prefix}--text-input--invalid ~ .#{$prefix}--slug,
|
|
438
|
+
.#{$prefix}--text-input--warning ~ .#{$prefix}--slug {
|
|
439
|
+
inset-inline-end: $spacing-08;
|
|
440
|
+
}
|
|
441
|
+
|
|
417
442
|
// Windows HCM fix
|
|
418
443
|
.#{$prefix}--btn.#{$prefix}--btn--icon-only.#{$prefix}--text-input--password__visibility__toggle.#{$prefix}--tooltip__trigger
|
|
419
444
|
svg,
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
/// @access public
|
|
13
13
|
/// @param {String} $direction - Direction of gradient from: `left`, `right`, `top`, and `bottom`
|
|
14
14
|
/// @param {Number} $width - Percentage width of gradient with regards to parent component
|
|
15
|
-
/// @example @include
|
|
15
|
+
/// @example @include ai-gradient('right', '33%');
|
|
16
16
|
/// @group utilities
|
|
17
17
|
|
|
18
|
-
@mixin ai-gradient($direction: 'right', $width:
|
|
18
|
+
@mixin ai-gradient($direction: 'right', $width: 33%) {
|
|
19
19
|
$deg: 0;
|
|
20
20
|
@if $direction == 'bottom' {
|
|
21
21
|
$deg: 0deg;
|