@carbon/styles 0.15.1 → 0.16.1

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.
Files changed (37) hide show
  1. package/docs/sass.md +24 -23
  2. package/package.json +5 -5
  3. package/scss/_config.scss +5 -0
  4. package/scss/_reset.scss +1 -1
  5. package/scss/components/breadcrumb/_breadcrumb.scss +4 -0
  6. package/scss/components/code-snippet/_code-snippet.scss +21 -21
  7. package/scss/components/code-snippet/_mixins.scss +2 -1
  8. package/scss/components/combo-box/_combo-box.scss +1 -1
  9. package/scss/components/data-table/_data-table.scss +21 -7
  10. package/scss/components/data-table/action/_data-table-action.scss +17 -19
  11. package/scss/components/data-table/sort/_data-table-sort.scss +1 -0
  12. package/scss/components/date-picker/_date-picker.scss +0 -2
  13. package/scss/components/date-picker/_flatpickr.scss +13 -5
  14. package/scss/components/dropdown/_dropdown.scss +7 -7
  15. package/scss/components/file-uploader/_file-uploader.scss +2 -7
  16. package/scss/components/form/_form.scss +2 -14
  17. package/scss/components/list-box/_list-box.scss +6 -7
  18. package/scss/components/loading/_animation.scss +8 -0
  19. package/scss/components/modal/_modal.scss +4 -0
  20. package/scss/components/number-input/_number-input.scss +0 -14
  21. package/scss/components/overflow-menu/_overflow-menu.scss +4 -7
  22. package/scss/components/pagination/_pagination.scss +4 -0
  23. package/scss/components/pagination-nav/_mixins.scss +5 -1
  24. package/scss/components/pagination-nav/_pagination-nav.scss +4 -4
  25. package/scss/components/progress-bar/_progress-bar.scss +1 -1
  26. package/scss/components/radio-button/_radio-button.scss +4 -3
  27. package/scss/components/search/_search.scss +4 -0
  28. package/scss/components/select/_select.scss +7 -9
  29. package/scss/components/tabs/_tabs.scss +4 -0
  30. package/scss/components/tile/_tile.scss +4 -0
  31. package/scss/components/toggle/_toggle.scss +24 -0
  32. package/scss/{_grid.scss → grid/_config.scss} +3 -7
  33. package/scss/grid/_flexbox.scss +11 -0
  34. package/scss/grid/_index.scss +16 -0
  35. package/scss/{_type.scss → type/_index.scss} +1 -1
  36. package/scss/type/_reset.scss +8 -0
  37. package/scss/utilities/_tooltip.scss +4 -0
package/docs/sass.md CHANGED
@@ -122,28 +122,45 @@ to `false`:
122
122
 
123
123
  ## Grid
124
124
 
125
- | Import | Filepath |
126
- | :--------------------------------- | :---------------- |
127
- | `@use '@carbon/styles/scss/grid';` | `scss/_grid.scss` |
125
+ | Import | Filepath |
126
+ | :----------------------------------------- | :------------------------ |
127
+ | `@use '@carbon/styles/scss/grid';` | `scss/grid/_index.scss` |
128
+ | `@use '@carbon/styles/scss/grid/flexbox';` | `scss/grid/_flexbox.scss` |
128
129
 
129
130
  ### Using the grid
130
131
 
131
132
  This package `@forward`s the styles defined in the
132
133
  [`@carbon/grid`](https://github.com/carbon-design-system/carbon/tree/main/packages/grid)
133
- package. The full source for Carbon grid styles can be found there alongside
134
- more comprehensive documentation on package contents, configuration, and usage.
134
+ package. For full documentation, visit the
135
+ [Sass Documentation](../../grid/docs/sass.md) for the package.
135
136
 
136
137
  To use the grid via `@carbon/styles`, it must be brought in directly or the grid
137
138
  specific style sheet must be imported:
138
139
 
139
140
  ```scss
140
- /* All the grid styles are included through this central entrypoint */
141
+ // All the grid styles are included through this central entrypoint
141
142
  @use '@carbon/styles';
142
143
 
143
- /* Alternatively, the grid styles can be brought in on their own */
144
+ // Alternatively, the grid styles can be brought in on their own
144
145
  @use '@carbon/styles/scss/grid';
145
146
  ```
146
147
 
148
+ By default, the emitted grid will be a CSS Grid based implementation. If you
149
+ prefer to use flexbox version, you can configure the package by writing the
150
+ following:
151
+
152
+ ```scss
153
+ @use '@carbon/styles' with (
154
+ $use-flexbox-grid: true,
155
+ );
156
+ ```
157
+
158
+ Or you can import the flexbox grid directly:
159
+
160
+ ```scss
161
+ @use '@carbon/styles/scss/grid/flexbox';
162
+ ```
163
+
147
164
  ### Classes provided
148
165
 
149
166
  In either case, you will then have access to the grid classes and mixins
@@ -172,22 +189,6 @@ prefix:
172
189
  </div>
173
190
  ```
174
191
 
175
- ### Grid Mixins
176
-
177
- In the event that you'd like to configure your own classes for portions of the
178
- grid, there are a few mixins that can be used.
179
-
180
- - `css-grid()` provides the base grid definition
181
- - `subgrid()` provides the subgrid definition
182
- - `carbon--aspect-ratio($aspect-ratios: $carbon--aspect-ratios)` generates the
183
- CSS classname utilities for the aspect ratios
184
-
185
- ```scss
186
- .custom-grid-class {
187
- @include css-grid();
188
- }
189
- ```
190
-
191
192
  ## Motion
192
193
 
193
194
  The motion package provides helper functions, mixins, and duration tokens to add
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": "0.15.1",
4
+ "version": "0.16.1",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -22,16 +22,16 @@
22
22
  "dependencies": {
23
23
  "@carbon/colors": "^10.37.0",
24
24
  "@carbon/feature-flags": "^0.7.0",
25
- "@carbon/grid": "^10.42.0",
25
+ "@carbon/grid": "^10.43.0",
26
26
  "@carbon/layout": "^10.37.0",
27
27
  "@carbon/motion": "^10.29.0",
28
- "@carbon/themes": "^10.52.0",
29
- "@carbon/type": "^10.42.0",
28
+ "@carbon/themes": "^10.53.1",
29
+ "@carbon/type": "^10.43.1",
30
30
  "@ibm/plex": "6.0.0-next.6"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@carbon/test-utils": "^10.21.0",
34
34
  "css": "^3.0.0"
35
35
  },
36
- "gitHead": "1069a16ffb50905034b9ef3640fd4d098a37437f"
36
+ "gitHead": "e2c445f242cdd201c73e55dc10a998f3dec73ec4"
37
37
  }
package/scss/_config.scss CHANGED
@@ -54,3 +54,8 @@ $prefix: 'cds' !default;
54
54
  /// @access public
55
55
  /// @group @carbon/grid
56
56
  $flex-grid-columns: 16 !default;
57
+
58
+ /// Specify if the default grid type should be the flexbox grid
59
+ /// @type Boolean
60
+ /// @group config
61
+ $use-flexbox-grid: false !default;
package/scss/_reset.scss CHANGED
@@ -6,7 +6,7 @@
6
6
  //
7
7
 
8
8
  @use 'config';
9
- @use 'type';
9
+ @use 'type/reset' as type;
10
10
 
11
11
  @mixin reset {
12
12
  /// http://meyerweb.com/eric/tools/css/reset/
@@ -97,6 +97,10 @@
97
97
  content: '';
98
98
  opacity: 0;
99
99
  transition: opacity $duration-fast-01 motion(standard, productive);
100
+
101
+ @media screen and (prefers-reduced-motion: reduce) {
102
+ transition: none;
103
+ }
100
104
  }
101
105
  }
102
106
 
@@ -68,17 +68,17 @@ $copy-btn-feedback: $background-inverse !default;
68
68
  display: inline;
69
69
  padding: 0;
70
70
  border: 2px solid transparent;
71
- background-color: $field;
71
+ background-color: $layer;
72
72
  border-radius: 4px;
73
73
  color: $text-primary;
74
74
  cursor: pointer;
75
75
 
76
76
  &:hover {
77
- background-color: $layer-accent;
77
+ background-color: $layer-hover;
78
78
  }
79
79
 
80
80
  &:active {
81
- background-color: $copy-active;
81
+ background-color: $layer-active;
82
82
  }
83
83
 
84
84
  &:focus {
@@ -131,13 +131,13 @@ $copy-btn-feedback: $background-inverse !default;
131
131
  display: inline-block;
132
132
 
133
133
  &:hover {
134
- background-color: $field;
134
+ background-color: $layer;
135
135
  cursor: auto;
136
136
  }
137
137
  }
138
138
 
139
139
  .#{$prefix}--snippet--light.#{$prefix}--snippet--inline.#{$prefix}--snippet--no-copy:hover {
140
- background-color: $field-02;
140
+ background-color: $layer-hover;
141
141
  cursor: auto;
142
142
  }
143
143
 
@@ -241,7 +241,7 @@ $copy-btn-feedback: $background-inverse !default;
241
241
  width: rem(16px);
242
242
  height: 100%;
243
243
  // Safari interprets `transparent` differently, so make color token value transparent instead:
244
- background-image: linear-gradient(to right, rgba($field, 0), $field);
244
+ background-image: linear-gradient(to right, rgba($layer, 0), $layer);
245
245
  content: '';
246
246
  }
247
247
 
@@ -271,7 +271,7 @@ $copy-btn-feedback: $background-inverse !default;
271
271
  justify-content: center;
272
272
  padding: 0;
273
273
  border: none;
274
- background-color: $field;
274
+ background-color: $layer;
275
275
  cursor: pointer;
276
276
  outline: none;
277
277
 
@@ -290,7 +290,7 @@ $copy-btn-feedback: $background-inverse !default;
290
290
  }
291
291
 
292
292
  .#{$prefix}--snippet-button:hover {
293
- background: $field-hover;
293
+ background: $layer-hover;
294
294
  }
295
295
 
296
296
  .#{$prefix}--snippet-button:active {
@@ -340,7 +340,7 @@ $copy-btn-feedback: $background-inverse !default;
340
340
 
341
341
  padding: $spacing-03 $spacing-05;
342
342
  border: 0;
343
- background-color: $field;
343
+ background-color: $layer;
344
344
  color: $text-primary;
345
345
  }
346
346
 
@@ -361,12 +361,12 @@ $copy-btn-feedback: $background-inverse !default;
361
361
  }
362
362
 
363
363
  .#{$prefix}--snippet-btn--expand:hover {
364
- background: $field-hover;
364
+ background: $layer-hover;
365
365
  color: $text-primary;
366
366
  }
367
367
 
368
368
  .#{$prefix}--snippet-btn--expand:active {
369
- background-color: $copy-active;
369
+ background-color: $layer-active;
370
370
  }
371
371
 
372
372
  .#{$prefix}--snippet-btn--expand:focus {
@@ -387,7 +387,7 @@ $copy-btn-feedback: $background-inverse !default;
387
387
  .#{$prefix}--snippet--light .#{$prefix}--snippet-button,
388
388
  .#{$prefix}--snippet--light .#{$prefix}--btn.#{$prefix}--snippet-btn--expand,
389
389
  .#{$prefix}--snippet--light .#{$prefix}--copy-btn {
390
- background-color: $field-02;
390
+ background-color: $layer;
391
391
  }
392
392
 
393
393
  .#{$prefix}--snippet--light.#{$prefix}--snippet--inline:hover,
@@ -395,7 +395,7 @@ $copy-btn-feedback: $background-inverse !default;
395
395
  .#{$prefix}--snippet--light
396
396
  .#{$prefix}--btn.#{$prefix}--snippet-btn--expand:hover,
397
397
  .#{$prefix}--snippet--light .#{$prefix}--copy-btn:hover {
398
- background-color: $layer-hover-02;
398
+ background-color: $layer-hover;
399
399
  }
400
400
 
401
401
  .#{$prefix}--snippet--light.#{$prefix}--snippet--inline:active,
@@ -403,7 +403,7 @@ $copy-btn-feedback: $background-inverse !default;
403
403
  .#{$prefix}--snippet--light
404
404
  .#{$prefix}--btn.#{$prefix}--snippet-btn--expand:active,
405
405
  .#{$prefix}--snippet--light .#{$prefix}--copy-btn:active {
406
- background-color: $layer-active-02;
406
+ background-color: $layer-active;
407
407
  }
408
408
 
409
409
  .#{$prefix}--snippet--light.#{$prefix}--snippet--single::after,
@@ -411,7 +411,7 @@ $copy-btn-feedback: $background-inverse !default;
411
411
  .#{$prefix}--snippet-container
412
412
  pre::after {
413
413
  // Safari interprets `transparent` differently, so make color token value transparent instead:
414
- background-image: linear-gradient(to right, rgba($field-02, 0), $field-02);
414
+ background-image: linear-gradient(to right, rgba($layer, 0), $layer);
415
415
  }
416
416
 
417
417
  // Skeleton State
@@ -469,13 +469,13 @@ $copy-btn-feedback: $background-inverse !default;
469
469
  .#{$prefix}--snippet__overflow-indicator--left {
470
470
  order: 0;
471
471
  margin-right: -$spacing-05;
472
- background-image: linear-gradient(to left, transparent, $field);
472
+ background-image: linear-gradient(to left, transparent, $layer);
473
473
  }
474
474
 
475
475
  .#{$prefix}--snippet__overflow-indicator--right {
476
476
  order: 2;
477
477
  margin-left: -$spacing-05;
478
- background-image: linear-gradient(to right, transparent, $field);
478
+ background-image: linear-gradient(to right, transparent, $layer);
479
479
  }
480
480
 
481
481
  .#{$prefix}--snippet--single .#{$prefix}--snippet__overflow-indicator--right,
@@ -507,11 +507,11 @@ $copy-btn-feedback: $background-inverse !default;
507
507
  }
508
508
 
509
509
  .#{$prefix}--snippet--light .#{$prefix}--snippet__overflow-indicator--left {
510
- background-image: linear-gradient(to left, transparent, $field-02);
510
+ background-image: linear-gradient(to left, transparent, $layer);
511
511
  }
512
512
 
513
513
  .#{$prefix}--snippet--light .#{$prefix}--snippet__overflow-indicator--right {
514
- background-image: linear-gradient(to right, transparent, $field-02);
514
+ background-image: linear-gradient(to right, transparent, $layer);
515
515
  }
516
516
 
517
517
  // Safari-only media query
@@ -520,11 +520,11 @@ $copy-btn-feedback: $background-inverse !default;
520
520
  @media not all and (min-resolution: 0.001dpcm) {
521
521
  @supports (-webkit-appearance: none) and (stroke-color: transparent) {
522
522
  .#{$prefix}--snippet__overflow-indicator--left {
523
- background-image: linear-gradient(to left, rgba($field, 0), $field);
523
+ background-image: linear-gradient(to left, rgba($layer, 0), $layer);
524
524
  }
525
525
 
526
526
  .#{$prefix}--snippet__overflow-indicator--right {
527
- background-image: linear-gradient(to right, rgba($field, 0), $field);
527
+ background-image: linear-gradient(to right, rgba($layer, 0), $layer);
528
528
  }
529
529
  }
530
530
  }
@@ -7,6 +7,7 @@
7
7
 
8
8
  @use '../../theme' as *;
9
9
  @use '../../type' as *;
10
+ @use '../../utilities/convert' as *;
10
11
 
11
12
  /// Code snippet base styles
12
13
  /// @access private
@@ -17,5 +18,5 @@
17
18
  position: relative;
18
19
  width: 100%;
19
20
  max-width: rem(768px);
20
- background-color: $field;
21
+ background-color: $layer;
21
22
  }
@@ -19,7 +19,7 @@
19
19
 
20
20
  // V11: Possibly deprecate
21
21
  .#{$prefix}--combo-box.#{$prefix}--list-box--light:hover {
22
- background-color: $field-02;
22
+ background-color: $field;
23
23
  }
24
24
 
25
25
  .#{$prefix}--combo-box .#{$prefix}--text-input::-ms-clear {
@@ -100,17 +100,30 @@
100
100
  color: $text-primary;
101
101
  }
102
102
 
103
- .#{$prefix}--data-table tbody tr:hover td .#{$prefix}--link,
104
- .#{$prefix}--data-table tbody tr:hover th .#{$prefix}--link {
103
+ .#{$prefix}--data-table tr:hover .#{$prefix}--link {
105
104
  color: $link-secondary;
106
105
  }
107
106
 
107
+ .#{$prefix}--data-table tr:hover .#{$prefix}--link--disabled {
108
+ color: $text-disabled;
109
+ }
110
+
108
111
  .#{$prefix}--data-table th,
109
112
  .#{$prefix}--data-table td {
110
113
  text-align: left;
111
114
  vertical-align: middle;
112
115
  }
113
116
 
117
+ .#{$prefix}--data-table th[align='right'],
118
+ .#{$prefix}--data-table td[align='right'] {
119
+ text-align: right;
120
+ }
121
+
122
+ .#{$prefix}--data-table th[align='center'],
123
+ .#{$prefix}--data-table td[align='center'] {
124
+ text-align: center;
125
+ }
126
+
114
127
  .#{$prefix}--data-table th {
115
128
  padding-right: $spacing-05;
116
129
  padding-left: $spacing-05;
@@ -238,7 +251,8 @@
238
251
  }
239
252
  }
240
253
 
241
- .#{$prefix}--data-table--selected .#{$prefix}--link {
254
+ .#{$prefix}--data-table--selected
255
+ .#{$prefix}--link:not(.#{$prefix}--link--disabled) {
242
256
  color: $link-secondary;
243
257
  }
244
258
 
@@ -403,10 +417,6 @@
403
417
  padding-top: $spacing-05;
404
418
  }
405
419
 
406
- .#{$prefix}--date-table tbody th.#{$prefix}--table-column-checkbox:hover {
407
- background: $data-table-column-hover;
408
- }
409
-
410
420
  //----------------------------------------------------------------------------
411
421
  // Radio
412
422
  //----------------------------------------------------------------------------
@@ -725,6 +735,10 @@
725
735
  width: auto;
726
736
  }
727
737
 
738
+ .#{$prefix}--data-table-container--static {
739
+ width: fit-content;
740
+ }
741
+
728
742
  // -------------
729
743
  // Sticky header
730
744
  // -------------
@@ -26,9 +26,8 @@
26
26
  // Need for batch actions
27
27
  position: relative;
28
28
  display: flex;
29
- overflow: hidden;
30
29
  width: 100%;
31
- height: $spacing-09;
30
+ min-height: $spacing-09;
32
31
  background-color: $layer;
33
32
  }
34
33
 
@@ -375,17 +374,14 @@
375
374
  //-------------------------------------------------
376
375
  .#{$prefix}--batch-actions {
377
376
  position: absolute;
378
- top: 0;
377
+ right: 0;
378
+ bottom: 0;
379
379
  left: 0;
380
380
  display: flex;
381
- width: 100%;
382
- height: 100%;
383
381
  align-items: center;
384
- padding-right: $spacing-06;
385
- padding-left: $spacing-06;
382
+ justify-content: space-between;
386
383
  background-color: $background-brand;
387
384
  clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
388
- overflow-x: auto;
389
385
  pointer-events: none;
390
386
  transform: translate3d(0, 48px, 0);
391
387
  transition: transform $duration-fast-02 motion(standard, productive),
@@ -399,6 +395,7 @@
399
395
  }
400
396
 
401
397
  .#{$prefix}--batch-actions--active {
398
+ overflow: auto hidden;
402
399
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
403
400
  pointer-events: all;
404
401
  transform: translate3d(0, 0, 0);
@@ -406,15 +403,14 @@
406
403
 
407
404
  //btns container
408
405
  .#{$prefix}--action-list {
409
- position: absolute;
410
- right: 0;
411
406
  display: flex;
407
+ align-items: center;
412
408
  }
413
409
 
414
410
  .#{$prefix}--action-list .#{$prefix}--btn {
415
- min-width: 0;
416
411
  padding: $button-padding-ghost;
417
412
  color: $text-on-color;
413
+ white-space: nowrap;
418
414
  }
419
415
 
420
416
  .#{$prefix}--action-list .#{$prefix}--btn:disabled {
@@ -479,22 +475,24 @@
479
475
  transition: opacity $transition-base $standard-easing;
480
476
  }
481
477
 
482
- // cancel btn
483
- .#{$prefix}--batch-summary__cancel {
484
- position: relative;
485
- padding-right: $spacing-05;
486
- }
487
-
488
478
  // items selected text
489
479
  .#{$prefix}--batch-summary {
490
- position: absolute;
480
+ position: sticky;
481
+ z-index: 100000;
491
482
  left: 0;
492
483
  display: flex;
484
+ min-height: 3rem;
493
485
  align-items: center;
494
- margin-left: $spacing-05;
486
+ padding: 0 $spacing-05;
487
+ background-color: $background-brand;
488
+
495
489
  color: $text-on-color;
496
490
  }
497
491
 
492
+ .#{$prefix}--batch-summary__scroll {
493
+ box-shadow: 0.5px 0 0.2px $link-primary-hover;
494
+ }
495
+
498
496
  .#{$prefix}--batch-summary__para {
499
497
  @include type-style('body-compact-01');
500
498
  }
@@ -45,6 +45,7 @@
45
45
  color: $text-primary;
46
46
  font: inherit;
47
47
  line-height: 1;
48
+ text-align: left;
48
49
  transition: background-color $duration-fast-01 motion(entrance, productive),
49
50
  outline $duration-fast-01 motion(entrance, productive);
50
51
  }
@@ -125,8 +125,6 @@
125
125
  }
126
126
 
127
127
  // Size variant styles
128
- // TODO V11: Remove xl selector
129
- .#{$prefix}--date-picker__input--xl,
130
128
  .#{$prefix}--date-picker__input--lg {
131
129
  height: rem(48px);
132
130
  }
@@ -138,6 +138,10 @@
138
138
 
139
139
  .flatpickr-calendar.animate.open {
140
140
  animation: fp-fade-in-down $duration-fast-02 motion(entrance, productive);
141
+
142
+ @media screen and (prefers-reduced-motion: reduce) {
143
+ animation: none;
144
+ }
141
145
  }
142
146
 
143
147
  .flatpickr-calendar.inline {
@@ -230,8 +234,12 @@
230
234
  // Windows HCM fix
231
235
  @include high-contrast-mode('icon-fill');
232
236
 
237
+ @media screen and (prefers-reduced-motion: reduce) {
238
+ transition: none;
239
+ }
240
+
233
241
  &:hover {
234
- background-color: $background-hover;
242
+ background-color: $layer-hover;
235
243
  }
236
244
  }
237
245
 
@@ -261,7 +269,7 @@
261
269
  margin-left: $spacing-02;
262
270
 
263
271
  &:hover {
264
- background-color: $background-hover;
272
+ background-color: $layer-hover;
265
273
  }
266
274
  }
267
275
 
@@ -313,7 +321,7 @@
313
321
  border-bottom: 0;
314
322
 
315
323
  &::after {
316
- border-bottom: rem(4px) solid $border-subtle;
324
+ border-bottom: rem(4px) solid $icon-primary;
317
325
  }
318
326
  }
319
327
 
@@ -321,7 +329,7 @@
321
329
  top: rem(11px);
322
330
 
323
331
  &::after {
324
- border-top: rem(4px) solid $border-subtle;
332
+ border-top: rem(4px) solid $icon-primary;
325
333
  }
326
334
  }
327
335
 
@@ -437,7 +445,7 @@
437
445
  transition: all $duration-fast-01 motion(standard, productive);
438
446
 
439
447
  &:hover {
440
- background: $background-hover;
448
+ background: $layer-hover;
441
449
  }
442
450
 
443
451
  &:focus {
@@ -132,10 +132,10 @@
132
132
 
133
133
  // V11: Possibly deprecate
134
134
  .#{$prefix}--dropdown--light {
135
- background-color: $field-02;
135
+ background-color: $field;
136
136
 
137
137
  &:hover {
138
- background-color: $layer-hover-02;
138
+ background-color: $field-hover;
139
139
  }
140
140
  }
141
141
 
@@ -202,7 +202,7 @@
202
202
 
203
203
  // V11: Possibly deprecate
204
204
  .#{$prefix}--dropdown--light .#{$prefix}--dropdown-list {
205
- background-color: $field-02;
205
+ background-color: $layer;
206
206
  }
207
207
 
208
208
  .#{$prefix}--dropdown:not(.#{$prefix}--dropdown--open)
@@ -354,7 +354,7 @@
354
354
 
355
355
  // V11: Possibly deprecate
356
356
  &.#{$prefix}--dropdown--light:hover {
357
- background-color: $field-02;
357
+ background-color: $field;
358
358
  }
359
359
  }
360
360
 
@@ -377,7 +377,7 @@
377
377
  transition: background $duration-fast-01 motion(entrance, productive);
378
378
 
379
379
  &:hover {
380
- background-color: $field-hover;
380
+ background-color: $layer-hover;
381
381
  }
382
382
 
383
383
  &.#{$prefix}--dropdown--disabled {
@@ -433,11 +433,11 @@
433
433
 
434
434
  .#{$prefix}--dropdown--show-selected .#{$prefix}--dropdown--selected {
435
435
  display: block;
436
- background-color: $layer-hover;
436
+ background-color: $layer-selected;
437
437
  color: $text-primary;
438
438
 
439
439
  &:hover {
440
- background-color: $layer-selected;
440
+ background-color: $layer-selected-hover;
441
441
  }
442
442
 
443
443
  .#{$prefix}--dropdown-link {
@@ -10,6 +10,7 @@
10
10
  @use '../../spacing' as *;
11
11
  @use '../../theme' as *;
12
12
  @use '../../type' as *;
13
+
13
14
  @use '../../utilities/convert' as *;
14
15
  @use '../../utilities/focus-outline' as *;
15
16
  @use '../../utilities/high-contrast-mode' as *;
@@ -170,8 +171,6 @@
170
171
  }
171
172
  }
172
173
 
173
- // V11: Remove --field
174
- .#{$prefix}--file__selected-file--field,
175
174
  .#{$prefix}--file__selected-file--md {
176
175
  min-height: rem(40px);
177
176
  gap: $spacing-03 $spacing-05;
@@ -202,8 +201,6 @@
202
201
  padding: $spacing-02 0;
203
202
  }
204
203
 
205
- // V11: Remove --field
206
- .#{$prefix}--file__selected-file--invalid.#{$prefix}--file__selected-file--field,
207
204
  .#{$prefix}--file__selected-file--invalid.#{$prefix}--file__selected-file--md {
208
205
  padding: $spacing-03 0;
209
206
  }
@@ -218,9 +215,6 @@
218
215
  padding-top: rem(7px);
219
216
  }
220
217
 
221
- // V11: Remove --field
222
- .#{$prefix}--file__selected-file--invalid.#{$prefix}--file__selected-file--field
223
- .#{$prefix}--form-requirement,
224
218
  .#{$prefix}--file__selected-file--invalid.#{$prefix}--file__selected-file--md
225
219
  .#{$prefix}--form-requirement {
226
220
  padding-top: rem(11px);
@@ -330,6 +324,7 @@
330
324
  justify-content: space-between;
331
325
  padding: $spacing-05;
332
326
  border: 1px dashed $border-strong;
327
+ @include type-style('body-compact-01');
333
328
  }
334
329
 
335
330
  .#{$prefix}--file__drop-container--drag-over {
@@ -21,16 +21,6 @@ $input-label-weight: 400 !default;
21
21
  @mixin form {
22
22
  .#{$prefix}--fieldset {
23
23
  @include reset;
24
-
25
- @if not enabled('enable-v11-release') {
26
- margin-bottom: $spacing-07;
27
- }
28
- }
29
-
30
- @if not enabled('enable-v11-release') {
31
- .#{$prefix}--fieldset--no-margin {
32
- margin-bottom: 0;
33
- }
34
24
  }
35
25
 
36
26
  .#{$prefix}--form-item {
@@ -57,10 +47,8 @@ $input-label-weight: 400 !default;
57
47
  vertical-align: baseline;
58
48
  }
59
49
 
60
- @if enabled('enable-v11-release') {
61
- .#{$prefix}--label--no-margin {
62
- margin-bottom: 0;
63
- }
50
+ .#{$prefix}--label--no-margin {
51
+ margin-bottom: 0;
64
52
  }
65
53
 
66
54
  .#{$prefix}--label .#{$prefix}--tooltip__trigger {
@@ -156,13 +156,13 @@ $list-box-menu-width: rem(300px);
156
156
  background-color: $field;
157
157
 
158
158
  &:hover {
159
- background-color: $layer-hover;
159
+ background-color: $field-hover;
160
160
  }
161
161
  }
162
162
 
163
163
  // V11: Possibly deprecate
164
164
  .#{$prefix}--list-box--light .#{$prefix}--list-box__menu {
165
- background: $field;
165
+ background: $layer;
166
166
  }
167
167
 
168
168
  // V11: Possibly deprecate
@@ -237,7 +237,7 @@ $list-box-menu-width: rem(300px);
237
237
  background-color: transparent;
238
238
 
239
239
  &:hover {
240
- background-color: $field-hover;
240
+ background-color: $layer-hover;
241
241
  }
242
242
  }
243
243
 
@@ -477,7 +477,7 @@ $list-box-menu-width: rem(300px);
477
477
  }
478
478
 
479
479
  .#{$prefix}--list-box--disabled .#{$prefix}--list-box__selection--multi {
480
- @include tag-theme($text-disabled, $field);
480
+ @include tag-theme($text-disabled, $layer);
481
481
 
482
482
  > svg {
483
483
  fill: $icon-disabled;
@@ -701,7 +701,7 @@ $list-box-menu-width: rem(300px);
701
701
 
702
702
  .#{$prefix}--list-box__menu-item--highlighted {
703
703
  border-color: transparent;
704
- background-color: $layer-hover;
704
+ background-color: $layer-selected;
705
705
  color: $text-primary;
706
706
  }
707
707
 
@@ -730,8 +730,7 @@ $list-box-menu-width: rem(300px);
730
730
  background-color: $layer-selected;
731
731
  }
732
732
 
733
- .#{$prefix}--list-box__menu-item--active:hover,
734
- .#{$prefix}--list-box__menu-item--active.#{$prefix}--list-box__menu-item--highlighted {
733
+ .#{$prefix}--list-box__menu-item--active:hover {
735
734
  border-bottom-color: $layer-selected-hover;
736
735
  background-color: $layer-selected-hover;
737
736
  }
@@ -20,6 +20,10 @@
20
20
  animation-duration: 10ms;
21
21
  animation-name: init-stroke;
22
22
  animation-timing-function: motion.$standard-easing;
23
+
24
+ @media screen and (prefers-reduced-motion: reduce) {
25
+ animation: none;
26
+ }
23
27
  }
24
28
  }
25
29
 
@@ -35,5 +39,9 @@
35
39
  animation-fill-mode: forwards;
36
40
  animation-name: stroke-end;
37
41
  animation-timing-function: motion.$ease-out;
42
+
43
+ @media screen and (prefers-reduced-motion: reduce) {
44
+ animation: none;
45
+ }
38
46
  }
39
47
  }
@@ -45,6 +45,10 @@
45
45
  transition: opacity $duration-moderate-02 motion(entrance, expressive),
46
46
  visibility 0ms linear;
47
47
  visibility: inherit;
48
+
49
+ @media screen and (prefers-reduced-motion: reduce) {
50
+ transition: none;
51
+ }
48
52
  }
49
53
 
50
54
  // V11: Question for design: do we have an updated tokens for fields that exist on `layer`?
@@ -79,8 +79,6 @@
79
79
  }
80
80
  }
81
81
 
82
- // TODO V11: Remove xl selector
83
- .#{$prefix}--number--xl.#{$prefix}--number input[type='number'],
84
82
  .#{$prefix}--number--lg.#{$prefix}--number input[type='number'] {
85
83
  padding-right: rem(144px);
86
84
  }
@@ -307,8 +305,6 @@
307
305
  fill: $support-error;
308
306
  }
309
307
 
310
- // TODO V11: Remove xl selector
311
- .#{$prefix}--number--xl .#{$prefix}--number__invalid,
312
308
  .#{$prefix}--number--lg .#{$prefix}--number__invalid {
313
309
  right: rem(112px);
314
310
  }
@@ -322,10 +318,6 @@
322
318
  right: rem(80px);
323
319
  }
324
320
 
325
- // TODO V11: Remove xl selector
326
- .#{$prefix}--number--xl
327
- .#{$prefix}--number__invalid
328
- + .#{$prefix}--number__rule-divider,
329
321
  .#{$prefix}--number--lg
330
322
  .#{$prefix}--number__invalid
331
323
  + .#{$prefix}--number__rule-divider {
@@ -391,20 +383,14 @@
391
383
  }
392
384
 
393
385
  // Size Variant styles
394
- // TODO V11: Remove xl selector
395
- .#{$prefix}--number--xl input[type='number'],
396
386
  .#{$prefix}--number--lg input[type='number'] {
397
387
  height: rem(48px);
398
388
  }
399
389
 
400
- // TODO V11: Remove xl selector
401
- .#{$prefix}--number--xl .#{$prefix}--number__controls,
402
390
  .#{$prefix}--number--lg .#{$prefix}--number__controls {
403
391
  width: rem(96px);
404
392
  }
405
393
 
406
- // TODO V11: Remove xl selector
407
- .#{$prefix}--number--xl .#{$prefix}--number__control-btn,
408
394
  .#{$prefix}--number--lg .#{$prefix}--number__control-btn {
409
395
  width: rem(48px);
410
396
 
@@ -52,8 +52,6 @@
52
52
  height: rem(32px);
53
53
  }
54
54
 
55
- // TODO V11: Remove xl selector
56
- .#{$prefix}--overflow-menu--xl,
57
55
  .#{$prefix}--overflow-menu--lg {
58
56
  width: rem(48px);
59
57
  height: rem(48px);
@@ -111,6 +109,10 @@
111
109
  content: '';
112
110
  transition: background-color $duration-fast-02
113
111
  motion(entrance, productive);
112
+
113
+ @media screen and (prefers-reduced-motion: reduce) {
114
+ transition: none;
115
+ }
114
116
  }
115
117
  }
116
118
 
@@ -170,8 +172,6 @@
170
172
  }
171
173
  }
172
174
 
173
- // TODO V11: Remove xl selector
174
- .#{$prefix}--overflow-menu-options--xl.#{$prefix}--overflow-menu-options,
175
175
  .#{$prefix}--overflow-menu-options--lg.#{$prefix}--overflow-menu-options {
176
176
  &[data-floating-menu-direction='bottom']::after,
177
177
  &[data-floating-menu-direction='top']::after {
@@ -221,9 +221,6 @@
221
221
  height: rem(32px);
222
222
  }
223
223
 
224
- // TODO V11: Remove xl selector
225
- .#{$prefix}--overflow-menu-options--xl
226
- .#{$prefix}--overflow-menu-options__option,
227
224
  .#{$prefix}--overflow-menu-options--lg
228
225
  .#{$prefix}--overflow-menu-options__option {
229
226
  height: rem(48px);
@@ -182,6 +182,10 @@
182
182
 
183
183
  span.#{$prefix}--pagination__text {
184
184
  margin-left: $spacing-05;
185
+ color: $text-primary;
186
+ }
187
+
188
+ span.#{$prefix}--pagination__text.#{$prefix}--pagination__items-count {
185
189
  color: $text-secondary;
186
190
  }
187
191
 
@@ -22,10 +22,14 @@
22
22
  display: block;
23
23
  width: 0;
24
24
  height: $spacing-02;
25
- background-color: $background-brand;
25
+ background-color: $border-interactive;
26
26
  content: '';
27
27
  opacity: 0;
28
28
  transition: width $duration-fast-02 motion(standard, productive);
29
+
30
+ @media screen and (prefers-reduced-motion: reduce) {
31
+ transition: none;
32
+ }
29
33
  }
30
34
  }
31
35
 
@@ -32,8 +32,8 @@
32
32
  /// @param {Number} $select-icon-top-position [$spacing-05]
33
33
  /// @param {Number} $select-icon-left-position [$spacing-05]
34
34
  @mixin pagination-nav(
35
- $color: $text-secondary,
36
- $text-color-active: $text-secondary,
35
+ $color: $text-primary,
36
+ $text-color-active: $text-primary,
37
37
  $background-color-hover: $background-hover,
38
38
  $background-color-active: initial,
39
39
  $font-weight: 400,
@@ -78,7 +78,7 @@
78
78
  min-width: $button-min-width;
79
79
  padding: $button-padding;
80
80
  border-radius: 0;
81
- color: $text-secondary;
81
+ color: $text-primary;
82
82
  font-weight: $font-weight;
83
83
  line-height: 1;
84
84
  outline: 0;
@@ -90,7 +90,7 @@
90
90
 
91
91
  &:hover {
92
92
  background-color: $background-color-hover;
93
- color: $text-secondary;
93
+ color: $text-primary;
94
94
  }
95
95
 
96
96
  &:focus {
@@ -45,7 +45,7 @@
45
45
  height: 100%;
46
46
  background-color: $interactive;
47
47
  transform: scaleX(0);
48
- transform-origin: 0 50%;
48
+ transform-origin: 0 center #{'/*rtl:100% center*/'};
49
49
  transition: transform $duration-fast-02 motion(standard, productive);
50
50
  }
51
51
 
@@ -123,7 +123,7 @@ $radio-border-width: 1px !default;
123
123
  }
124
124
 
125
125
  .#{$prefix}--radio-button:disabled + .#{$prefix}--radio-button__label {
126
- color: $button-disabled;
126
+ color: $text-disabled;
127
127
  cursor: not-allowed;
128
128
  }
129
129
 
@@ -133,10 +133,11 @@ $radio-border-width: 1px !default;
133
133
  .#{$prefix}--radio-button:disabled:checked
134
134
  + .#{$prefix}--radio-button__label
135
135
  .#{$prefix}--radio-button__appearance {
136
- border-color: $border-disabled;
136
+ // Disabled radio button, checkbox fix #10913
137
+ border-color: $icon-disabled;
137
138
 
138
139
  &::before {
139
- background-color: $button-disabled;
140
+ background-color: $text-disabled;
140
141
  }
141
142
  }
142
143
 
@@ -151,6 +151,10 @@
151
151
  content: '';
152
152
  transition: background-color $duration-fast-02
153
153
  motion(standard, productive);
154
+
155
+ @media screen and (prefers-reduced-motion: reduce) {
156
+ transition: none;
157
+ }
154
158
  }
155
159
 
156
160
  &:hover {
@@ -62,7 +62,7 @@
62
62
  transition: outline $duration-fast-01 motion(standard, productive);
63
63
 
64
64
  &:hover {
65
- background-color: $background-hover;
65
+ background-color: $field-hover;
66
66
  }
67
67
 
68
68
  // Hide default select arrow in IE10+
@@ -89,7 +89,7 @@
89
89
 
90
90
  &:disabled,
91
91
  &:hover:disabled {
92
- border-bottom-color: $border-disabled;
92
+ border-bottom-color: transparent;
93
93
  background-color: $field;
94
94
  color: $text-disabled;
95
95
  cursor: not-allowed;
@@ -101,8 +101,6 @@
101
101
  max-height: rem(32px);
102
102
  }
103
103
 
104
- // TODO V11: Remove xl selector
105
- .#{$prefix}--select-input--xl,
106
104
  .#{$prefix}--select-input--lg {
107
105
  height: rem(48px);
108
106
  max-height: rem(48px);
@@ -115,7 +113,7 @@
115
113
 
116
114
  .#{$prefix}--select-input__wrapper[data-invalid] .#{$prefix}--select-input,
117
115
  .#{$prefix}--select--warning .#{$prefix}--select-input {
118
- padding-right: carbon--mini-units(9);
116
+ padding-right: $spacing-10;
119
117
  }
120
118
 
121
119
  .#{$prefix}--select-input:disabled ~ .#{$prefix}--select__arrow {
@@ -123,15 +121,15 @@
123
121
  }
124
122
 
125
123
  .#{$prefix}--select--light .#{$prefix}--select-input {
126
- background-color: $field-02;
124
+ background-color: $field;
127
125
 
128
126
  &:hover {
129
- background-color: $background-hover;
127
+ background-color: $field-hover;
130
128
  }
131
129
 
132
130
  &:disabled,
133
131
  &:hover:disabled {
134
- background-color: $field-02;
132
+ background-color: $field;
135
133
  color: $text-disabled;
136
134
  cursor: not-allowed;
137
135
  }
@@ -178,7 +176,7 @@
178
176
  optgroup.#{$prefix}--select-optgroup,
179
177
  .#{$prefix}--select-option {
180
178
  // For the options to show in IE11
181
- background-color: $background-hover;
179
+ background-color: $layer-hover;
182
180
  color: $text-primary;
183
181
 
184
182
  &:disabled {
@@ -65,6 +65,10 @@ $icon-tab-size: custom-property.get-var('icon-tab-size', rem(40px));
65
65
  }
66
66
  }
67
67
 
68
+ .#{$prefix}--tabs__nav {
69
+ display: flex;
70
+ }
71
+
68
72
  //-----------------------------
69
73
  // Overflow Nav Buttons
70
74
  //-----------------------------
@@ -144,6 +144,10 @@
144
144
  transform-origin: center;
145
145
  transition: $duration-fast-02 motion(standard, productive);
146
146
 
147
+ @media screen and (prefers-reduced-motion: reduce) {
148
+ transition: none;
149
+ }
150
+
147
151
  // Windows, Firefox HCM Fix
148
152
  @media screen and (-ms-high-contrast: active),
149
153
  screen and (prefers-contrast) {
@@ -64,6 +64,10 @@
64
64
  border-radius: 50%;
65
65
  content: '';
66
66
  transition: transform $duration-fast-01 motion(exit, productive);
67
+
68
+ @media screen and (prefers-reduced-motion: reduce) {
69
+ transition: none;
70
+ }
67
71
  }
68
72
  }
69
73
 
@@ -199,6 +203,10 @@
199
203
  transition: box-shadow $duration-fast-01 motion(exit, productive),
200
204
  background-color $duration-fast-01 motion(exit, productive);
201
205
  will-change: box-shadow;
206
+
207
+ @media screen and (prefers-reduced-motion: reduce) {
208
+ transition: none;
209
+ }
202
210
  }
203
211
 
204
212
  // Toggle circle
@@ -215,6 +223,10 @@
215
223
  content: '';
216
224
  cursor: pointer;
217
225
  transition: transform $duration-fast-01 motion(exit, productive);
226
+
227
+ @media screen and (prefers-reduced-motion: reduce) {
228
+ transition: none;
229
+ }
218
230
  }
219
231
  }
220
232
 
@@ -313,6 +325,10 @@
313
325
  &::after {
314
326
  cursor: not-allowed;
315
327
  transition: $duration-fast-01 motion(exit, productive);
328
+
329
+ @media screen and (prefers-reduced-motion: reduce) {
330
+ transition: none;
331
+ }
316
332
  }
317
333
  }
318
334
 
@@ -432,6 +448,10 @@
432
448
  transition: box-shadow $duration-fast-01 motion(exit, productive),
433
449
  background-color $duration-fast-01 motion(exit, productive);
434
450
  will-change: box-shadow;
451
+
452
+ @media screen and (prefers-reduced-motion: reduce) {
453
+ transition: none;
454
+ }
435
455
  }
436
456
 
437
457
  // Toggle circle
@@ -531,6 +551,10 @@
531
551
  &::after {
532
552
  cursor: not-allowed;
533
553
  transition: $duration-fast-01 motion(exit, productive);
554
+
555
+ @media screen and (prefers-reduced-motion: reduce) {
556
+ transition: none;
557
+ }
534
558
  }
535
559
  }
536
560
 
@@ -5,18 +5,14 @@
5
5
  // LICENSE file in the root directory of this source tree.
6
6
  //
7
7
 
8
- @use 'config';
9
-
8
+ @use '../config';
10
9
  @forward '@carbon/grid'
11
10
  show css-grid,
12
- subgrid,
13
11
  flex-grid,
14
12
  $grid-gutter,
15
13
  $grid-gutter-condensed,
16
14
  $grid-breakpoints
17
15
  with (
18
- $prefix: config.$prefix,
19
- $flex-grid-columns: config.$flex-grid-columns,
16
+ $prefix: config.$prefix !default,
17
+ $flex-grid-columns: config.$flex-grid-columns !default
20
18
  );
21
-
22
- @use '@carbon/grid';
@@ -0,0 +1,11 @@
1
+ //
2
+ // Copyright IBM Corp. 2018, 2018
3
+ //
4
+ // This source code is licensed under the Apache-2.0 license found in the
5
+ // LICENSE file in the root directory of this source tree.
6
+ //
7
+
8
+ @forward 'config';
9
+ @use '@carbon/grid';
10
+
11
+ @include grid.flex-grid();
@@ -0,0 +1,16 @@
1
+ //
2
+ // Copyright IBM Corp. 2018, 2018
3
+ //
4
+ // This source code is licensed under the Apache-2.0 license found in the
5
+ // LICENSE file in the root directory of this source tree.
6
+ //
7
+
8
+ @forward 'config';
9
+ @use '@carbon/grid';
10
+ @use '../config';
11
+
12
+ @if config.$use-flexbox-grid == true {
13
+ @include grid.flex-grid();
14
+ } @else {
15
+ @include grid.css-grid();
16
+ }
@@ -5,7 +5,7 @@
5
5
  // LICENSE file in the root directory of this source tree.
6
6
  //
7
7
 
8
- @use 'config';
8
+ @use '../config';
9
9
  @forward '@carbon/type' show
10
10
  // Mixins
11
11
  reset,
@@ -0,0 +1,8 @@
1
+ //
2
+ // Copyright IBM Corp. 2018, 2018
3
+ //
4
+ // This source code is licensed under the Apache-2.0 license found in the
5
+ // LICENSE file in the root directory of this source tree.
6
+ //
7
+
8
+ @forward '@carbon/type/scss/modules/reset';
@@ -127,6 +127,10 @@
127
127
  &::before,
128
128
  &::after {
129
129
  transition: opacity $duration-fast-01 motion(standard, productive);
130
+
131
+ @media screen and (prefers-reduced-motion: reduce) {
132
+ transition: none;
133
+ }
130
134
  }
131
135
 
132
136
  &.#{$prefix}--tooltip--a11y::before,