@carbon/styles 1.39.0-rc.0 → 1.40.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.39.0-rc.0",
4
+ "version": "1.40.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -65,5 +65,5 @@
65
65
  "scss/**/*.css",
66
66
  "css/**/*.css"
67
67
  ],
68
- "gitHead": "39b377be9e59d22de4a45c874227a6e2fe578557"
68
+ "gitHead": "99314f69da3f5791c3c0f46564a47ef9ee7c9e0f"
69
69
  }
@@ -82,27 +82,17 @@ $content-padding: 0 0 0 $spacing-05 !default;
82
82
  padding-inline-end: layout.density('padding-inline');
83
83
  transition: background-color motion(standard, productive) $duration-fast-02;
84
84
 
85
- &:hover::before,
86
- &:focus::before {
87
- position: absolute;
88
- block-size: calc(100% + 2px);
89
- content: '';
90
- inline-size: 100%;
91
- inset-block-start: -1px;
92
- inset-inline-start: 0;
93
- }
94
-
95
- &:hover::before {
85
+ &:hover {
96
86
  background-color: $layer-hover;
97
87
  }
98
88
 
99
89
  &:focus {
90
+ box-shadow: /* Border top */ 0 -1px 0 0 $focus, inset 0 1px 0 0 $focus,
91
+ /* Border right */ inset 2px 0 0 0 $focus,
92
+ /* Border bottom */ 0 1px 0 0 $focus, inset 0 -1px 0 0 $focus,
93
+ /* Border left */ inset -2px 0 0 0 $focus;
100
94
  outline: none;
101
95
  }
102
-
103
- &:focus::before {
104
- @include focus-outline('outline-compat');
105
- }
106
96
  }
107
97
 
108
98
  // Disabled styles
@@ -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
- overflow-x: auto;
229
228
  padding-block-end: convert.to-rem(24px);
230
229
  padding-inline-end: $spacing-08;
231
230
  }
@@ -236,29 +235,18 @@ $copy-btn-feedback: $background-inverse !default;
236
235
  padding-inline-end: 0;
237
236
  }
238
237
 
239
- // expanded pre
240
- .#{$prefix}--snippet--multi.#{$prefix}--snippet--expand
241
- .#{$prefix}--snippet-container
242
- pre {
243
- overflow-x: auto;
244
- }
245
-
246
- .#{$prefix}--snippet--multi.#{$prefix}--snippet--has-right-overflow
247
- .#{$prefix}--snippet-container
248
- pre::after {
238
+ .#{$prefix}--snippet--multi.#{$prefix}--snippet--has-right-overflow::after {
249
239
  position: absolute;
250
240
  background-image: linear-gradient(to right, transparent, $layer);
251
241
  block-size: 100%;
252
242
  content: '';
253
243
  inline-size: convert.to-rem(16px);
254
244
  inset-block-start: 0;
255
- inset-inline-end: 0;
245
+ inset-inline-end: $spacing-05;
256
246
  }
257
247
 
258
248
  [dir='rtl']
259
- .#{$prefix}--snippet--multi.#{$prefix}--snippet--has-right-overflow
260
- .#{$prefix}--snippet-container
261
- pre::after {
249
+ .#{$prefix}--snippet--multi.#{$prefix}--snippet--has-right-overflow::after {
262
250
  background-image: linear-gradient(to left, transparent, $layer);
263
251
  }
264
252
 
@@ -414,9 +402,7 @@ $copy-btn-feedback: $background-inverse !default;
414
402
  }
415
403
 
416
404
  .#{$prefix}--snippet--light.#{$prefix}--snippet--single::after,
417
- .#{$prefix}--snippet--light.#{$prefix}--snippet--multi
418
- .#{$prefix}--snippet-container
419
- pre::after {
405
+ .#{$prefix}--snippet--light.#{$prefix}--snippet--multi::after {
420
406
  // Safari interprets `transparent` differently, so make color token value transparent instead:
421
407
  background-image: linear-gradient(to right, rgba($layer, 0), $layer);
422
408
  }
@@ -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 '../../breakpoint' as *;
7
8
 
8
9
  @use '../../config' as *;
9
10
  @use '../../motion' as *;
@@ -139,7 +140,7 @@
139
140
  display: grid;
140
141
  align-items: center;
141
142
  background-color: $layer;
142
- gap: convert.to-rem(12px) $spacing-05;
143
+ gap: convert.to-rem(12px) 0;
143
144
  grid-auto-rows: auto;
144
145
  grid-template-columns: 1fr auto;
145
146
  margin-block-end: $spacing-03;
@@ -171,15 +172,66 @@
171
172
  text-overflow: ellipsis;
172
173
  white-space: nowrap;
173
174
  }
175
+
176
+ .#{$prefix}--file-filename-container-wrap {
177
+ margin-block-start: 1px;
178
+ max-inline-size: 17.5rem;
179
+ padding-inline-start: $spacing-05;
180
+ @include breakpoint-down(410px) {
181
+ max-inline-size: 13.5rem;
182
+ }
183
+ }
184
+
185
+ .#{$prefix}--file-filename-container-wrap-invalid {
186
+ max-inline-size: 15.5rem;
187
+
188
+ .#{$prefix}--file-filename-tooltip {
189
+ inline-size: -webkit-fill-available;
190
+ padding-inline-start: $spacing-05;
191
+ @-moz-document url-prefix() {
192
+ inline-size: -moz-available;
193
+ }
194
+ }
195
+ }
196
+
197
+ .#{$prefix}--file-filename-tooltip {
198
+ inline-size: -webkit-fill-available;
199
+ @-moz-document url-prefix() {
200
+ inline-size: -moz-available;
201
+ }
202
+ }
203
+
204
+ .#{$prefix}--file-filename-button {
205
+ @include type-style('body-compact-01');
206
+
207
+ overflow: hidden;
208
+ padding: 0;
209
+ border: none;
210
+ background: none;
211
+ color: inherit;
212
+ cursor: pointer;
213
+ font: inherit;
214
+ inline-size: -webkit-fill-available;
215
+ outline: inherit;
216
+ text-overflow: ellipsis;
217
+ white-space: nowrap;
218
+
219
+ @-moz-document url-prefix() {
220
+ inline-size: -moz-available;
221
+ }
222
+ }
223
+ .#{$prefix}--file-filename-button:focus {
224
+ outline: revert;
225
+ }
174
226
  }
175
227
 
176
228
  .#{$prefix}--file__selected-file--md {
177
- gap: $spacing-03 $spacing-05;
229
+ gap: $spacing-03 0;
178
230
  min-block-size: convert.to-rem(40px);
179
231
  }
180
232
 
181
233
  .#{$prefix}--file__selected-file--sm {
182
- gap: $spacing-02 $spacing-05;
234
+ gap: $spacing-02 0;
183
235
  min-block-size: convert.to-rem(32px);
184
236
  }
185
237
 
@@ -259,21 +311,32 @@
259
311
  color: $text-primary;
260
312
  padding-block-end: $spacing-03;
261
313
  }
262
-
263
314
  .#{$prefix}--file__state-container {
264
315
  display: flex;
265
316
  align-items: center;
266
317
  justify-content: center;
267
318
  min-inline-size: 1.5rem;
268
- padding-inline-end: $spacing-05;
319
+ padding-inline-end: convert.to-rem(12px);
269
320
 
270
321
  .#{$prefix}--loading__svg {
271
322
  stroke: $icon-primary;
272
323
  }
273
324
  }
274
325
 
326
+ .#{$prefix}--file__state-container .#{$prefix}--file-loading {
327
+ display: flex;
328
+ align-items: center;
329
+ justify-content: center;
330
+ padding: $spacing-02;
331
+ border: none;
332
+ background-color: transparent;
333
+ block-size: $spacing-05;
334
+ inline-size: $spacing-06;
335
+ }
336
+
275
337
  .#{$prefix}--file__state-container .#{$prefix}--file-complete {
276
338
  fill: $interactive;
339
+ inline-size: $spacing-06;
277
340
 
278
341
  &:focus {
279
342
  @include focus-outline('border');
@@ -405,7 +405,7 @@ $list-box-menu-width: convert.to-rem(300px);
405
405
  block-size: convert.to-rem(24px);
406
406
  cursor: pointer;
407
407
  inline-size: convert.to-rem(24px);
408
- inset-inline-end: $spacing-05;
408
+ inset-inline-end: $spacing-04;
409
409
  outline: none;
410
410
  transition: transform $duration-fast-01 motion(standard, productive);
411
411
  }
@@ -202,8 +202,8 @@
202
202
  font-weight: 400;
203
203
  grid-column: 1/-1;
204
204
  grid-row: 2/-2;
205
- margin-block-end: $spacing-09;
206
205
  overflow-y: auto;
206
+ padding-block-end: $spacing-09;
207
207
  // Required to accommodate focus outline's negative offset:
208
208
  padding-block-start: $spacing-03;
209
209
  // anything besides text/p spans full width, with just 16px padding
@@ -347,22 +347,35 @@
347
347
  // -----------------------------
348
348
  // Modal overflow
349
349
  // -----------------------------
350
+ .#{$prefix}--modal-scroll-content {
351
+ // Required to accommodate focus outline's negative offset when scrolling in Chrome
352
+ border-block-end: 2px solid transparent;
353
+ }
350
354
  // Required so overflow-indicator disappears at end of content
351
355
  .#{$prefix}--modal-scroll-content > *:last-child {
352
- padding-block-end: $spacing-07;
356
+ padding-block-end: $spacing-06;
353
357
  }
354
358
 
355
359
  .#{$prefix}--modal-content--overflow-indicator {
356
360
  position: absolute;
357
- background-image: linear-gradient(to bottom, transparent, $layer);
358
- block-size: convert.to-rem(32px);
359
- content: '';
361
+ background: $layer;
362
+ block-size: convert.to-rem(48px);
360
363
  grid-column: 1/-1;
361
364
  grid-row: 2/-2;
362
- inline-size: 100%;
363
- inset-block-end: $spacing-09;
365
+ inline-size: calc(100% - $spacing-05);
366
+ inset-block-end: 0;
364
367
  inset-inline-start: 0;
365
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
+ }
366
379
  }
367
380
 
368
381
  // Safari-only media query
@@ -379,7 +392,6 @@
379
392
  .#{$prefix}--modal-content:focus
380
393
  ~ .#{$prefix}--modal-content--overflow-indicator {
381
394
  margin: 0 2px 2px;
382
- inline-size: calc(100% - 4px);
383
395
  }
384
396
 
385
397
  @media screen and (-ms-high-contrast: active) {
@@ -58,6 +58,7 @@
58
58
  .#{$prefix}--overflow-menu--sm {
59
59
  block-size: convert.to-rem(32px);
60
60
  inline-size: convert.to-rem(32px);
61
+ min-block-size: convert.to-rem(32px);
61
62
  }
62
63
 
63
64
  .#{$prefix}--overflow-menu--lg {
@@ -17,6 +17,7 @@
17
17
  @use '../../utilities/focus-outline' as *;
18
18
  @use '../../utilities/placeholder-colors' as *;
19
19
  @use '../../utilities/skeleton' as *;
20
+ @use '../../utilities/layout';
20
21
 
21
22
  /// Text area styles
22
23
  /// @access public
@@ -27,7 +28,7 @@
27
28
  @include type-style('body-01');
28
29
  @include focus-outline('reset');
29
30
 
30
- padding: convert.to-rem(11px) $spacing-05;
31
+ padding: convert.to-rem(11px) layout.density('padding-inline');
31
32
  border: none;
32
33
  background-color: $field;
33
34
  block-size: 100%;
@@ -62,6 +63,8 @@
62
63
  }
63
64
 
64
65
  .#{$prefix}--text-area__wrapper {
66
+ @include layout.use('density', $default: 'normal');
67
+
65
68
  position: relative;
66
69
  display: flex;
67
70
  inline-size: 100%;
@@ -71,7 +74,7 @@
71
74
  position: absolute;
72
75
  fill: $support-error;
73
76
  inset-block-start: $spacing-04;
74
- inset-inline-end: $spacing-05;
77
+ inset-inline-end: layout.density('padding-inline');
75
78
  }
76
79
 
77
80
  .#{$prefix}--text-area__invalid-icon--warning {
@@ -193,6 +193,10 @@
193
193
  list-style-type: none;
194
194
  }
195
195
 
196
+ .#{$prefix}--side-nav__divider hr {
197
+ border: none;
198
+ }
199
+
196
200
  //----------------------------------------------------------------------------
197
201
  // Side-nav > Navigation > {Menu,Submenu}
198
202
  //----------------------------------------------------------------------------