@carbon/styles 1.55.0-rc.0 → 1.55.1-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/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.55.0-rc.0",
4
+ "version": "1.55.1-rc.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": "600138750484cf814dc1b927ed4c277301b5290a"
71
+ "gitHead": "c6ef02eb0fa5b2dcaccbbe60d45f26884a167948"
72
72
  }
@@ -191,9 +191,10 @@
191
191
  }
192
192
 
193
193
  .#{$prefix}--list-box__wrapper--fluid.#{$prefix}--list-box__wrapper--fluid--invalid
194
+ .#{$prefix}--list-box[data-invalid]
194
195
  .#{$prefix}--list-box__invalid-icon,
195
196
  .#{$prefix}--list-box__wrapper--fluid
196
- .#{$prefix}--list-box--warning
197
+ .#{$prefix}--list-box.#{$prefix}--list-box--warning
197
198
  .#{$prefix}--list-box__invalid-icon {
198
199
  inset-block-start: convert.to-rem(81px);
199
200
  inset-inline-end: $spacing-05;
@@ -355,11 +356,21 @@
355
356
 
356
357
  .#{$prefix}--list-box__wrapper--fluid:has(.#{$prefix}--multi-select)
357
358
  .#{$prefix}--list-box__menu-icon {
358
- inset-inline-end: calc($spacing-04);
359
+ inset-inline-end: $spacing-04;
359
360
  }
360
361
 
361
362
  .#{$prefix}--list-box__wrapper--fluid:has(.#{$prefix}--dropdown)
362
363
  .#{$prefix}--list-box__menu-icon {
363
- inset-inline-end: calc($spacing-04);
364
+ inset-inline-end: $spacing-04;
365
+ }
366
+
367
+ // remove slug divider when element is invalid and fluid
368
+ .#{$prefix}--list-box__wrapper--fluid.#{$prefix}--list-box__wrapper--slug
369
+ .#{$prefix}--list-box--invalid[data-invalid]
370
+ .#{$prefix}--slug::before,
371
+ .#{$prefix}--list-box__wrapper--slug
372
+ .#{$prefix}--list-box--warning
373
+ .#{$prefix}--slug::before {
374
+ display: none;
364
375
  }
365
376
  }
@@ -153,9 +153,11 @@
153
153
 
154
154
  .#{$prefix}--select--fluid
155
155
  .#{$prefix}--select--invalid
156
+ .#{$prefix}--select-input__wrapper[data-invalid]
156
157
  .#{$prefix}--select__invalid-icon,
157
158
  .#{$prefix}--select--fluid
158
159
  .#{$prefix}--select--warning
160
+ .#{$prefix}--select-input__wrapper
159
161
  .#{$prefix}--select__invalid-icon {
160
162
  inset-block-start: convert.to-rem(73px);
161
163
  inset-inline-end: $spacing-05;
@@ -208,4 +210,11 @@
208
210
  .#{$prefix}--select-input {
209
211
  padding-inline-end: $spacing-10;
210
212
  }
213
+
214
+ // remove slug divider when element is invalid and fluid
215
+ .#{$prefix}--select--fluid
216
+ .#{$prefix}--select--slug:has(.#{$prefix}--select__invalid-icon)
217
+ .#{$prefix}--slug::before {
218
+ display: none;
219
+ }
211
220
  }
@@ -236,4 +236,11 @@
236
236
  ~ .#{$prefix}--slug {
237
237
  inset-inline-end: $spacing-05;
238
238
  }
239
+
240
+ // Remove ai border when invalid
241
+ .#{$prefix}--text-area--fluid
242
+ .#{$prefix}--text-area__wrapper--slug
243
+ .#{$prefix}--text-area--invalid {
244
+ border-block-end-color: transparent;
245
+ }
239
246
  }
@@ -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
+ }
@@ -277,14 +277,16 @@
277
277
 
278
278
  &.#{$prefix}--tabs--contained .#{$prefix}--tabs__nav-item {
279
279
  background-color: $layer-accent;
280
+ // Draws the border without affecting the inner-content
281
+ box-shadow: convert.to-rem(-1px) 0 0 0 $border-strong;
282
+ margin-inline-start: 0;
280
283
  }
281
284
 
282
285
  &.#{$prefix}--tabs--contained
283
- .#{$prefix}--tabs__nav-item
286
+ .#{$prefix}--tabs__nav-item--selected
287
+ + div
284
288
  + .#{$prefix}--tabs__nav-item {
285
- // Draws the border without affecting the inner-content
286
- box-shadow: convert.to-rem(-1px) 0 0 0 $border-strong;
287
- margin-inline-start: 0;
289
+ box-shadow: convert.to-rem(-1px) 0 0 0 transparent;
288
290
  }
289
291
 
290
292
  .#{$prefix}--tabs__nav-item .#{$prefix}--tabs__nav-link {
@@ -293,57 +295,104 @@
293
295
  outline $duration-fast-01 motion(standard, productive);
294
296
  }
295
297
 
298
+ &.#{$prefix}--tabs--dismissable .#{$prefix}--tabs__nav-link {
299
+ padding-inline-end: $spacing-08;
300
+ }
301
+
302
+ &.#{$prefix}--tabs--dismissable.#{$prefix}--tabs--contained
303
+ .#{$prefix}--tabs__nav-link {
304
+ padding-inline-end: calc($spacing-09 - 1px);
305
+ }
306
+
296
307
  //-----------------------------
297
308
  // Icon
298
309
  //-----------------------------
299
310
 
300
- &.#{$prefix}--tabs--contained
301
- .#{$prefix}--tabs__nav-item:not(.#{$prefix}--tabs__nav-item--disabled)
302
- .#{$prefix}--tabs__nav-item--icon
303
- .#{$prefix}--tabs__nav-item--close-icon {
304
- &:hover {
305
- background-color: inherit;
306
- }
311
+ .#{$prefix}--tabs__nav-item--close {
312
+ position: relative;
313
+ display: flex;
314
+ align-items: center;
315
+ inset-inline-start: calc(-#{$spacing-04} - 1px);
316
+ margin-inline-start: calc(-#{$spacing-06} + 1px);
317
+ }
318
+
319
+ &:not(.#{$prefix}--tabs--contained)
320
+ .#{$prefix}--tabs__nav-item--close--hidden {
321
+ @include visually-hidden;
322
+
323
+ position: static;
324
+ inline-size: convert.to-rem(3px);
325
+ }
326
+
327
+ &.#{$prefix}--tabs--contained.#{$prefix}--tabs--full-width
328
+ .#{$prefix}--tabs__nav-item--close--hidden {
329
+ display: none;
330
+ }
331
+
332
+ .#{$prefix}--tabs__nav-item--close-icon {
333
+ @include button-reset.reset();
334
+
335
+ block-size: convert.to-rem(24px);
336
+ inline-size: convert.to-rem(24px);
337
+ padding-block: $spacing-02;
338
+ padding-inline: $spacing-02;
339
+ pointer-events: auto;
307
340
 
308
341
  svg {
309
- padding: $spacing-02;
310
- margin: -$spacing-02;
311
- block-size: 24px;
312
- inline-size: 24px;
342
+ block-size: convert.to-rem(16px);
343
+ fill: $text-secondary;
344
+ inline-size: convert.to-rem(16px);
313
345
  }
314
346
 
315
347
  svg:hover {
316
- background-color: $layer-accent-hover;
348
+ fill: $text-primary;
349
+ }
350
+
351
+ &:hover {
352
+ background-color: $layer-hover;
353
+ }
354
+
355
+ &:focus,
356
+ &:active {
357
+ @include focus-outline('outline');
317
358
  }
318
359
  }
319
360
 
320
- &.#{$prefix}--tabs--contained
321
- .#{$prefix}--tabs__nav-item:not(
322
- .#{$prefix}--tabs__nav-item--disabled
323
- ).#{$prefix}--tabs__nav-item--selected
324
- .#{$prefix}--tabs__nav-item--icon
361
+ .#{$prefix}--tabs__nav-item:hover
362
+ + .#{$prefix}--tabs__nav-item--close
325
363
  .#{$prefix}--tabs__nav-item--close-icon
326
- svg:hover {
327
- background-color: $layer-hover;
364
+ svg {
365
+ fill: $text-primary;
328
366
  }
329
367
 
330
- .#{$prefix}--tabs__nav-item:not(.#{$prefix}--tabs__nav-item--disabled)
331
- .#{$prefix}--tabs__nav-item--icon
332
- .#{$prefix}--tabs__nav-item--close-icon:hover {
333
- background-color: $background-hover;
368
+ .#{$prefix}--tabs__nav-item--close-icon--selected {
369
+ svg {
370
+ fill: $text-primary;
371
+ }
372
+ }
373
+
374
+ .#{$prefix}--tabs__nav-item:hover
375
+ + .#{$prefix}--tabs__nav-item--close
376
+ .#{$prefix}--tabs__nav-item--close-icon--disabled,
377
+ .#{$prefix}--tabs__nav-item--close-icon--disabled,
378
+ .#{$prefix}--tabs__nav-item--close-icon--disabled:hover {
379
+ background-color: inherit;
380
+ cursor: not-allowed;
381
+
382
+ svg {
383
+ fill: $tab-text-disabled;
384
+ }
385
+
386
+ &:focus,
387
+ &:active {
388
+ @include focus-outline('reset');
389
+ }
334
390
  }
335
391
 
336
392
  .#{$prefix}--tabs__nav-item--icon {
337
393
  display: flex;
338
394
  align-items: center;
339
395
  padding-inline-start: $spacing-03;
340
-
341
- .#{$prefix}--tabs__nav-item--close-icon {
342
- padding: $spacing-02;
343
- margin: -$spacing-02;
344
- line-height: 0;
345
- pointer-events: auto;
346
- }
347
396
  }
348
397
 
349
398
  .#{$prefix}--tabs__nav-item--icon-left {
@@ -258,12 +258,13 @@
258
258
  outline-offset: -1px;
259
259
  }
260
260
 
261
- .#{$prefix}--tag--disabled,
261
+ .#{$prefix}--tag--disabled:not(.#{$prefix}--tag--operational),
262
262
  .#{$prefix}--tag--filter.#{$prefix}--tag--disabled,
263
263
  .#{$prefix}--tag--interactive.#{$prefix}--tag--disabled {
264
264
  @include tag-theme($layer, $text-disabled);
265
265
 
266
266
  box-shadow: none;
267
+ outline: none;
267
268
 
268
269
  &:hover {
269
270
  cursor: not-allowed;
@@ -85,6 +85,8 @@ $-icon-container-size: calc(#{layout.density('padding-inline')} * 2 + 1rem);
85
85
 
86
86
  &:focus {
87
87
  @include focus-outline('outline');
88
+
89
+ text-decoration: none;
88
90
  }
89
91
 
90
92
  &:hover,
@@ -398,7 +400,7 @@ $-icon-container-size: calc(#{layout.density('padding-inline')} * 2 + 1rem);
398
400
 
399
401
  border: 1px solid transparent;
400
402
  box-shadow: inset 0 -80px 70px -65px $ai-inner-shadow,
401
- 0 24px 40px -24px $ai-drop-shadow;
403
+ 0 4px 8px 0 $ai-drop-shadow;
402
404
  }
403
405
 
404
406
  .#{$prefix}--tile--slug.#{$prefix}--tile--expandable:hover {
@@ -423,7 +425,8 @@ $-icon-container-size: calc(#{layout.density('padding-inline')} * 2 + 1rem);
423
425
  .#{$prefix}--tile--slug.#{$prefix}--tile--clickable::before {
424
426
  @include ai-popover-gradient('hover', 0, 'layer');
425
427
 
426
- box-shadow: inset 0 -80px 70px -65px $ai-inner-shadow;
428
+ box-shadow: inset 0 -80px 70px -65px $ai-inner-shadow,
429
+ 0 4px 10px 2px $ai-drop-shadow;
427
430
  }
428
431
 
429
432
  .#{$prefix}--tile--slug.#{$prefix}--tile--selectable:hover::before,
@@ -431,10 +434,16 @@ $-icon-container-size: calc(#{layout.density('padding-inline')} * 2 + 1rem);
431
434
  opacity: 1;
432
435
  }
433
436
 
437
+ .#{$prefix}--tile--slug.#{$prefix}--tile--selectable:focus,
438
+ .#{$prefix}--tile--slug.#{$prefix}--tile--clickable:focus {
439
+ outline-offset: -1px;
440
+ }
441
+
434
442
  .#{$prefix}--tile--slug.#{$prefix}--tile--selectable::after {
435
443
  @include ai-popover-gradient('selected', 0, 'layer');
436
444
 
437
- box-shadow: inset 0 -80px 70px -65px $ai-inner-shadow;
445
+ box-shadow: inset 0 -80px 70px -65px $ai-inner-shadow,
446
+ 0 4px 8px 0 $ai-drop-shadow;
438
447
  }
439
448
 
440
449
  .#{$prefix}--tile--slug.#{$prefix}--tile--selectable:hover::after {
@@ -115,6 +115,7 @@
115
115
  background: linear-gradient(
116
116
  to top,
117
117
  theme.$ai-aura-start $start,
118
+ 15%,
118
119
  theme.$ai-aura-end 50%
119
120
  )
120
121
  padding-box,
@@ -129,6 +130,7 @@
129
130
  to top,
130
131
  $background $start,
131
132
  theme.$ai-aura-start $start,
133
+ 15%,
132
134
  theme.$ai-aura-end 50%
133
135
  )
134
136
  padding-box,