@carbon/styles 1.52.0 → 1.53.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.52.0",
4
+ "version": "1.53.0-rc.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -19,7 +19,8 @@
19
19
  "files": [
20
20
  "css",
21
21
  "scss",
22
- "index.scss"
22
+ "index.scss",
23
+ "telemetry.yml"
23
24
  ],
24
25
  "publishConfig": {
25
26
  "access": "public",
@@ -27,7 +28,8 @@
27
28
  },
28
29
  "scripts": {
29
30
  "build": "yarn clean && node tasks/build-css.js",
30
- "clean": "rimraf css"
31
+ "clean": "rimraf css",
32
+ "postinstall": "ibmtelemetry --config=telemetry.yml"
31
33
  },
32
34
  "peerDependencies": {
33
35
  "sass": "^1.33.0"
@@ -38,14 +40,15 @@
38
40
  }
39
41
  },
40
42
  "dependencies": {
41
- "@carbon/colors": "^11.20.0",
42
- "@carbon/feature-flags": "^0.17.0",
43
- "@carbon/grid": "^11.21.0",
44
- "@carbon/layout": "^11.20.0",
45
- "@carbon/motion": "^11.16.0",
46
- "@carbon/themes": "^11.32.0",
47
- "@carbon/type": "^11.25.0",
48
- "@ibm/plex": "6.0.0-next.6"
43
+ "@carbon/colors": "^11.21.0-rc.0",
44
+ "@carbon/feature-flags": "^0.18.0-rc.0",
45
+ "@carbon/grid": "^11.22.0-rc.0",
46
+ "@carbon/layout": "^11.21.0-rc.0",
47
+ "@carbon/motion": "^11.17.0-rc.0",
48
+ "@carbon/themes": "^11.33.0-rc.0",
49
+ "@carbon/type": "^11.26.0-rc.0",
50
+ "@ibm/plex": "6.0.0-next.6",
51
+ "@ibm/telemetry-js": "^1.2.1"
49
52
  },
50
53
  "devDependencies": {
51
54
  "@carbon/test-utils": "^10.30.0",
@@ -65,5 +68,5 @@
65
68
  "scss/**/*.css",
66
69
  "css/**/*.css"
67
70
  ],
68
- "gitHead": "4f119eac6b9dbcf910a64cd89fddacbc9c61ef8c"
71
+ "gitHead": "fd9030978919c8d2ce0c102db94aeabf88563c34"
69
72
  }
@@ -132,25 +132,8 @@ describe('@carbon/styles/scss/theme', () => {
132
132
  "slug-background-hover",
133
133
  "slug-gradient-hover",
134
134
  "slug-hollow-hover",
135
- "slug-callout-gradient-top",
136
- "slug-callout-gradient-bottom",
137
- "slug-callout-aura-start",
138
- "slug-callout-aura-end",
139
- "slug-callout-gradient-top-hover",
140
- "slug-callout-gradient-bottom-hover",
141
- "slug-callout-aura-start-hover-01",
142
- "slug-callout-aura-start-hover-02",
143
- "slug-callout-aura-end-hover-01",
144
- "slug-callout-aura-end-hover-02",
145
- "slug-callout-gradient-top-selected",
146
- "slug-callout-gradient-bottom-selected",
147
- "slug-callout-aura-start-selected",
148
- "slug-callout-aura-end-selected",
149
- "ai-gradient-start-01",
150
- "ai-gradient-start-02",
151
- "ai-gradient-end",
152
- "slug-callout-shadow-outer-01",
153
- "slug-callout-shadow-outer-02",
135
+ "ai-popover-shadow-outer-01",
136
+ "ai-popover-shadow-outer-02",
154
137
  "ai-inner-shadow",
155
138
  "ai-aura-start",
156
139
  "ai-aura-start-table",
@@ -165,10 +148,10 @@ describe('@carbon/styles/scss/theme', () => {
165
148
  "ai-skeleton-background",
166
149
  "ai-skeleton-element-background",
167
150
  "ai-overlay",
168
- "slug-callout-caret-center",
169
- "slug-callout-caret-bottom",
170
- "slug-callout-caret-bottom-background",
171
- "slug-callout-caret-bottom-background-actions",
151
+ "ai-popover-caret-center",
152
+ "ai-popover-caret-bottom",
153
+ "ai-popover-caret-bottom-background",
154
+ "ai-popover-caret-bottom-background-actions",
172
155
  "chat-prompt-background",
173
156
  "chat-prompt-border-start",
174
157
  "chat-prompt-border-end",
@@ -178,6 +161,8 @@ describe('@carbon/styles/scss/theme', () => {
178
161
  "chat-avatar-bot",
179
162
  "chat-avatar-agent",
180
163
  "chat-avatar-user",
164
+ "chat-shell-background",
165
+ "chat-header-background",
181
166
  "highlight",
182
167
  "overlay",
183
168
  "toggle-off",
@@ -12,6 +12,7 @@
12
12
  'enable-css-grid': true,
13
13
  'enable-v11-release': true,
14
14
  'enable-experimental-tile-contrast': false,
15
+ 'enable-v12-tile-radio-icons': false,
15
16
  )
16
17
  !default
17
18
  );
@@ -76,6 +76,10 @@
76
76
  .#{$prefix}--checkbox-label::before,
77
77
  .#{$prefix}--checkbox-label::after {
78
78
  box-sizing: border-box;
79
+
80
+ @media print {
81
+ print-color-adjust: exact;
82
+ }
79
83
  }
80
84
 
81
85
  // Spacing for presentational checkbox
@@ -225,7 +225,6 @@ $copy-btn-feedback: $background-inverse !default;
225
225
 
226
226
  // collapsed pre
227
227
  .#{$prefix}--snippet--multi .#{$prefix}--snippet-container pre {
228
- padding-block-end: convert.to-rem(24px);
229
228
  padding-inline-end: $spacing-08;
230
229
  }
231
230
 
@@ -1002,6 +1002,8 @@
1002
1002
  tr.#{$prefix}--expandable-row--hover.#{$prefix}--data-table--slug-row,
1003
1003
  tr.#{$prefix}--data-table--selected.#{$prefix}--parent-row.#{$prefix}--expandable-row--hover.#{$prefix}--data-table--slug-row {
1004
1004
  @include ai-table-gradient('hover');
1005
+
1006
+ background-attachment: fixed;
1005
1007
  }
1006
1008
 
1007
1009
  tr.#{$prefix}--parent-row.cds--data-table--selected.#{$prefix}--data-table--slug-row,
@@ -1009,6 +1011,8 @@
1009
1011
  tr.#{$prefix}--data-table--selected.#{$prefix}--data-table--slug-row
1010
1012
  + .#{$prefix}--expandable-row {
1011
1013
  @include ai-table-gradient('selected');
1014
+
1015
+ background-attachment: fixed;
1012
1016
  }
1013
1017
 
1014
1018
  tr.#{$prefix}--data-table--slug-row.#{$prefix}--data-table--selected td,
@@ -46,7 +46,10 @@ $link-focus-text-color: custom-property.get-var(
46
46
  &:active,
47
47
  &:active:visited,
48
48
  &:active:visited:hover {
49
+ @include focus-outline;
50
+
49
51
  color: $text-primary;
52
+ outline-color: $link-focus-text-color;
50
53
  text-decoration: underline;
51
54
  }
52
55
 
@@ -54,6 +57,7 @@ $link-focus-text-color: custom-property.get-var(
54
57
  @include focus-outline;
55
58
 
56
59
  outline-color: $link-focus-text-color;
60
+ text-decoration: underline;
57
61
  }
58
62
 
59
63
  &:visited {
@@ -87,11 +91,6 @@ $link-focus-text-color: custom-property.get-var(
87
91
  .#{$prefix}--link.#{$prefix}--link--inline {
88
92
  display: inline;
89
93
  text-decoration: underline;
90
-
91
- &:focus,
92
- &:visited {
93
- text-decoration: none;
94
- }
95
94
  }
96
95
 
97
96
  .#{$prefix}--link--disabled.#{$prefix}--link--inline {
@@ -439,7 +439,8 @@
439
439
  .#{$prefix}--body--with-modal-open .#{$prefix}--modal .#{$prefix}--tooltip,
440
440
  .#{$prefix}--body--with-modal-open
441
441
  .#{$prefix}--modal
442
- .#{$prefix}--overflow-menu-options {
442
+ .#{$prefix}--overflow-menu-options,
443
+ .#{$prefix}--body--with-modal-open .#{$prefix}--overflow-menu-options {
443
444
  z-index: z('modal');
444
445
  }
445
446
 
@@ -455,7 +456,7 @@
455
456
  }
456
457
 
457
458
  .#{$prefix}--modal--slug .#{$prefix}--modal-container {
458
- @include callout-gradient('default', 0, 'layer');
459
+ @include ai-popover-gradient('default', 0, 'layer');
459
460
 
460
461
  border: 1px solid transparent;
461
462
  background-color: $layer;
@@ -465,7 +466,7 @@
465
466
 
466
467
  .#{$prefix}--modal--slug
467
468
  .#{$prefix}--modal-container:has(.#{$prefix}--modal-footer) {
468
- @include callout-gradient('default', 64px, 'layer');
469
+ @include ai-popover-gradient('default', 64px, 'layer');
469
470
 
470
471
  box-shadow: inset 0 -80px 0 -16px $layer,
471
472
  inset 0 -160px 70px -65px $ai-inner-shadow, 0 4px 10px 2px $ai-drop-shadow;
@@ -125,6 +125,18 @@ $popover-caret-height: custom-property.get-var(
125
125
 
126
126
  // Popover content
127
127
  .#{$prefix}--popover-content {
128
+ // The layout.redefine-tokens is been included here because it is been redifined in _tag.scss
129
+ @include layout.redefine-tokens(
130
+ (
131
+ size: (
132
+ height: (
133
+ sm: convert.to-rem(32px),
134
+ md: convert.to-rem(40px),
135
+ lg: convert.to-rem(48px),
136
+ ),
137
+ ),
138
+ )
139
+ );
128
140
  @include component-reset.reset;
129
141
 
130
142
  position: absolute;
@@ -123,6 +123,10 @@ $radio-border-width: 1px !default;
123
123
  @include high-contrast-mode('icon-fill') {
124
124
  background-color: ButtonText;
125
125
  }
126
+
127
+ @media print {
128
+ print-color-adjust: exact;
129
+ }
126
130
  }
127
131
  }
128
132
 
@@ -327,14 +327,14 @@ $sizes: (
327
327
 
328
328
  // Slug callout styles
329
329
  .#{$prefix}--slug.#{$prefix}--slug--enabled .#{$prefix}--slug-content {
330
- @include callout-gradient();
330
+ @include ai-popover-gradient();
331
331
 
332
332
  border: 1px solid transparent;
333
333
  border-radius: convert.to-rem(8px);
334
334
  // Need to make tokens
335
335
  box-shadow: inset 0 -80px 70px -65px $ai-inner-shadow,
336
- -40px 30px 100px -25px $slug-callout-shadow-outer-01,
337
- -60px 80px 60px -45px $slug-callout-shadow-outer-02;
336
+ -40px 30px 100px -25px $ai-popover-shadow-outer-01,
337
+ -60px 80px 60px -45px $ai-popover-shadow-outer-02;
338
338
  color: $text-primary;
339
339
  min-inline-size: convert.to-rem(280px);
340
340
  }
@@ -417,7 +417,7 @@ $sizes: (
417
417
  }
418
418
 
419
419
  &::after {
420
- background: $slug-callout-caret-bottom-background;
420
+ background: $ai-popover-caret-bottom-background;
421
421
  block-size: convert.to-rem(2px);
422
422
  border-end-end-radius: 50%;
423
423
  border-end-start-radius: 50%;
@@ -530,8 +530,8 @@ $sizes: (
530
530
  > .#{$prefix}--popover
531
531
  > .#{$prefix}--popover-caret {
532
532
  &::before {
533
- border-color: $slug-callout-caret-bottom;
534
- background: $slug-callout-caret-bottom-background;
533
+ border-color: $ai-popover-caret-bottom;
534
+ background: $ai-popover-caret-bottom-background;
535
535
  }
536
536
  }
537
537
 
@@ -547,7 +547,7 @@ $sizes: (
547
547
  > .#{$prefix}--popover:has(.#{$prefix}--slug-content--with-actions)
548
548
  > .#{$prefix}--popover-caret {
549
549
  &::before {
550
- background: $slug-callout-caret-bottom-background-actions;
550
+ background: $ai-popover-caret-bottom-background-actions;
551
551
  }
552
552
  }
553
553
 
@@ -560,7 +560,7 @@ $sizes: (
560
560
  > .#{$prefix}--popover
561
561
  > .#{$prefix}--popover-caret {
562
562
  &::before {
563
- border-color: $slug-callout-caret-center;
563
+ border-color: $ai-popover-caret-center;
564
564
  }
565
565
  }
566
566
 
@@ -8,11 +8,23 @@
8
8
 
9
9
  /// @access private
10
10
  /// @group tag
11
- @mixin tag-theme($bg-color, $text-color, $filter-hover-color: $bg-color) {
11
+ @mixin tag-theme(
12
+ $bg-color,
13
+ $text-color,
14
+ $filter-hover-color: $bg-color,
15
+ $border-color: $bg-color
16
+ ) {
12
17
  background-color: $bg-color;
13
18
  color: $text-color;
14
19
 
15
- &.#{$prefix}--tag--interactive,
20
+ &.#{$prefix}--tag--operational {
21
+ border: 1px solid $border-color;
22
+
23
+ &:hover {
24
+ background-color: $filter-hover-color;
25
+ }
26
+ }
27
+
16
28
  .#{$prefix}--tag__close-icon {
17
29
  &:hover {
18
30
  background-color: $filter-hover-color;
@@ -31,20 +31,20 @@
31
31
  xs: convert.to-rem(18px),
32
32
  sm: convert.to-rem(18px),
33
33
  md: convert.to-rem(24px),
34
+ lg: convert.to-rem(32px),
34
35
  ),
35
36
  ),
36
37
  )
37
38
  );
38
39
 
39
- @include layout.use('size', $default: 'md', $min: 'sm', $max: 'md');
40
-
40
+ @include layout.use('size', $default: 'md', $min: 'sm', $max: 'lg');
41
41
  @include type-style('label-01');
42
42
  @include tag-theme($tag-background-gray, $tag-color-gray, $tag-hover-gray);
43
43
 
44
44
  display: inline-flex;
45
45
  align-items: center;
46
46
  justify-content: center;
47
- border-radius: convert.to-rem(15px);
47
+ border-radius: convert.to-rem(16px);
48
48
  margin: $spacing-02;
49
49
  cursor: default;
50
50
  // restricts size of contained elements
@@ -56,20 +56,118 @@
56
56
  vertical-align: middle;
57
57
  word-break: break-word;
58
58
 
59
+ &.#{$prefix}--tag--lg {
60
+ padding-inline-start: $spacing-04;
61
+ }
62
+
63
+ &:has(.#{$prefix}--tag__custom-icon) {
64
+ padding-inline-start: $spacing-02;
65
+ }
66
+
67
+ &.#{$prefix}--tag--lg:not(.#{$prefix}--tag--filter) {
68
+ padding-inline: $spacing-04;
69
+ }
70
+
71
+ &.#{$prefix}--tag--lg:has(.#{$prefix}--tag__custom-icon) {
72
+ padding-inline-start: $spacing-03;
73
+ }
74
+
59
75
  &:not(:first-child) {
60
76
  margin-inline-start: 0;
61
77
  }
62
78
  }
63
79
 
80
+ .#{$prefix}--tag__label {
81
+ overflow: hidden;
82
+ max-inline-size: 100%;
83
+ text-overflow: ellipsis;
84
+ white-space: nowrap;
85
+ }
86
+
87
+ .#{$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
+ }
95
+
96
+ // tags used for filtering
97
+ .#{$prefix}--tag--filter {
98
+ cursor: pointer;
99
+ padding-block-end: 0;
100
+ padding-block-start: 0;
101
+ padding-inline-end: 0;
102
+
103
+ &:hover {
104
+ outline: none;
105
+ }
106
+ }
107
+
108
+ .#{$prefix}--interactive--tag-children {
109
+ display: inline-flex;
110
+ place-items: center;
111
+ }
112
+
113
+ .#{$prefix}--tag--selectable {
114
+ border: 1px solid $border-inverse;
115
+ background-color: $layer;
116
+ color: $text-primary;
117
+ cursor: pointer;
118
+
119
+ &:hover {
120
+ background-color: $layer-hover;
121
+ outline: none;
122
+ }
123
+
124
+ &:focus {
125
+ outline: 2px solid $focus;
126
+ outline-offset: 1px;
127
+ }
128
+ }
129
+
130
+ .#{$prefix}--tag--selectable-selected {
131
+ background-color: $layer-selected-inverse;
132
+ color: $text-inverse;
133
+
134
+ &:hover {
135
+ background-color: $layer-selected-inverse;
136
+ }
137
+ }
138
+
139
+ .#{$prefix}--tag--operational {
140
+ border: 1px solid $tag-border-gray;
141
+ background-color: $tag-background-gray;
142
+ color: $tag-color-gray;
143
+ cursor: pointer;
144
+
145
+ &:hover {
146
+ background-color: $tag-hover-gray;
147
+ outline: none;
148
+ }
149
+
150
+ &:focus {
151
+ outline: 2px solid $focus;
152
+ outline-offset: 1px;
153
+ }
154
+ }
155
+
64
156
  .#{$prefix}--tag--red {
65
- @include tag-theme($tag-background-red, $tag-color-red, $tag-hover-red);
157
+ @include tag-theme(
158
+ $tag-background-red,
159
+ $tag-color-red,
160
+ $tag-hover-red,
161
+ $tag-border-red
162
+ );
66
163
  }
67
164
 
68
165
  .#{$prefix}--tag--magenta {
69
166
  @include tag-theme(
70
167
  $tag-background-magenta,
71
168
  $tag-color-magenta,
72
- $tag-hover-magenta
169
+ $tag-hover-magenta,
170
+ $tag-border-magenta
73
171
  );
74
172
  }
75
173
 
@@ -77,39 +175,62 @@
77
175
  @include tag-theme(
78
176
  $tag-background-purple,
79
177
  $tag-color-purple,
80
- $tag-hover-purple
178
+ $tag-hover-purple,
179
+ $tag-border-purple
81
180
  );
82
181
  }
83
182
 
84
183
  .#{$prefix}--tag--blue {
85
- @include tag-theme($tag-background-blue, $tag-color-blue, $tag-hover-blue);
184
+ @include tag-theme(
185
+ $tag-background-blue,
186
+ $tag-color-blue,
187
+ $tag-hover-blue,
188
+ $tag-border-blue
189
+ );
86
190
  }
87
191
 
88
192
  .#{$prefix}--tag--cyan {
89
- @include tag-theme($tag-background-cyan, $tag-color-cyan, $tag-hover-cyan);
193
+ @include tag-theme(
194
+ $tag-background-cyan,
195
+ $tag-color-cyan,
196
+ $tag-hover-cyan,
197
+ $tag-border-cyan
198
+ );
90
199
  }
91
200
 
92
201
  .#{$prefix}--tag--teal {
93
- @include tag-theme($tag-background-teal, $tag-color-teal, $tag-hover-teal);
202
+ @include tag-theme(
203
+ $tag-background-teal,
204
+ $tag-color-teal,
205
+ $tag-hover-teal,
206
+ $tag-border-teal
207
+ );
94
208
  }
95
209
 
96
210
  .#{$prefix}--tag--green {
97
211
  @include tag-theme(
98
212
  $tag-background-green,
99
213
  $tag-color-green,
100
- $tag-hover-green
214
+ $tag-hover-green,
215
+ $tag-border-green
101
216
  );
102
217
  }
103
218
 
104
219
  .#{$prefix}--tag--gray {
105
- @include tag-theme($tag-background-gray, $tag-color-gray, $tag-hover-gray);
220
+ @include tag-theme(
221
+ $tag-background-gray,
222
+ $tag-color-gray,
223
+ $tag-hover-gray,
224
+ $tag-border-gray
225
+ );
106
226
  }
107
227
 
108
228
  .#{$prefix}--tag--cool-gray {
109
229
  @include tag-theme(
110
230
  $tag-background-cool-gray,
111
231
  $tag-color-cool-gray,
112
- $tag-hover-cool-gray
232
+ $tag-hover-cool-gray,
233
+ $tag-border-cool-gray
113
234
  );
114
235
  }
115
236
 
@@ -117,11 +238,12 @@
117
238
  @include tag-theme(
118
239
  $tag-background-warm-gray,
119
240
  $tag-color-warm-gray,
120
- $tag-hover-warm-gray
241
+ $tag-hover-warm-gray,
242
+ $tag-border-warm-gray
121
243
  );
122
244
  }
123
245
 
124
- .#{$prefix}--tag--high-contrast {
246
+ .#{$prefix}--tag--high-contrast:not(.#{$prefix}--tag--operational) {
125
247
  @include tag-theme(
126
248
  $background-inverse,
127
249
  $text-inverse,
@@ -129,10 +251,11 @@
129
251
  );
130
252
  }
131
253
 
132
- .#{$prefix}--tag--outline {
254
+ .#{$prefix}--tag--outline:not(.#{$prefix}--tag--operational) {
133
255
  @include tag-theme($background, $text-primary, $layer-hover);
134
256
 
135
- box-shadow: 0 0 0 1px $background-inverse;
257
+ outline: 1px solid $background-inverse;
258
+ outline-offset: -1px;
136
259
  }
137
260
 
138
261
  .#{$prefix}--tag--disabled,
@@ -147,31 +270,15 @@
147
270
  }
148
271
  }
149
272
 
150
- .#{$prefix}--tag__label {
151
- overflow: hidden;
152
- max-inline-size: 100%;
153
- text-overflow: ellipsis;
154
- white-space: nowrap;
155
- }
156
-
157
- .#{$prefix}--tag--interactive:focus {
158
- box-shadow: inset 0 0 0 1px $focus;
159
- outline: none;
160
- }
161
-
162
- .#{$prefix}--tag--interactive:hover {
163
- cursor: pointer;
164
- }
165
-
166
- // tags used for filtering
167
- .#{$prefix}--tag--filter {
168
- cursor: pointer;
169
- padding-block-end: 0;
170
- padding-block-start: 0;
171
- padding-inline-end: 0;
273
+ .#{$prefix}--tag--selectable.#{$prefix}--tag--disabled,
274
+ .#{$prefix}--tag--operational.#{$prefix}--tag--disabled {
275
+ border: 1px solid $border-disabled;
276
+ background-color: $layer;
277
+ color: $text-disabled;
172
278
 
173
279
  &:hover {
174
- outline: none;
280
+ background-color: $layer;
281
+ cursor: not-allowed;
175
282
  }
176
283
  }
177
284
 
@@ -222,6 +329,7 @@
222
329
  }
223
330
 
224
331
  .#{$prefix}--tag__close-icon:focus {
332
+ z-index: 99999;
225
333
  border-radius: 50%;
226
334
  box-shadow: inset 0 0 0 1px $focus;
227
335
  outline: none;