@carbon/styles 1.57.0 → 1.58.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.57.0",
4
+ "version": "1.58.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": "e4922a44b2110b9dcb71da21ff6c0c9bb95610e0"
71
+ "gitHead": "574070ef9eef05d6e1e5899354bbadc77ba5f3ee"
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
- }
@@ -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: (
@@ -209,8 +209,12 @@
209
209
  .#{$prefix}--structured-list-svg {
210
210
  fill: transparent;
211
211
  }
212
+ .#{$prefix}--structured-list--selection
213
+ .#{$prefix}--structured-list-td:last-child {
214
+ inline-size: $spacing-07;
215
+ padding-inline-start: 0;
216
+ }
212
217
  }
213
-
214
218
  @if (
215
219
  enabled('enable-v12-structured-list-visible-icons') or
216
220
  $enable-v12-structured-list-visible-icons
@@ -268,4 +272,12 @@
268
272
  margin-block-start: $spacing-01;
269
273
  vertical-align: top;
270
274
  }
275
+
276
+ .#{$prefix}--structured-list--selection
277
+ .#{$prefix}--structured-list-td:first-child:has(
278
+ .#{$prefix}--structured-list__icon
279
+ ) {
280
+ inline-size: $spacing-07;
281
+ padding-inline-end: 0;
282
+ }
271
283
  }
@@ -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
  }
@@ -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',