@carbon/styles 1.58.0-rc.0 → 1.59.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/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.58.0-rc.0",
4
+ "version": "1.59.0-rc.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -45,7 +45,7 @@
45
45
  "@carbon/grid": "^11.23.0",
46
46
  "@carbon/layout": "^11.22.0",
47
47
  "@carbon/motion": "^11.18.0",
48
- "@carbon/themes": "^11.35.0",
48
+ "@carbon/themes": "^11.36.0",
49
49
  "@carbon/type": "^11.27.0",
50
50
  "@ibm/plex": "6.0.0-next.6",
51
51
  "@ibm/telemetry-js": "^1.5.0"
@@ -68,5 +68,5 @@
68
68
  "scss/**/*.css",
69
69
  "css/**/*.css"
70
70
  ],
71
- "gitHead": "23f19271f964a10a9fbc4616a43b05f5cc14e7d1"
71
+ "gitHead": "6269fa19f0ce2930b21a2fda05974a597126ec6b"
72
72
  }
@@ -105,6 +105,7 @@ describe('@carbon/styles/scss/theme', () => {
105
105
  "link-primary",
106
106
  "link-primary-hover",
107
107
  "link-secondary",
108
+ "link-inverse-visited",
108
109
  "link-visited",
109
110
  "link-inverse",
110
111
  "link-inverse-active",
@@ -59,12 +59,27 @@ $content-padding: 0 0 0 $spacing-05 !default;
59
59
  display: list-item;
60
60
  overflow: visible;
61
61
  border-block-start: 1px solid $border-subtle;
62
+ transition: border-color motion(standard, productive) $duration-fast-02;
62
63
 
63
64
  &:last-child {
64
65
  border-block-end: 1px solid $border-subtle;
65
66
  }
66
67
  }
67
68
 
69
+ .#{$prefix}--accordion__item:not(.#{$prefix}--accordion__item--active) {
70
+ // Blend border on hover
71
+ &:hover,
72
+ // Blend top border of the next component on hover
73
+ &:hover + .#{$prefix}--accordion__item {
74
+ border-block-start-color: $layer-hover;
75
+ }
76
+
77
+ // Blend bottom border of last item on hover
78
+ &:last-child:hover {
79
+ border-block-end-color: $layer-hover;
80
+ }
81
+ }
82
+
68
83
  .#{$prefix}--accordion__heading {
69
84
  @include button-reset.reset;
70
85
 
@@ -83,11 +98,15 @@ $content-padding: 0 0 0 $spacing-05 !default;
83
98
 
84
99
  &:hover {
85
100
  background-color: $layer-hover;
101
+ outline: none;
86
102
  }
87
103
 
88
104
  &:focus {
89
- box-shadow: /* Border top */ 0 -1px 0 0 $focus, inset 0 1px 0 0 $focus,
90
- /* Border right */ inset 2px 0 0 0 $focus,
105
+ position: relative;
106
+ z-index: 2;
107
+ box-shadow:
108
+ /* Border top */ 0 -1px 0 0 $focus,
109
+ inset 0 1px 0 0 $focus, /* Border right */ inset 2px 0 0 0 $focus,
91
110
  /* Border bottom */ 0 1px 0 0 $focus, inset 0 -1px 0 0 $focus,
92
111
  /* Border left */ inset -2px 0 0 0 $focus;
93
112
  outline: none;
@@ -213,6 +232,79 @@ $content-padding: 0 0 0 $spacing-05 !default;
213
232
  }
214
233
  }
215
234
 
235
+ // flush
236
+ .#{$prefix}--accordion--flush .#{$prefix}--accordion__item {
237
+ position: relative;
238
+ border-color: transparent;
239
+
240
+ &:last-child,
241
+ &:hover,
242
+ &:last-child:hover,
243
+ &:hover + .#{$prefix}--accordion__item {
244
+ border-color: transparent;
245
+ }
246
+
247
+ &::before,
248
+ &::after {
249
+ position: absolute;
250
+ display: block;
251
+ block-size: 1px;
252
+ content: '';
253
+ inline-size: calc(100% - $spacing-05 - $spacing-05);
254
+ margin-inline-start: $spacing-05;
255
+ transition: background motion(standard, productive) $duration-fast-02;
256
+
257
+ @media screen and (prefers-reduced-motion: reduce) {
258
+ transition: none;
259
+ }
260
+ }
261
+
262
+ &::before {
263
+ background: $border-subtle;
264
+ inset-block-start: -1px;
265
+ }
266
+
267
+ &:last-child::after {
268
+ background: $border-subtle;
269
+ inset-block-end: -1px;
270
+ }
271
+ }
272
+
273
+ .#{$prefix}--accordion--flush .#{$prefix}--accordion__heading:hover {
274
+ position: relative;
275
+ z-index: 1;
276
+
277
+ // blend top/bottom border into heading hover state
278
+ &::before,
279
+ &::after {
280
+ position: absolute;
281
+ display: block;
282
+ background: $layer-hover;
283
+ block-size: 1px;
284
+ content: '';
285
+ inline-size: 100%;
286
+ inset-inline-start: 0;
287
+ transition: background motion(standard, productive) $duration-fast-02;
288
+
289
+ @media screen and (prefers-reduced-motion: reduce) {
290
+ transition: none;
291
+ }
292
+ }
293
+
294
+ &::before {
295
+ inset-block-start: -1px;
296
+ }
297
+
298
+ &::after {
299
+ inset-block-end: -1px;
300
+ }
301
+
302
+ &:focus::after,
303
+ &:focus::before {
304
+ background: none;
305
+ }
306
+ }
307
+
216
308
  // Skeleton state
217
309
  .#{$prefix}--accordion.#{$prefix}--skeleton .#{$prefix}--accordion__heading,
218
310
  .#{$prefix}--accordion.#{$prefix}--skeleton .#{$prefix}--accordion__button {
@@ -234,7 +326,9 @@ $content-padding: 0 0 0 $spacing-05 !default;
234
326
  }
235
327
 
236
328
  .#{$prefix}--accordion.#{$prefix}--skeleton
237
- .#{$prefix}--accordion__heading:hover::before {
329
+ .#{$prefix}--accordion__heading:hover::before,
330
+ .#{$prefix}--accordion.#{$prefix}--skeleton
331
+ .#{$prefix}--accordion__heading:hover {
238
332
  background-color: transparent;
239
333
  }
240
334
 
@@ -255,6 +349,10 @@ $content-padding: 0 0 0 $spacing-05 !default;
255
349
  margin-block-end: 0;
256
350
  }
257
351
 
352
+ .#{$prefix}--accordion.#{$prefix}--skeleton .#{$prefix}--accordion__title {
353
+ margin-inline-start: $spacing-05;
354
+ }
355
+
258
356
  // Windows HCM fix
259
357
  .#{$prefix}--accordion__arrow,
260
358
  .#{$prefix}--accordion__item--active .#{$prefix}--accordion__arrow {
@@ -284,24 +382,3 @@ $content-padding: 0 0 0 $spacing-05 !default;
284
382
  opacity: 0;
285
383
  visibility: hidden;
286
384
  }
287
-
288
- // flush
289
- .#{$prefix}--accordion--flush .#{$prefix}--accordion__title {
290
- margin-inline-start: 0;
291
- }
292
-
293
- .#{$prefix}--accordion--flush .#{$prefix}--accordion__arrow {
294
- margin-inline-end: 0;
295
- }
296
-
297
- .#{$prefix}--accordion--flush .#{$prefix}--accordion__content {
298
- padding-inline-start: 0;
299
- }
300
-
301
- .#{$prefix}--accordion--flush:not(.#{$prefix}--skeleton)
302
- .#{$prefix}--accordion__heading:hover::before,
303
- .#{$prefix}--accordion--flush:not(.#{$prefix}--skeleton)
304
- .#{$prefix}--accordion__heading:focus::before {
305
- inline-size: calc(100% + 32px);
306
- inset-inline-start: -1rem;
307
- }
@@ -385,4 +385,29 @@
385
385
  line-height: inherit;
386
386
  margin-block-start: convert.to-rem(-1px);
387
387
  }
388
+
389
+ // horizontal checkbox group
390
+ .#{$prefix}--checkbox-group--horizontal {
391
+ position: relative;
392
+ display: flex;
393
+ flex-flow: row wrap;
394
+ justify-content: flex-start;
395
+
396
+ .#{$prefix}--form-item {
397
+ flex: none;
398
+ margin-block-end: 0;
399
+
400
+ &:not(:last-of-type) {
401
+ margin-inline-end: $spacing-05;
402
+ }
403
+ }
404
+
405
+ .#{$prefix}--checkbox-label-text {
406
+ padding-inline-start: $spacing-03;
407
+ }
408
+
409
+ .#{$prefix}--label + .#{$prefix}--form-item.#{$prefix}--checkbox-wrapper {
410
+ margin-block-start: 0;
411
+ }
412
+ }
388
413
  }
@@ -153,6 +153,24 @@
153
153
  inset-inline-end: $spacing-05;
154
154
  }
155
155
 
156
+ .#{$prefix}--text-input--fluid .#{$prefix}--toggle-password-tooltip {
157
+ @include focus-outline('reset');
158
+
159
+ position: absolute;
160
+ block-size: convert.to-rem(64px);
161
+ cursor: pointer;
162
+ inline-size: convert.to-rem(48px);
163
+ inset-block-start: 0;
164
+ inset-inline-end: 0;
165
+ transition: outline $duration-fast-01 motion(standard, productive);
166
+ }
167
+
168
+ .#{$prefix}--text-input--fluid
169
+ .#{$prefix}--toggle-password-tooltip
170
+ .#{$prefix}--popover {
171
+ inset-inline-start: 0;
172
+ }
173
+
156
174
  .#{$prefix}--text-input--fluid
157
175
  .#{$prefix}--btn.#{$prefix}--text-input--password__visibility__toggle.#{$prefix}--tooltip__trigger {
158
176
  block-size: convert.to-rem(32px);
@@ -77,19 +77,11 @@
77
77
  &:focus {
78
78
  @include focus-outline('outline');
79
79
  }
80
-
81
- svg {
82
- color: $icon-secondary;
83
- }
84
80
  }
85
81
 
86
82
  .#{$prefix}--menu-item:hover {
87
83
  background-color: $layer-hover;
88
84
  color: $text-primary;
89
-
90
- svg {
91
- color: $icon-primary;
92
- }
93
85
  }
94
86
 
95
87
  $supported-sizes: (
@@ -48,7 +48,7 @@
48
48
  margin: $spacing-02;
49
49
  cursor: default;
50
50
  // restricts size of contained elements
51
- max-inline-size: 100%;
51
+ max-inline-size: convert.to-rem(208px);
52
52
  min-block-size: layout.size('height');
53
53
  // ensures tag stays pill shaped;
54
54
  min-inline-size: convert.to-rem(32px);
@@ -72,30 +72,31 @@
72
72
  padding-inline-start: $spacing-03;
73
73
  }
74
74
 
75
+ &:not(.#{$prefix}--tag--selectable) {
76
+ border: 0;
77
+ }
78
+
75
79
  &:not(:first-child) {
76
80
  margin-inline-start: 0;
77
81
  }
78
82
  }
79
83
 
84
+ .#{$prefix}--tag--operational > span,
85
+ .#{$prefix}--tag--selectable > span,
80
86
  .#{$prefix}--tag__label {
87
+ display: block;
81
88
  overflow: hidden;
82
- max-inline-size: 100%;
83
89
  text-overflow: ellipsis;
84
90
  white-space: nowrap;
85
91
  }
86
92
 
87
93
  .#{$prefix}--tag--interactive:focus {
88
- box-shadow: inset 0 0 0 1px $focus;
89
- outline: none;
90
- }
91
-
92
- .#{$prefix}--tag--interactive:hover {
93
- cursor: pointer;
94
+ outline: 2px solid $focus;
95
+ outline-offset: 1px;
94
96
  }
95
97
 
96
98
  // tags used for filtering
97
99
  .#{$prefix}--tag--filter {
98
- cursor: pointer;
99
100
  padding-block-end: 0;
100
101
  padding-block-start: 0;
101
102
  padding-inline-end: 0;
@@ -105,11 +106,6 @@
105
106
  }
106
107
  }
107
108
 
108
- .#{$prefix}--interactive--tag-children {
109
- display: inline-flex;
110
- place-items: center;
111
- }
112
-
113
109
  .#{$prefix}--tag--selectable {
114
110
  border: 1px solid $border-inverse;
115
111
  background-color: $layer;
@@ -251,7 +247,9 @@
251
247
  );
252
248
  }
253
249
 
254
- .#{$prefix}--tag--outline:not(.#{$prefix}--tag--operational) {
250
+ .#{$prefix}--tag--outline:not(.#{$prefix}--tag--operational):not(span):not(
251
+ [disabled]
252
+ ) {
255
253
  @include tag-theme($background, $text-primary, $layer-hover);
256
254
 
257
255
  outline: 1px solid $background-inverse;
@@ -408,5 +406,56 @@
408
406
  .#{$prefix}--tag__close-icon:focus {
409
407
  @include high-contrast-mode('focus');
410
408
  }
409
+
410
+ .#{$prefix}--tag-label-tooltip {
411
+ max-inline-size: -webkit-fill-available;
412
+ }
413
+
414
+ .#{$prefix}--tag__custom-icon + .#{$prefix}--tag-label-tooltip {
415
+ max-inline-size: convert.to-rem(176px);
416
+ }
417
+
418
+ .#{$prefix}--tag--filter
419
+ .#{$prefix}--tag__custom-icon
420
+ + .#{$prefix}--tag-label-tooltip {
421
+ max-inline-size: convert.to-rem(158px);
422
+ }
411
423
  /* stylelint-enable */
424
+
425
+ .#{$prefix}--interactive--tag-children {
426
+ display: inline-flex;
427
+ max-inline-size: convert.to-rem(200px);
428
+ place-items: center;
429
+ }
430
+
431
+ .#{$prefix}--tag--filter
432
+ .#{$prefix}--tag__custom-icon
433
+ + span
434
+ > .#{$prefix}--interactive--tag-children {
435
+ max-inline-size: convert.to-rem(184px);
436
+ }
437
+
438
+ .#{$prefix}--tag .#{$prefix}--definition-term {
439
+ -webkit-border-after: none;
440
+ border-block-end: none;
441
+ cursor: default;
442
+ max-inline-size: convert.to-rem(192px);
443
+ }
444
+
445
+ .#{$prefix}--tag
446
+ .#{$prefix}--tag__custom-icon
447
+ + span
448
+ > .#{$prefix}--definition-term {
449
+ max-inline-size: convert.to-rem(176px);
450
+ }
451
+
452
+ .#{$prefix}--tag > .#{$prefix}--popover-container {
453
+ display: flex;
454
+ }
455
+
456
+ .#{$prefix}--toggletip-button:has(
457
+ .#{$prefix}--tag--operational.#{$prefix}--tag--disabled
458
+ ) {
459
+ pointer-events: none;
460
+ }
412
461
  }
@@ -232,6 +232,12 @@ $-icon-container-size: calc(#{layout.density('padding-inline')} * 2 + 1rem);
232
232
  inline-size: $-icon-container-size;
233
233
  inset-block-end: 0;
234
234
  inset-inline-end: 0;
235
+ @if (
236
+ enabled('enable-experimental-tile-contrast') or
237
+ $enable-experimental-tile-contrast
238
+ ) {
239
+ border: 1px solid $border-disabled;
240
+ }
235
241
 
236
242
  &:focus {
237
243
  outline: 2px solid $focus;
@@ -271,6 +277,7 @@ $-icon-container-size: calc(#{layout.density('padding-inline')} * 2 + 1rem);
271
277
  }
272
278
 
273
279
  .#{$prefix}--tile--expandable.#{$prefix}--tile--expandable--interactive {
280
+ border: none;
274
281
  cursor: default;
275
282
  transition: max-height $duration-moderate-01 motion(standard, productive);
276
283
 
@@ -391,6 +398,24 @@ $-icon-container-size: calc(#{layout.density('padding-inline')} * 2 + 1rem);
391
398
  inset-inline-end: $spacing-08;
392
399
  }
393
400
 
401
+ .#{$prefix}--tile.#{$prefix}--tile--selectable.#{$prefix}--tile--radio
402
+ > .#{$prefix}--slug {
403
+ inset-inline-end: $spacing-05;
404
+ transition: inset-inline-end $duration-fast-02 motion(standard, productive);
405
+
406
+ @if (
407
+ enabled('enable-v12-tile-radio-icons') or
408
+ $enable-experimental-tile-contrast
409
+ ) {
410
+ inset-inline-end: $spacing-08;
411
+ }
412
+ }
413
+
414
+ .#{$prefix}--tile.#{$prefix}--tile--selectable.#{$prefix}--tile--radio.#{$prefix}--tile--is-selected
415
+ > .#{$prefix}--slug {
416
+ inset-inline-end: $spacing-08;
417
+ }
418
+
394
419
  .#{$prefix}--tile.#{$prefix}--tile--clickable > .#{$prefix}--slug {
395
420
  pointer-events: none;
396
421
  }
@@ -435,7 +460,8 @@ $-icon-container-size: calc(#{layout.density('padding-inline')} * 2 + 1rem);
435
460
  }
436
461
 
437
462
  .#{$prefix}--tile--slug.#{$prefix}--tile--selectable:focus,
438
- .#{$prefix}--tile--slug.#{$prefix}--tile--clickable:focus {
463
+ .#{$prefix}--tile--slug.#{$prefix}--tile--clickable:focus,
464
+ .#{$prefix}--tile-input:focus + .#{$prefix}--tile--slug.#{$prefix}--tile {
439
465
  outline-offset: -1px;
440
466
  }
441
467
 
@@ -463,10 +489,23 @@ $-icon-container-size: calc(#{layout.density('padding-inline')} * 2 + 1rem);
463
489
  .#{$prefix}--tile--slug.#{$prefix}--tile--clickable
464
490
  .#{$prefix}--tile-content {
465
491
  position: relative;
466
- z-index: 1;
467
492
  cursor: pointer;
468
493
  }
469
494
 
495
+ .#{$prefix}--tile--slug.#{$prefix}--tile--selectable
496
+ .#{$prefix}--tile-content,
497
+ .#{$prefix}--tile--slug.#{$prefix}--tile--clickable .#{$prefix}--tile-content,
498
+ .#{$prefix}--tile--slug.#{$prefix}--tile--selectable
499
+ > .#{$prefix}--tile__checkmark,
500
+ .#{$prefix}--tile--slug.#{$prefix}--tile--is-selected .#{$prefix}--slug {
501
+ z-index: 1;
502
+ }
503
+
504
+ .#{$prefix}--tile--slug.#{$prefix}--tile--selectable
505
+ .#{$prefix}--slug:has(> .cds--popover--open) {
506
+ z-index: 2;
507
+ }
508
+
470
509
  .#{$prefix}--tile--slug.#{$prefix}--tile--selectable > .#{$prefix}--slug,
471
510
  .#{$prefix}--tile--slug.#{$prefix}--tile--selectable
472
511
  > .#{$prefix}--tile__checkmark {
@@ -61,11 +61,11 @@
61
61
  );
62
62
  @include custom-property.declaration(
63
63
  'link-hover-text-color',
64
- theme.$link-inverse
64
+ theme.$link-inverse-hover
65
65
  );
66
66
  @include custom-property.declaration(
67
67
  'link-visited-text-color',
68
- theme.$link-inverse
68
+ theme.$link-inverse-visited
69
69
  );
70
70
  @include custom-property.declaration(
71
71
  'link-focus-text-color',