@carbon/styles 1.50.0 → 1.51.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.50.0",
4
+ "version": "1.51.0-rc.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -43,7 +43,7 @@
43
43
  "@carbon/grid": "^11.21.0",
44
44
  "@carbon/layout": "^11.20.0",
45
45
  "@carbon/motion": "^11.16.0",
46
- "@carbon/themes": "^11.31.0",
46
+ "@carbon/themes": "^11.32.0-rc.0",
47
47
  "@carbon/type": "^11.25.0",
48
48
  "@ibm/plex": "6.0.0-next.6"
49
49
  },
@@ -65,5 +65,5 @@
65
65
  "scss/**/*.css",
66
66
  "css/**/*.css"
67
67
  ],
68
- "gitHead": "eb7d66891262363368b48211b9fd1caa78fa58f9"
68
+ "gitHead": "c70f968d388bbf968269066402a741327b00ac1c"
69
69
  }
@@ -162,6 +162,7 @@ describe('@carbon/styles/scss/theme', () => {
162
162
  "ai-border-start",
163
163
  "ai-border-end",
164
164
  "ai-drop-shadow",
165
+ "ai-overlay",
165
166
  "slug-callout-caret-center",
166
167
  "slug-callout-caret-bottom",
167
168
  "slug-callout-caret-bottom-background",
@@ -117,13 +117,13 @@ $copy-btn-feedback: $background-inverse !default;
117
117
  .#{$prefix}--snippet--inline.#{$prefix}--copy-btn--animating.#{$prefix}--copy-btn--fade-out::before,
118
118
  .#{$prefix}--snippet--inline.#{$prefix}--copy-btn--animating.#{$prefix}--copy-btn--fade-out
119
119
  .#{$prefix}--copy-btn__feedback {
120
- animation: $duration-fast-02 motion(standard, productive) hide-feedback;
120
+ animation: $duration-fast-02 motion(standard, productive) #{$prefix}--hide-feedback;
121
121
  }
122
122
 
123
123
  .#{$prefix}--snippet--inline.#{$prefix}--copy-btn--animating.#{$prefix}--copy-btn--fade-in::before,
124
124
  .#{$prefix}--snippet--inline.#{$prefix}--copy-btn--animating.#{$prefix}--copy-btn--fade-in
125
125
  .#{$prefix}--copy-btn__feedback {
126
- animation: $duration-fast-02 motion(standard, productive) show-feedback;
126
+ animation: $duration-fast-02 motion(standard, productive) #{$prefix}--show-feedback;
127
127
  }
128
128
 
129
129
  .#{$prefix}--snippet--inline code {
@@ -73,13 +73,13 @@
73
73
  &.#{$prefix}--copy-btn--animating.#{$prefix}--copy-btn--fade-out
74
74
  .#{$prefix}--copy-btn__feedback {
75
75
  // https://github.com/stylelint/stylelint/issues/2363
76
- animation: $duration-fast-02 motion(standard, productive) hide-feedback;
76
+ animation: $duration-fast-02 motion(standard, productive) #{$prefix}--hide-feedback;
77
77
  }
78
78
 
79
79
  &.#{$prefix}--copy-btn--animating.#{$prefix}--copy-btn--fade-in::before,
80
80
  &.#{$prefix}--copy-btn--animating.#{$prefix}--copy-btn--fade-in
81
81
  .#{$prefix}--copy-btn__feedback {
82
- animation: $duration-fast-02 motion(standard, productive) show-feedback;
82
+ animation: $duration-fast-02 motion(standard, productive) #{$prefix}--show-feedback;
83
83
  }
84
84
  }
85
85
 
@@ -61,7 +61,7 @@ $-loading-gap-small: 110;
61
61
  .#{$prefix}--inline-loading__checkmark {
62
62
  animation-duration: 250ms;
63
63
  animation-fill-mode: forwards;
64
- animation-name: stroke;
64
+ animation-name: #{$prefix}--stroke;
65
65
  fill: none;
66
66
  stroke: $interactive;
67
67
  stroke-dasharray: 12;
@@ -5,7 +5,9 @@
5
5
  // LICENSE file in the root directory of this source tree.
6
6
  //
7
7
 
8
- @keyframes stroke {
8
+ @use '../../config' as *;
9
+
10
+ @keyframes #{prefix}--stroke {
9
11
  100% {
10
12
  stroke-dashoffset: 0;
11
13
  }
@@ -6,19 +6,20 @@
6
6
  //
7
7
 
8
8
  @use '../../motion';
9
+ @use '../../config' as *;
9
10
 
10
11
  @mixin spin {
11
12
  // Animate the container
12
13
  animation-duration: 690ms;
13
14
  animation-fill-mode: forwards;
14
15
  animation-iteration-count: infinite;
15
- animation-name: rotate;
16
+ animation-name: #{$prefix}--rotate;
16
17
  animation-timing-function: linear;
17
18
 
18
19
  // Animate the stroke
19
20
  svg circle {
20
21
  animation-duration: 10ms;
21
- animation-name: init-stroke;
22
+ animation-name: #{$prefix}--init-stroke;
22
23
  animation-timing-function: motion.$standard-easing;
23
24
 
24
25
  @media screen and (prefers-reduced-motion: reduce) {
@@ -29,15 +30,15 @@
29
30
 
30
31
  @mixin stop {
31
32
  // Animate the container
32
- animation: rotate-end-p1 700ms motion.$ease-out forwards,
33
- rotate-end-p2 700ms motion.$ease-out 700ms forwards;
33
+ animation: #{$prefix}--rotate-end-p1 700ms motion.$ease-out forwards,
34
+ #{$prefix}--rotate-end-p2 700ms motion.$ease-out 700ms forwards;
34
35
 
35
36
  // Animate the stroke
36
37
  svg circle {
37
38
  animation-delay: 700ms;
38
39
  animation-duration: 700ms;
39
40
  animation-fill-mode: forwards;
40
- animation-name: stroke-end;
41
+ animation-name: #{$prefix}--stroke-end;
41
42
  animation-timing-function: motion.$ease-out;
42
43
 
43
44
  @media screen and (prefers-reduced-motion: reduce) {
@@ -103,7 +103,7 @@
103
103
  display: none;
104
104
  }
105
105
 
106
- @keyframes rotate {
106
+ @keyframes #{$prefix}--rotate {
107
107
  0% {
108
108
  transform: rotate(0deg);
109
109
  }
@@ -113,20 +113,20 @@
113
113
  }
114
114
  }
115
115
 
116
- @keyframes rotate-end-p1 {
116
+ @keyframes #{$prefix}--rotate-end-p1 {
117
117
  100% {
118
118
  transform: rotate(360deg);
119
119
  }
120
120
  }
121
121
 
122
- @keyframes rotate-end-p2 {
122
+ @keyframes #{$prefix}--rotate-end-p2 {
123
123
  100% {
124
124
  transform: rotate(-360deg);
125
125
  }
126
126
  }
127
127
 
128
128
  /* Stroke animations */
129
- @keyframes init-stroke {
129
+ @keyframes #{$prefix}--init-stroke {
130
130
  0% {
131
131
  stroke-dashoffset: loading-progress($circumference, 0);
132
132
  }
@@ -136,7 +136,7 @@
136
136
  }
137
137
  }
138
138
 
139
- @keyframes stroke-end {
139
+ @keyframes #{$prefix}--stroke-end {
140
140
  0% {
141
141
  stroke-dashoffset: loading-progress($circumference, 81);
142
142
  }
@@ -350,60 +350,22 @@
350
350
  .#{$prefix}--modal-scroll-content {
351
351
  // Required to accommodate focus outline's negative offset when scrolling in Chrome
352
352
  border-block-end: 2px solid transparent;
353
+ mask-image: linear-gradient(
354
+ to bottom,
355
+ $layer calc(100% - 80px),
356
+ transparent calc(100% - 48px),
357
+ transparent 100%
358
+ ),
359
+ linear-gradient(to left, $layer 0, 16px, transparent 16px),
360
+ linear-gradient(to right, $layer 0, 2px, transparent 2px),
361
+ linear-gradient(to top, $layer 0, 2px, transparent 2px);
353
362
  }
363
+
354
364
  // Required so overflow-indicator disappears at end of content
355
365
  .#{$prefix}--modal-scroll-content > *:last-child {
356
366
  padding-block-end: $spacing-06;
357
367
  }
358
368
 
359
- .#{$prefix}--modal-content--overflow-indicator {
360
- position: absolute;
361
- background: $layer;
362
- block-size: convert.to-rem(48px);
363
- grid-column: 1/-1;
364
- grid-row: 2/-2;
365
- inline-size: calc(100% - $spacing-05);
366
- inset-block-end: 0;
367
- inset-inline-start: 0;
368
- pointer-events: none;
369
-
370
- &::before {
371
- position: absolute;
372
- background-image: linear-gradient(to bottom, transparent, $layer);
373
- block-size: convert.to-rem(32px);
374
- content: '';
375
- inline-size: 100%;
376
- inset-block-start: -32px;
377
- pointer-events: none;
378
- }
379
- }
380
-
381
- // Safari-only media query
382
- // won't appear correctly with CSS custom properties
383
- // see: code snippet and tabs overflow indicators
384
- @media not all and (min-resolution >= 0.001dpcm) {
385
- @supports (-webkit-appearance: none) and (stroke-color: transparent) {
386
- .#{$prefix}--modal-content--overflow-indicator {
387
- background-image: linear-gradient(to bottom, rgba($layer, 0), $layer);
388
- }
389
- }
390
- }
391
-
392
- .#{$prefix}--modal-content:focus
393
- ~ .#{$prefix}--modal-content--overflow-indicator {
394
- margin: 0 2px 2px;
395
- }
396
-
397
- @media screen and (-ms-high-contrast: active) {
398
- .#{$prefix}--modal-scroll-content > *:last-child {
399
- padding-block-end: 0;
400
- }
401
-
402
- .#{$prefix}--modal-content--overflow-indicator {
403
- display: none;
404
- }
405
- }
406
-
407
369
  // -----------------------------
408
370
  // Modal footer
409
371
  // -----------------------------
@@ -488,21 +450,25 @@
488
450
  }
489
451
 
490
452
  // Slug styles
453
+ .#{$prefix}--modal--slug.#{$prefix}--modal {
454
+ background-color: $ai-overlay;
455
+ }
456
+
491
457
  .#{$prefix}--modal--slug .#{$prefix}--modal-container {
492
- @include callout-gradient();
458
+ @include callout-gradient('default', 0, 'layer');
493
459
 
460
+ border: 1px solid transparent;
494
461
  background-color: $layer;
462
+ box-shadow: inset 0 -80px 70px -65px $ai-inner-shadow,
463
+ 0 4px 10px 2px $ai-drop-shadow;
495
464
  }
496
465
 
497
- // Start the gradient 64px from bottom only when two buttons are present
498
466
  .#{$prefix}--modal--slug
499
- .#{$prefix}--modal-container:has(
500
- .#{$prefix}--btn-set:not(.#{$prefix}--modal-footer--three-button)
501
- > button:not(:only-child)
502
- ) {
503
- @include callout-gradient('default', 64px);
467
+ .#{$prefix}--modal-container:has(.#{$prefix}--modal-footer) {
468
+ @include callout-gradient('default', 64px, 'layer');
504
469
 
505
- background-color: $layer;
470
+ box-shadow: inset 0 -80px 0 -16px $layer,
471
+ inset 0 -160px 70px -65px $ai-inner-shadow, 0 4px 10px 2px $ai-drop-shadow;
506
472
  }
507
473
 
508
474
  .#{$prefix}--modal--slug .#{$prefix}--slug {
@@ -511,6 +477,19 @@
511
477
  inset-inline-end: 0;
512
478
  }
513
479
 
480
+ .#{$prefix}--modal--slug
481
+ .#{$prefix}--modal-content.#{$prefix}--modal-scroll-content {
482
+ mask-image: linear-gradient(
483
+ to bottom,
484
+ $layer calc(100% - 80px),
485
+ transparent calc(100% - 48px),
486
+ transparent 100%
487
+ ),
488
+ linear-gradient(to left, $layer 0, 16px, transparent 16px),
489
+ linear-gradient(to right, $layer 0, 2px, transparent 2px),
490
+ linear-gradient(to top, $layer 0, 2px, transparent 2px);
491
+ }
492
+
514
493
  .#{$prefix}--modal-header
515
494
  > .#{$prefix}--slug:has(+ .#{$prefix}--modal-close-button),
516
495
  .#{$prefix}--modal-header
@@ -522,8 +501,14 @@
522
501
  inset-inline-end: convert.to-rem(48px);
523
502
  }
524
503
 
504
+ .#{$prefix}--modal--slug
505
+ .#{$prefix}--modal-content--overflow-indicator::before,
506
+ .#{$prefix}--modal--slug .#{$prefix}--modal-content--overflow-indicator {
507
+ display: none;
508
+ }
509
+
525
510
  // Windows HCM fix
526
- /* stylelint-disable */
511
+ /* stylelint-disable no-duplicate-selectors */
527
512
  .#{$prefix}--modal-close__icon {
528
513
  @include high-contrast-mode('icon-fill');
529
514
  }
@@ -531,5 +516,5 @@
531
516
  .#{$prefix}--modal-close:focus {
532
517
  @include high-contrast-mode('focus');
533
518
  }
534
- /* stylelint-enable */
519
+ /* stylelint-enable no-duplicate-selectors */
535
520
  }
@@ -75,7 +75,7 @@
75
75
  position: absolute;
76
76
  animation-duration: 1400ms;
77
77
  animation-iteration-count: infinite;
78
- animation-name: progress-bar-indeterminate;
78
+ animation-name: #{$prefix}--progress-bar-indeterminate;
79
79
  animation-timing-function: linear;
80
80
  background-image: linear-gradient(
81
81
  90deg,
@@ -91,7 +91,7 @@
91
91
  [dir='rtl']
92
92
  .#{$prefix}--progress-bar--indeterminate
93
93
  .#{$prefix}--progress-bar__track::after {
94
- animation-name: progress-bar-indeterminate-rtl;
94
+ animation-name: #{$prefix}--progress-bar-indeterminate-rtl;
95
95
  }
96
96
 
97
97
  .#{$prefix}--progress-bar__helper-text {
@@ -139,7 +139,7 @@
139
139
  margin-inline-end: 0;
140
140
  }
141
141
 
142
- @keyframes progress-bar-indeterminate {
142
+ @keyframes #{$prefix}--progress-bar-indeterminate {
143
143
  0% {
144
144
  background-position-x: 25%;
145
145
  }
@@ -150,7 +150,7 @@
150
150
  }
151
151
  }
152
152
 
153
- @keyframes progress-bar-indeterminate-rtl {
153
+ @keyframes #{$prefix}--progress-bar-indeterminate-rtl {
154
154
  0% {
155
155
  background-position-x: -105%;
156
156
  }
@@ -274,10 +274,6 @@ $-icon-container-size: calc(#{layout.density('padding-inline')} * 2 + 1rem);
274
274
  @include focus-outline('outline');
275
275
  }
276
276
 
277
- .#{$prefix}--tile-content__above-the-fold {
278
- display: block;
279
- }
280
-
281
277
  .#{$prefix}--tile-content__below-the-fold {
282
278
  display: block;
283
279
  opacity: 0;
@@ -124,6 +124,7 @@
124
124
  } @else {
125
125
  background: linear-gradient(
126
126
  to top,
127
+ $background $start,
127
128
  theme.$ai-aura-start $start,
128
129
  theme.$ai-aura-end 50%
129
130
  )
@@ -4,6 +4,7 @@
4
4
  // This source code is licensed under the Apache-2.0 license found in the
5
5
  // LICENSE file in the root directory of this source tree.
6
6
  //
7
+ @use '../config' as *;
7
8
 
8
9
  @mixin content-visible {
9
10
  opacity: 1;
@@ -15,7 +16,7 @@
15
16
  visibility: hidden;
16
17
  }
17
18
 
18
- @keyframes hide-feedback {
19
+ @keyframes #{$prefix}--hide-feedback {
19
20
  0% {
20
21
  @include content-visible;
21
22
  }
@@ -25,7 +26,7 @@
25
26
  }
26
27
  }
27
28
 
28
- @keyframes show-feedback {
29
+ @keyframes #{$prefix}--show-feedback {
29
30
  0% {
30
31
  @include content-hidden;
31
32
  }
@@ -35,7 +36,7 @@
35
36
  }
36
37
  }
37
38
 
38
- @keyframes skeleton {
39
+ @keyframes #{$prefix}--skeleton {
39
40
  0% {
40
41
  opacity: 0.3;
41
42
  transform: scaleX(0);
@@ -7,6 +7,7 @@
7
7
 
8
8
  @use 'keyframes';
9
9
  @use '../theme' as *;
10
+ @use '../config' as *;
10
11
 
11
12
  /// Skeleton loading animation
12
13
  /// @access public
@@ -30,7 +31,7 @@
30
31
 
31
32
  &::before {
32
33
  position: absolute;
33
- animation: 3000ms ease-in-out skeleton infinite;
34
+ animation: 3000ms ease-in-out #{$prefix}--skeleton infinite;
34
35
  background: $skeleton-element;
35
36
  block-size: 100%;
36
37
  content: '';
@@ -55,7 +56,7 @@
55
56
 
56
57
  &::before {
57
58
  position: absolute;
58
- animation: 3000ms ease-in-out skeleton infinite;
59
+ animation: 3000ms ease-in-out #{$prefix}--skeleton infinite;
59
60
  background: $skeleton-element;
60
61
  block-size: 100%;
61
62
  content: '';
@@ -182,7 +182,7 @@
182
182
  opacity: 1;
183
183
  }
184
184
 
185
- @keyframes tooltip-fade {
185
+ @keyframes #{$prefix}--tooltip-fade {
186
186
  from {
187
187
  opacity: 0;
188
188
  }
@@ -202,7 +202,8 @@
202
202
  .#{$prefix}--assistive-text,
203
203
  + .#{$prefix}--assistive-text,
204
204
  &.#{$prefix}--tooltip--a11y::before {
205
- animation: tooltip-fade $duration-fast-01 motion(standard, productive);
205
+ animation: #{$prefix}--tooltip-fade $duration-fast-01
206
+ motion(standard, productive);
206
207
  }
207
208
  }
208
209