@carbon/styles 1.54.0 → 1.55.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/styles",
3
3
  "description": "Styles for the Carbon Design System",
4
- "version": "1.54.0",
4
+ "version": "1.55.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -68,5 +68,5 @@
68
68
  "scss/**/*.css",
69
69
  "css/**/*.css"
70
70
  ],
71
- "gitHead": "4bdd6802dd612af764ef76162141333d35bd84f4"
71
+ "gitHead": "0163f7e7932f667a892bc75f0aa35464f726f4ec"
72
72
  }
@@ -8,6 +8,7 @@
8
8
  @use '../list-box';
9
9
  @use '../../config' as *;
10
10
  @use '../../theme' as *;
11
+ @use '../../utilities/convert';
11
12
  @use '../../utilities/focus-outline' as *;
12
13
 
13
14
  /// Combo box styles
@@ -36,6 +37,12 @@
36
37
  @include focus-outline('outline');
37
38
  }
38
39
 
40
+ .#{$prefix}--list-box--expanded
41
+ .#{$prefix}--combo-box--input--focus.#{$prefix}--text-input {
42
+ outline-offset: convert.to-rem(-1px);
43
+ outline-width: convert.to-rem(1px);
44
+ }
45
+
39
46
  .#{$prefix}--combo-box .#{$prefix}--list-box__field,
40
47
  .#{$prefix}--combo-box.#{$prefix}--list-box[data-invalid]
41
48
  .#{$prefix}--list-box__field,
@@ -1003,7 +1003,7 @@
1003
1003
  .#{$prefix}--data-table tbody tr.#{$prefix}--data-table--slug-row:hover,
1004
1004
  tr.#{$prefix}--data-table--slug-row:hover
1005
1005
  + .#{$prefix}--expandable-row[data-child-row],
1006
- tr.#{$prefix}--expandable-row--hover
1006
+ tr.#{$prefix}--data-table--slug-row.#{$prefix}--expandable-row--hover
1007
1007
  + .#{$prefix}--expandable-row[data-child-row]:hover,
1008
1008
  tr.#{$prefix}--expandable-row--hover.#{$prefix}--data-table--slug-row,
1009
1009
  tr.#{$prefix}--data-table--selected.#{$prefix}--parent-row.#{$prefix}--expandable-row--hover.#{$prefix}--data-table--slug-row {
@@ -93,6 +93,10 @@
93
93
  border-block-end-color: $border-subtle;
94
94
  }
95
95
 
96
+ .#{$prefix}--dropdown--open .cds--list-box__field {
97
+ outline: none;
98
+ }
99
+
96
100
  .#{$prefix}--dropdown--invalid {
97
101
  @include focus-outline('invalid');
98
102
 
@@ -69,4 +69,11 @@
69
69
  + .#{$prefix}--list-box__invalid-icon {
70
70
  inset-inline-end: 1rem;
71
71
  }
72
+
73
+ .#{$prefix}--list-box__wrapper--fluid
74
+ :not(.#{$prefix}--list-box--up)
75
+ .#{$prefix}--combo-box
76
+ .#{$prefix}--list-box__menu {
77
+ inset-block-start: calc(100% + convert.to-rem(1px));
78
+ }
72
79
  }
@@ -114,15 +114,20 @@
114
114
  outline-offset: 0;
115
115
  }
116
116
 
117
+ .#{$prefix}--list-box__wrapper--fluid.#{$prefix}--list-box__wrapper--fluid--focus:has(
118
+ .#{$prefix}--list-box--expanded
119
+ ) {
120
+ outline-width: convert.to-rem(1px);
121
+ }
122
+
117
123
  .#{$prefix}--list-box__wrapper--fluid .#{$prefix}--list-box__field:focus {
118
124
  outline: none;
119
125
  outline-offset: 0;
120
126
  }
121
127
 
122
- .#{$prefix}--list-box__wrapper--fluid
123
- :not(.#{$prefix}--list-box--up)
128
+ .#{$prefix}--list-box__wrapper--fluid:not(.#{$prefix}--list-box--up)
124
129
  .#{$prefix}--list-box__menu {
125
- inset-block-start: calc(100% + convert.to-rem(1px));
130
+ inset-block-start: calc(100%);
126
131
  }
127
132
 
128
133
  // Invalid / Warning styles
@@ -235,8 +240,7 @@
235
240
  }
236
241
 
237
242
  // direction - top
238
- .#{$prefix}--list-box__wrapper--fluid
239
- .#{$prefix}--list-box--up
243
+ .#{$prefix}--list-box__wrapper--fluid.#{$prefix}--list-box--up
240
244
  .#{$prefix}--list-box__menu {
241
245
  inset-block-end: $spacing-10;
242
246
  }
@@ -12,6 +12,7 @@
12
12
  @use '../../motion' as *;
13
13
  @use '../../spacing' as *;
14
14
  @use '../../theme' as *;
15
+ @use '../../utilities/convert';
15
16
  @use '../../utilities/focus-outline' as *;
16
17
  @use '../multiselect';
17
18
  @use '../fluid-list-box';
@@ -49,4 +50,11 @@
49
50
  .#{$prefix}--list-box__field {
50
51
  align-items: baseline;
51
52
  }
53
+
54
+ .#{$prefix}--list-box__wrapper--fluid.#{$prefix}--multi-select--filterable__wrapper:not(
55
+ .#{$prefix}--list-box--up
56
+ )
57
+ .#{$prefix}--list-box__menu {
58
+ inset-block-start: calc(100% + convert.to-rem(1px));
59
+ }
52
60
  }
@@ -473,12 +473,6 @@
473
473
  0 24px 40px -24px $ai-drop-shadow;
474
474
  }
475
475
 
476
- .#{$prefix}--modal--slug .#{$prefix}--slug {
477
- position: absolute;
478
- inset-block-start: 0;
479
- inset-inline-end: 0;
480
- }
481
-
482
476
  .#{$prefix}--modal--slug
483
477
  .#{$prefix}--modal-content.#{$prefix}--modal-scroll-content {
484
478
  mask-image: linear-gradient(
@@ -500,6 +494,8 @@
500
494
  .#{$prefix}--modal--slug
501
495
  .#{$prefix}--modal-container-body
502
496
  > .#{$prefix}--slug {
497
+ position: absolute;
498
+ inset-block-start: convert.to-rem(10px);
503
499
  inset-inline-end: convert.to-rem(48px);
504
500
  }
505
501
 
@@ -93,6 +93,17 @@
93
93
  @include focus-outline('outline');
94
94
  }
95
95
 
96
+ .#{$prefix}--multi-select.#{$prefix}--list-box--expanded
97
+ .#{$prefix}--list-box__field--wrapper:has(
98
+ button[aria-activedescendant]:not([aria-activedescendant=''])
99
+ ),
100
+ .#{$prefix}--multi-select--filterable.#{$prefix}--list-box--expanded:has(
101
+ input[aria-activedescendant]:not([aria-activedescendant=''])
102
+ ) {
103
+ outline-offset: convert.to-rem(-1px);
104
+ outline-width: convert.to-rem(1px);
105
+ }
106
+
96
107
  .#{$prefix}--multi-select--filterable.#{$prefix}--multi-select--selected
97
108
  .#{$prefix}--text-input,
98
109
  .#{$prefix}--multi-select.#{$prefix}--multi-select--selected
@@ -59,7 +59,7 @@
59
59
  font-weight: 400;
60
60
  inline-size: 100%;
61
61
  min-inline-size: 9.375rem;
62
- padding-inline-end: convert.to-rem(96px);
62
+ padding-inline-end: $spacing-12;
63
63
  padding-inline-start: $spacing-05;
64
64
  transition: background-color $duration-fast-01 motion(standard, productive),
65
65
  outline $duration-fast-01 motion(standard, productive);
@@ -157,7 +157,6 @@
157
157
  align-items: center;
158
158
  justify-content: center;
159
159
  block-size: 100%;
160
- border-block-end: convert.to-rem(1px) solid $border-strong;
161
160
  color: $icon-primary;
162
161
 
163
162
  svg {
@@ -174,6 +173,7 @@
174
173
 
175
174
  &:hover {
176
175
  background-color: $field-hover;
176
+ box-shadow: 0 -1px 0 $border-strong inset;
177
177
  color: $icon-primary;
178
178
  cursor: pointer;
179
179
  }
@@ -206,15 +206,18 @@
206
206
  input[type='number']:focus
207
207
  ~ .#{$prefix}--number__controls
208
208
  .#{$prefix}--number__control-btn {
209
- border-block-end-color: $focus;
210
- box-shadow: inset 0 2px $focus, inset 0 -1px $focus;
209
+ border-width: 2px 0;
210
+ border-style: solid;
211
+ border-color: $focus;
212
+ box-shadow: none;
213
+ outline-offset: -2px;
211
214
  }
212
215
 
213
216
  .#{$prefix}--number
214
217
  input[type='number']:focus
215
218
  ~ .#{$prefix}--number__controls
216
- .#{$prefix}--number__control-btn:last-of-type {
217
- box-shadow: inset 0 2px $focus, inset 0 -1px $focus, inset -2px 0 $focus;
219
+ .#{$prefix}--number__control-btn:last-of-type:hover {
220
+ box-shadow: -4px 0 0 -2px $focus inset;
218
221
  }
219
222
 
220
223
  // add invalid box-shadow to number controls only when invalid input is not focused
@@ -222,15 +225,18 @@
222
225
  input[type='number'][data-invalid]:not(:focus)
223
226
  ~ .#{$prefix}--number__controls
224
227
  .#{$prefix}--number__control-btn:last-of-type:hover {
225
- box-shadow: inset 0 2px $support-error, inset 0 -1px $support-error,
226
- inset -2px 0 $support-error;
228
+ box-shadow: -4px 0 0 -2px $support-error inset;
227
229
  }
228
230
 
229
231
  .#{$prefix}--number
230
232
  input[type='number'][data-invalid]:not(:focus)
231
233
  ~ .#{$prefix}--number__controls
232
234
  .#{$prefix}--number__control-btn:hover {
233
- box-shadow: inset 0 2px $support-error, inset 0 -1px $support-error;
235
+ border-width: 2px 0;
236
+ border-style: solid;
237
+ border-color: $support-error;
238
+ box-shadow: none;
239
+ outline-offset: -2px;
234
240
  }
235
241
 
236
242
  .#{$prefix}--number
@@ -295,7 +301,7 @@
295
301
  .#{$prefix}--number__invalid {
296
302
  position: absolute;
297
303
  fill: $support-error;
298
- inset-inline-end: convert.to-rem(96px);
304
+ inset-inline-end: $spacing-12;
299
305
  }
300
306
 
301
307
  .#{$prefix}--number--lg .#{$prefix}--number__invalid {
@@ -314,7 +320,7 @@
314
320
  .#{$prefix}--number--lg
315
321
  .#{$prefix}--number__invalid
316
322
  + .#{$prefix}--number__rule-divider {
317
- inset-inline-end: convert.to-rem(96px);
323
+ inset-inline-end: $spacing-12;
318
324
  }
319
325
 
320
326
  .#{$prefix}--number--sm
@@ -349,7 +355,7 @@
349
355
  }
350
356
 
351
357
  .#{$prefix}--number--lg .#{$prefix}--number__controls {
352
- inline-size: convert.to-rem(96px);
358
+ inline-size: $spacing-12;
353
359
  }
354
360
 
355
361
  .#{$prefix}--number--lg .#{$prefix}--number__control-btn {
@@ -424,18 +430,60 @@
424
430
  .#{$prefix}--number__input-wrapper--slug .#{$prefix}--slug {
425
431
  position: absolute;
426
432
  inset-block-start: 50%;
427
- inset-inline-end: convert.to-rem(88px);
433
+ inset-inline-end: $spacing-12;
428
434
  transform: translateY(-50%);
429
435
  }
430
436
 
437
+ .#{$prefix}--number__input-wrapper--slug .#{$prefix}--slug::before,
438
+ .#{$prefix}--number__input-wrapper--slug
439
+ .#{$prefix}--number__control-btn::before,
431
440
  .#{$prefix}--number__input-wrapper--slug
432
- input[data-invalid]
433
- ~ .#{$prefix}--slug,
434
- .#{$prefix}--number__input-wrapper--slug.#{$prefix}--number__input-wrapper--warning
435
- .#{$prefix}--slug {
436
- inset-inline-end: convert.to-rem(120px);
441
+ .#{$prefix}--number__control-btn::after {
442
+ position: absolute;
443
+ background-color: $border-subtle;
444
+ block-size: convert.to-rem(16px);
445
+ content: '';
446
+ inline-size: convert.to-rem(1px);
447
+ }
448
+ .#{$prefix}--number__input-wrapper--slug .#{$prefix}--slug::before {
449
+ display: none;
450
+ inset-inline-start: convert.to-rem(-16px);
451
+ }
452
+ .#{$prefix}--number__control-btn::after {
453
+ display: block;
454
+ inset-inline-end: 0;
455
+ }
456
+
457
+ .#{$prefix}--number__input-wrapper--slug
458
+ .#{$prefix}--number__control-btn::before {
459
+ display: block;
460
+ inset-inline-end: $spacing-08;
461
+ }
462
+ .#{$prefix}--number__input-wrapper--slug
463
+ .#{$prefix}--number__control-btn:focus::before {
464
+ display: none;
465
+ }
466
+ .#{$prefix}--number__control-btn:hover::after,
467
+ .#{$prefix}--number__control-btn:hover::before {
468
+ display: none;
469
+ inset-inline-end: 0;
470
+ }
471
+ .#{$prefix}--number__input-wrapper:has(.#{$prefix}--number__control-btn:hover)
472
+ ~ .#{$prefix}--number__input-wrapper--slug::after {
473
+ display: none;
474
+ }
475
+ .#{$prefix}--number__control-btn:has(.up-icon)::after,
476
+ .#{$prefix}--number__control-btn:has(.up-icon)::before {
477
+ display: none;
437
478
  }
438
479
 
480
+ .#{$prefix}--number__input-wrapper--slug .#{$prefix}--number__invalid {
481
+ inset-inline-end: $spacing-13 - $spacing-05;
482
+ }
483
+ .#{$prefix}--number__input-wrapper--slug:has(.#{$prefix}--number__invalid)
484
+ .#{$prefix}--slug::before {
485
+ display: block;
486
+ }
439
487
  .#{$prefix}--number
440
488
  .#{$prefix}--number__input-wrapper--slug
441
489
  input[data-invalid],
@@ -450,18 +498,8 @@
450
498
  .#{$prefix}--number__input-wrapper--slug input[type='number']:disabled {
451
499
  @include ai-gradient;
452
500
 
453
- padding-inline-end: convert.to-rem(112px);
454
- }
455
-
456
- .#{$prefix}--number__input-wrapper--slug
457
- input[type='number']:not([data-invalid]):not(
458
- :has(~ .#{$prefix}--slug--revert)
459
- )
460
- ~ .#{$prefix}--number__controls
461
- .#{$prefix}--number__control-btn {
462
- border-block-end-color: $ai-border-strong;
501
+ padding-inline-end: convert.to-rem(145px);
463
502
  }
464
-
465
503
  // Skeleton State
466
504
  .#{$prefix}--number.#{$prefix}--skeleton {
467
505
  @include skeleton;
@@ -473,7 +511,6 @@
473
511
  display: none;
474
512
  }
475
513
  }
476
-
477
514
  // Windows HCM fix
478
515
  /* stylelint-disable */
479
516
  .#{$prefix}--number__control-btn:hover,
@@ -490,3 +527,20 @@
490
527
  }
491
528
  /* stylelint-enable */
492
529
  }
530
+ .#{$prefix}--number__controls:hover .#{$prefix}--number__control-btn::after {
531
+ display: none;
532
+ }
533
+
534
+ .#{$prefix}--number__input-wrapper--slug .#{$prefix}--number__rule-divider {
535
+ display: none;
536
+ }
537
+
538
+ .#{$prefix}--number__input-wrapper--slug
539
+ .#{$prefix}--number__control-btn:hover {
540
+ box-shadow: 0 -1px 0 $ai-border-strong inset;
541
+ }
542
+ //hide dividers on button focus
543
+ .#{$prefix}--number__controls:focus-within
544
+ .#{$prefix}--number__control-btn::after {
545
+ display: none;
546
+ }
@@ -281,13 +281,36 @@
281
281
  }
282
282
 
283
283
  // Slug styles
284
+
285
+ $divider-width: 1px;
286
+
284
287
  .#{$prefix}--select--slug .#{$prefix}--slug {
285
288
  position: absolute;
286
289
  inset-block-start: 50%;
287
- inset-inline-end: $spacing-08;
290
+ inset-inline-end: calc($spacing-08 + 8px + $divider-width);
291
+ margin-block-start: convert.to-rem(0.5px);
288
292
  transform: translateY(-50%);
289
293
  }
290
294
 
295
+ .#{$prefix}--select--slug .#{$prefix}--slug::after,
296
+ .#{$prefix}--select--slug .#{$prefix}--slug::before {
297
+ position: absolute;
298
+ background-color: $border-subtle-01;
299
+ block-size: convert.to-rem(16px);
300
+ content: '';
301
+ inline-size: convert.to-rem(1px);
302
+ }
303
+
304
+ .#{$prefix}--select--slug .#{$prefix}--slug::before {
305
+ display: none;
306
+ inset-inline-start: calc(-#{$spacing-03} - #{$divider-width});
307
+ }
308
+
309
+ .#{$prefix}--select--slug .#{$prefix}--slug::after {
310
+ display: block;
311
+ inset-inline-end: calc(-#{$spacing-03} - #{$divider-width});
312
+ }
313
+
291
314
  .#{$prefix}--select--slug
292
315
  .#{$prefix}--select-input:not(:has(~ .#{$prefix}--slug--revert)) {
293
316
  @include ai-gradient;
@@ -295,16 +318,25 @@
295
318
  padding-inline-end: $spacing-10;
296
319
  }
297
320
 
298
- .#{$prefix}--select--slug.#{$prefix}--select--invalid
299
- .#{$prefix}--select-input,
300
- .#{$prefix}--select--slug.#{$prefix}--select--warning
301
- .#{$prefix}--select-input {
321
+ .#{$prefix}--select--slug:has(.#{$prefix}--select__invalid-icon)
322
+ .#{$prefix}--select-input:not(:has(~ .#{$prefix}--slug--revert)) {
302
323
  padding-inline-end: $spacing-12;
303
324
  }
304
325
 
305
- .#{$prefix}--select--slug.#{$prefix}--select--invalid .#{$prefix}--slug,
306
- .#{$prefix}--select--slug.#{$prefix}--select--warning .#{$prefix}--slug {
307
- inset-inline-end: $spacing-10;
326
+ .#{$prefix}--select--slug:has(.#{$prefix}--select__invalid-icon)
327
+ .#{$prefix}--slug::before {
328
+ display: block;
329
+ }
330
+
331
+ .#{$prefix}--select--slug
332
+ .#{$prefix}--select-input__wrapper[data-invalid]
333
+ .#{$prefix}--select-input
334
+ ~ .#{$prefix}--select__invalid-icon,
335
+ .#{$prefix}--select--slug
336
+ .#{$prefix}--select-input__wrapper
337
+ .#{$prefix}--select-input
338
+ ~ .#{$prefix}--select__invalid-icon {
339
+ inset-inline-end: $spacing-11;
308
340
  }
309
341
 
310
342
  // Windows HCM fix