@carbon/styles 0.6.0 → 0.8.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.
Files changed (29) hide show
  1. package/package.json +9 -9
  2. package/scss/_feature-flags.scss +8 -1
  3. package/scss/_spacing.scss +1 -0
  4. package/scss/_type.scss +1 -0
  5. package/scss/components/_index.scss +1 -0
  6. package/scss/components/accordion/_accordion.scss +6 -2
  7. package/scss/components/button/_button.scss +9 -0
  8. package/scss/components/checkbox/_checkbox.scss +1 -0
  9. package/scss/components/code-snippet/_code-snippet.scss +3 -3
  10. package/scss/components/data-table/expandable/_data-table-expandable.scss +2 -2
  11. package/scss/components/date-picker/_date-picker.scss +1 -1
  12. package/scss/components/date-picker/_flatpickr.scss +39 -38
  13. package/scss/components/dropdown/_dropdown.scss +4 -4
  14. package/scss/components/file-uploader/_file-uploader.scss +4 -1
  15. package/scss/components/form/_form.scss +15 -6
  16. package/scss/components/list-box/_list-box.scss +34 -4
  17. package/scss/components/notification/_actionable-notification.scss +8 -2
  18. package/scss/components/notification/_inline-notification.scss +7 -4
  19. package/scss/components/notification/_toast-notification.scss +13 -8
  20. package/scss/components/progress-indicator/_progress-indicator.scss +6 -0
  21. package/scss/components/slider/_slider.scss +1 -1
  22. package/scss/components/stack/_index.scss +11 -0
  23. package/scss/components/stack/_stack.scss +34 -0
  24. package/scss/components/structured-list/_structured-list.scss +4 -1
  25. package/scss/components/tag/_tag.scss +6 -0
  26. package/scss/components/toggle/_toggle.scss +80 -18
  27. package/scss/components/ui-shell/header/_header.scss +19 -0
  28. package/scss/utilities/_box-shadow.scss +3 -1
  29. package/scss/utilities/_convert.scss +13 -4
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.6.0",
4
+ "version": "0.8.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -20,18 +20,18 @@
20
20
  "access": "public"
21
21
  },
22
22
  "dependencies": {
23
- "@carbon/colors": "^10.33.0",
23
+ "@carbon/colors": "^10.34.0",
24
24
  "@carbon/feature-flags": "^0.6.0",
25
- "@carbon/grid": "^10.37.0",
26
- "@carbon/layout": "^10.33.0",
27
- "@carbon/motion": "^10.25.0",
28
- "@carbon/themes": "^10.44.0",
29
- "@carbon/type": "^10.37.0",
25
+ "@carbon/grid": "^10.39.0",
26
+ "@carbon/layout": "^10.34.0",
27
+ "@carbon/motion": "^10.26.0",
28
+ "@carbon/themes": "^10.46.0",
29
+ "@carbon/type": "^10.38.0",
30
30
  "@ibm/plex": "6.0.0-next.6"
31
31
  },
32
32
  "devDependencies": {
33
- "@carbon/test-utils": "^10.19.0",
33
+ "@carbon/test-utils": "^10.20.0",
34
34
  "css": "^3.0.0"
35
35
  },
36
- "gitHead": "90b2b8c089af8fc2f9db25255d4b27d5b16ca5fe"
36
+ "gitHead": "f6352a1010117000ce4ca9f71315b67b1ec8e396"
37
37
  }
@@ -5,4 +5,11 @@
5
5
  // LICENSE file in the root directory of this source tree.
6
6
  //
7
7
 
8
- @forward '@carbon/feature-flags';
8
+ @forward '@carbon/feature-flags' with (
9
+ $feature-flags: (
10
+ 'enable-css-custom-properties': true,
11
+ 'enable-use-controlled-state-with-value': true,
12
+ 'enable-css-grid': true,
13
+ 'enable-v11-release': true,
14
+ ) !default
15
+ );
@@ -7,6 +7,7 @@
7
7
 
8
8
  @forward '@carbon/layout/scss/modules/spacing'
9
9
  show
10
+ $spacing,
10
11
  $spacing-01,
11
12
  $spacing-02,
12
13
  $spacing-03,
package/scss/_type.scss CHANGED
@@ -11,6 +11,7 @@
11
11
  reset,
12
12
  type-style,
13
13
  font-family,
14
+ default-type,
14
15
 
15
16
  // Variables
16
17
  $caption-01,
@@ -43,6 +43,7 @@
43
43
  @use 'select';
44
44
  @use 'skeleton-styles';
45
45
  @use 'slider';
46
+ @use 'stack';
46
47
  @use 'structured-list';
47
48
  @use 'tabs';
48
49
  @use 'tag';
@@ -183,11 +183,15 @@ $content-padding: 0 0 0 $spacing-05 !default;
183
183
 
184
184
  .#{$prefix}--accordion--start .#{$prefix}--accordion__arrow {
185
185
  // Alters `$arrow-margin` token:
186
- margin: 2px 0 0 $spacing-03;
186
+ margin: 2px 0 0 $spacing-05;
187
+ }
188
+
189
+ .#{$prefix}--accordion--start .#{$prefix}--accordion__title {
190
+ margin-right: $spacing-05;
187
191
  }
188
192
 
189
193
  .#{$prefix}--accordion--start .#{$prefix}--accordion__content {
190
- margin-left: $spacing-06;
194
+ margin-left: $spacing-07;
191
195
  }
192
196
 
193
197
  .#{$prefix}--accordion__item--collapsing .#{$prefix}--accordion__content,
@@ -525,4 +525,13 @@
525
525
  .#{$prefix}--btn:focus {
526
526
  @include high-contrast-mode('focus');
527
527
  }
528
+
529
+ // Windows HCM fix
530
+ // stylelint-disable-next-line no-duplicate-selectors
531
+ .#{$prefix}--btn--ghost.#{$prefix}--btn--icon-only
532
+ .#{$prefix}--btn__icon
533
+ path:not([data-icon-path]):not([fill='none']),
534
+ .#{$prefix}--btn--ghost.#{$prefix}--btn--icon-only .#{$prefix}--btn__icon {
535
+ @include high-contrast-mode('icon-fill');
536
+ }
528
537
  }
@@ -17,6 +17,7 @@
17
17
  @mixin checkbox {
18
18
  // Spacing between checkboxes
19
19
  .#{$prefix}--form-item.#{$prefix}--checkbox-wrapper {
20
+ position: relative;
20
21
  margin-bottom: $spacing-02;
21
22
  }
22
23
 
@@ -8,7 +8,7 @@
8
8
  @use '../../config' as *;
9
9
  @use '../../motion' as *;
10
10
  @use '../../spacing' as *;
11
- @use '../../compat/theme' as *;
11
+ @use '../../theme' as *;
12
12
  @use '../../type' as *;
13
13
  @use '../copy-button';
14
14
  @use '../../utilities/convert' as *;
@@ -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: $hover-light-ui;
398
+ background-color: $layer-hover-02;
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: $active-light-ui;
406
+ background-color: $layer-active-02;
407
407
  }
408
408
 
409
409
  .#{$prefix}--snippet--light.#{$prefix}--snippet--single::after,
@@ -8,7 +8,7 @@
8
8
  @use '../../../config' as *;
9
9
  @use '../../../motion' as *;
10
10
  @use '../../../spacing' as *;
11
- @use '../../../compat/theme' as *;
11
+ @use '../../../theme' as *;
12
12
  @use '../../../utilities/button-reset';
13
13
  @use '../../../utilities/convert' as *;
14
14
  @use '../../../utilities/focus-outline' as *;
@@ -226,7 +226,7 @@
226
226
  }
227
227
 
228
228
  .#{$prefix}--table-expand__svg {
229
- fill: $ui-05;
229
+ fill: $layer-selected-inverse;
230
230
  transform: rotate(90deg);
231
231
  transition: transform $duration-moderate-01 motion(standard, productive);
232
232
  }
@@ -8,7 +8,7 @@
8
8
  @use '../../colors' as *;
9
9
  @use '../../config' as *;
10
10
  @use '../../motion' as *;
11
- @use '../../compat/theme' as *;
11
+ @use '../../theme' as *;
12
12
  @use '../../spacing' as *;
13
13
  @use '../../type' as *;
14
14
  @use '../form/form';
@@ -5,9 +5,8 @@
5
5
  // LICENSE file in the root directory of this source tree.
6
6
  //
7
7
 
8
- // @use '../../config' as *;
9
8
  @use '../../motion' as *;
10
- @use '../../compat/theme' as *;
9
+ @use '../../theme' as *;
11
10
  @use '../../spacing' as *;
12
11
  @use '../../type' as *;
13
12
  @use '../../utilities/box-shadow' as *;
@@ -15,6 +14,8 @@
15
14
  @use '../../utilities/focus-outline' as *;
16
15
  @use '../../utilities/high-contrast-mode' as *;
17
16
 
17
+ @use '../button/tokens' as *;
18
+
18
19
  @keyframes fpFadeInDown {
19
20
  from {
20
21
  opacity: 0;
@@ -121,7 +122,7 @@
121
122
  padding: $spacing-02 $spacing-02 $spacing-03 $spacing-02;
122
123
  border: none;
123
124
  margin-top: rem(-2px);
124
- background-color: $ui-01;
125
+ background-color: $layer-01;
125
126
 
126
127
  &:focus {
127
128
  @include focus-outline('border');
@@ -198,7 +199,7 @@
198
199
  height: rem(40px);
199
200
  align-items: center;
200
201
  background-color: transparent;
201
- color: $text-01;
202
+ color: $text-primary;
202
203
  line-height: 1;
203
204
  text-align: center;
204
205
  }
@@ -213,7 +214,7 @@
213
214
  justify-content: center;
214
215
  padding: 0;
215
216
  cursor: pointer;
216
- fill: $icon-01;
217
+ fill: $icon-primary;
217
218
  line-height: 16px;
218
219
  text-decoration: none;
219
220
  transform: scale(1, 1) #{'/*rtl: scale(-1,1)*/'};
@@ -222,19 +223,19 @@
222
223
  @include high-contrast-mode('icon-fill');
223
224
 
224
225
  &:hover {
225
- background-color: $hover-ui;
226
+ background-color: $background-hover;
226
227
  }
227
228
  }
228
229
 
229
230
  .flatpickr-next-month.disabled svg,
230
231
  .flatpickr-prev-month.disabled svg {
231
232
  cursor: not-allowed;
232
- fill: $ui-05;
233
+ fill: $icon-disabled;
233
234
  }
234
235
 
235
236
  .flatpickr-next-month.disabled:hover svg,
236
237
  .flatpickr-prev-month.disabled:hover svg {
237
- fill: $ui-05;
238
+ fill: $icon-disabled;
238
239
  }
239
240
 
240
241
  .flatpickr-current-month {
@@ -252,7 +253,7 @@
252
253
  margin-left: $spacing-02;
253
254
 
254
255
  &:hover {
255
- background-color: $hover-ui;
256
+ background-color: $background-hover;
256
257
  }
257
258
  }
258
259
 
@@ -261,7 +262,7 @@
261
262
  width: rem(60px);
262
263
 
263
264
  &:hover {
264
- background-color: $hover-ui;
265
+ background-color: $background-hover;
265
266
  }
266
267
  }
267
268
 
@@ -274,7 +275,7 @@
274
275
  // Added in when upgraded to Flatpickr 4.5.5 (#1977)
275
276
  -moz-appearance: textfield; /* Firefox */
276
277
  background-color: $field-01;
277
- color: $text-01;
278
+ color: $text-primary;
278
279
  cursor: default;
279
280
  font-family: inherit;
280
281
  font-size: inherit;
@@ -293,8 +294,8 @@
293
294
 
294
295
  &[disabled],
295
296
  &[disabled]:hover {
296
- background-color: $ui-01;
297
- color: $disabled-02;
297
+ background-color: $layer-01;
298
+ color: $text-disabled;
298
299
  pointer-events: none;
299
300
  }
300
301
  }
@@ -304,7 +305,7 @@
304
305
  border-bottom: 0;
305
306
 
306
307
  &::after {
307
- border-bottom: rem(4px) solid $icon-01;
308
+ border-bottom: rem(4px) solid $border-subtle;
308
309
  }
309
310
  }
310
311
 
@@ -312,7 +313,7 @@
312
313
  top: rem(11px);
313
314
 
314
315
  &::after {
315
- border-top: rem(4px) solid $icon-01;
316
+ border-top: rem(4px) solid $border-subtle;
316
317
  }
317
318
  }
318
319
 
@@ -338,22 +339,22 @@
338
339
  }
339
340
 
340
341
  &:hover::after {
341
- border-top-color: $interactive-01;
342
- border-bottom-color: $interactive-01;
342
+ border-top-color: $button-primary;
343
+ border-bottom-color: $button-primary;
343
344
  }
344
345
 
345
346
  &:active::after {
346
- border-top-color: $interactive-04;
347
- border-bottom-color: $interactive-04;
347
+ border-top-color: $border-interactive;
348
+ border-bottom-color: $border-interactive;
348
349
  }
349
350
  }
350
351
 
351
352
  .numInput[disabled] ~ .arrowUp::after {
352
- border-bottom-color: $disabled-02;
353
+ border-bottom-color: $text-disabled;
353
354
  }
354
355
 
355
356
  .numInput[disabled] ~ .arrowDown::after {
356
- border-top-color: $disabled-02;
357
+ border-top-color: $text-disabled;
357
358
  }
358
359
 
359
360
  .numInputWrapper:hover .arrowUp,
@@ -381,7 +382,7 @@
381
382
  @include type-style('body-short-01');
382
383
 
383
384
  flex: 1;
384
- color: $text-01;
385
+ color: $text-primary;
385
386
  cursor: default;
386
387
  }
387
388
 
@@ -423,29 +424,29 @@
423
424
  height: rem(40px);
424
425
  align-items: center;
425
426
  justify-content: center;
426
- color: $text-01;
427
+ color: $text-primary;
427
428
  cursor: pointer;
428
429
  transition: all $duration-fast-01 motion(standard, productive);
429
430
 
430
431
  &:hover {
431
- background: $hover-ui;
432
+ background: $background-hover;
432
433
  }
433
434
 
434
435
  &:focus {
435
436
  @include focus-outline('outline');
436
437
 
437
- outline-color: $interactive-01;
438
+ outline-color: $button-primary;
438
439
  }
439
440
  }
440
441
 
441
442
  .nextMonthDay,
442
443
  .prevMonthDay {
443
- color: $text-05;
444
+ color: $text-helper;
444
445
  }
445
446
 
446
447
  .flatpickr-day.today {
447
448
  position: relative;
448
- color: $link-01;
449
+ color: $link-primary;
449
450
  font-weight: 600;
450
451
 
451
452
  &::after {
@@ -455,7 +456,7 @@
455
456
  display: block;
456
457
  width: rem(4px);
457
458
  height: rem(4px);
458
- background-color: $link-01;
459
+ background-color: $link-primary;
459
460
  content: '';
460
461
  transform: translateX(-50%);
461
462
  }
@@ -475,18 +476,18 @@
475
476
 
476
477
  .flatpickr-day.inRange {
477
478
  background-color: $highlight;
478
- color: $text-01;
479
+ color: $text-primary;
479
480
  }
480
481
 
481
482
  .flatpickr-day.selected {
482
- background-color: $interactive-01;
483
- color: $text-04;
483
+ background-color: $button-primary;
484
+ color: $text-on-color;
484
485
  @include high-contrast-mode('focus') {
485
486
  outline-style: dotted;
486
487
  }
487
488
 
488
489
  &:focus {
489
- outline: rem(1px) solid $ui-02;
490
+ outline: rem(1px) solid $layer-02;
490
491
  outline-offset: rem(-3px);
491
492
  }
492
493
  }
@@ -501,23 +502,23 @@
501
502
  @include focus-outline('outline');
502
503
 
503
504
  z-index: 3;
504
- background: $ui-01;
505
+ background: $layer-01;
505
506
  }
506
507
 
507
508
  .flatpickr-day.endRange:hover {
508
509
  @include focus-outline('outline');
509
510
 
510
- background: $ui-01;
511
- color: $text-01;
511
+ background: $layer-01;
512
+ color: $text-primary;
512
513
  }
513
514
 
514
515
  .flatpickr-day.endRange.inRange.selected {
515
- background: $interactive-01;
516
- color: $text-04;
516
+ background: $button-primary;
517
+ color: $text-on-color;
517
518
  }
518
519
 
519
520
  .flatpickr-day.flatpickr-disabled {
520
- color: $disabled-02;
521
+ color: $text-disabled;
521
522
  cursor: not-allowed;
522
523
 
523
524
  &:hover {
@@ -9,7 +9,7 @@
9
9
  @use '../../config' as *;
10
10
  @use '../../motion' as *;
11
11
  @use '../../spacing' as *;
12
- @use '../../compat/theme' as *;
12
+ @use '../../theme' as *;
13
13
  @use '../../type' as *;
14
14
  @use '../../utilities/box-shadow' as *;
15
15
  @use '../../utilities/convert' as *;
@@ -139,7 +139,7 @@
139
139
  background-color: $field-02;
140
140
 
141
141
  &:hover {
142
- background-color: $hover-light-ui;
142
+ background-color: $layer-hover-02;
143
143
  }
144
144
  }
145
145
 
@@ -262,13 +262,13 @@
262
262
 
263
263
  &:hover {
264
264
  border-color: transparent;
265
- color: $text-01;
265
+ color: $text-primary;
266
266
  }
267
267
  }
268
268
 
269
269
  // V11: Possibly deprecate
270
270
  .#{$prefix}--dropdown--light .#{$prefix}--dropdown-link {
271
- border-top-color: $decorative-01;
271
+ border-top-color: $border-subtle-02;
272
272
  }
273
273
 
274
274
  .#{$prefix}--dropdown--sm .#{$prefix}--dropdown-link {
@@ -62,7 +62,10 @@
62
62
  display: inline-block;
63
63
  width: 100%;
64
64
  max-width: rem(320px);
65
- margin-bottom: $spacing-03;
65
+ @if not enabled('enable-v11-release') {
66
+ margin-bottom: $spacing-03;
67
+ }
68
+
66
69
  color: $link-primary;
67
70
  cursor: pointer;
68
71
  outline: 2px solid transparent;
@@ -22,11 +22,15 @@ $input-label-weight: 400 !default;
22
22
  .#{$prefix}--fieldset {
23
23
  @include reset;
24
24
 
25
- margin-bottom: $spacing-07;
25
+ @if not enabled('enable-v11-release') {
26
+ margin-bottom: $spacing-07;
27
+ }
26
28
  }
27
29
 
28
- .#{$prefix}--fieldset--no-margin {
29
- margin-bottom: 0;
30
+ @if not enabled('enable-v11-release') {
31
+ .#{$prefix}--fieldset--no-margin {
32
+ margin-bottom: 0;
33
+ }
30
34
  }
31
35
 
32
36
  .#{$prefix}--form-item {
@@ -46,7 +50,10 @@ $input-label-weight: 400 !default;
46
50
  @include type-style('label-01');
47
51
 
48
52
  display: inline-block;
49
- margin-bottom: $spacing-03;
53
+ @if not enabled('enable-v11-release') {
54
+ margin-bottom: $spacing-03;
55
+ }
56
+
50
57
  color: $text-secondary;
51
58
  font-weight: $input-label-weight;
52
59
  line-height: 1rem;
@@ -129,8 +136,10 @@ $input-label-weight: 400 !default;
129
136
  display: block;
130
137
  }
131
138
 
132
- .#{$prefix}--form--fluid .#{$prefix}--fieldset {
133
- margin: 0;
139
+ @if not enabled('enable-v11-release') {
140
+ .#{$prefix}--form--fluid .#{$prefix}--fieldset {
141
+ margin: 0;
142
+ }
134
143
  }
135
144
 
136
145
  .#{$prefix}--form--fluid input[data-invalid] {
@@ -11,7 +11,7 @@
11
11
  @use '../tag/mixins' as *;
12
12
  @use '../../config' as *;
13
13
  @use '../../colors' as *;
14
- @use '../../compat/theme' as *;
14
+ @use '../../theme' as *;
15
15
  @use '../../type' as *;
16
16
  @use '../../spacing' as *;
17
17
  @use '../../motion' as *;
@@ -158,7 +158,7 @@ $list-box-menu-width: rem(300px);
158
158
  background-color: $field-02;
159
159
 
160
160
  &:hover {
161
- background-color: $hover-light-ui;
161
+ background-color: $layer-hover-02;
162
162
  }
163
163
  }
164
164
 
@@ -169,7 +169,7 @@ $list-box-menu-width: rem(300px);
169
169
 
170
170
  // V11: Possibly deprecate
171
171
  .#{$prefix}--list-box--light .#{$prefix}--list-box__menu-item__option {
172
- border-top-color: $decorative-01;
172
+ border-top-color: $border-subtle-02;
173
173
  }
174
174
 
175
175
  .#{$prefix}--list-box--light.#{$prefix}--list-box--expanded {
@@ -561,7 +561,7 @@ $list-box-menu-width: rem(300px);
561
561
 
562
562
  // V11: Possibly deprecate
563
563
  .#{$prefix}--list-box--light .#{$prefix}--list-box__menu-item:hover {
564
- background-color: $hover-light-ui;
564
+ background-color: $layer-hover-02;
565
565
  }
566
566
 
567
567
  .#{$prefix}--list-box--sm .#{$prefix}--list-box__menu-item {
@@ -668,6 +668,36 @@ $list-box-menu-width: rem(300px);
668
668
  color: $text-disabled;
669
669
  }
670
670
 
671
+ .#{$prefix}--list-box__menu-item[disabled],
672
+ .#{$prefix}--list-box__menu-item[disabled] *,
673
+ .#{$prefix}--list-box__menu-item[disabled]
674
+ .#{$prefix}--list-box__menu-item__option,
675
+ .#{$prefix}--list-box__menu-item[disabled]:hover {
676
+ color: $text-disabled;
677
+ cursor: not-allowed;
678
+ outline: none;
679
+ }
680
+
681
+ .#{$prefix}--list-box__menu-item[disabled]:hover {
682
+ background-color: revert;
683
+ }
684
+
685
+ .#{$prefix}--list-box__menu-item[disabled]
686
+ .#{$prefix}--checkbox-label::before {
687
+ border-color: $text-disabled;
688
+ }
689
+
690
+ .#{$prefix}--list-box__menu-item[disabled]
691
+ .#{$prefix}--list-box__menu-item__option {
692
+ border-top-color: $border-subtle;
693
+ }
694
+
695
+ .#{$prefix}--list-box__menu-item[disabled]:hover
696
+ + .#{$prefix}--list-box__menu-item
697
+ .#{$prefix}--list-box__menu-item__option {
698
+ border-top-color: $border-subtle;
699
+ }
700
+
671
701
  .#{$prefix}--list-box.#{$prefix}--list-box--inline
672
702
  .#{$prefix}--list-box__menu-item__option {
673
703
  margin: 0 $spacing-03;
@@ -36,8 +36,11 @@
36
36
  height: auto;
37
37
  min-height: rem(48px);
38
38
  flex-wrap: wrap;
39
- margin-top: $spacing-05;
40
- margin-bottom: $spacing-05;
39
+ @if not enabled('enable-v11-release') {
40
+ margin-top: $spacing-05;
41
+ margin-bottom: $spacing-05;
42
+ }
43
+
41
44
  color: $text-inverse;
42
45
 
43
46
  @include breakpoint(md) {
@@ -190,7 +193,10 @@
190
193
  display: flex;
191
194
  flex-grow: 1;
192
195
  margin: 0 $spacing-09 0 $spacing-05;
196
+ }
193
197
 
198
+ .#{$prefix}--actionable-notification:not(.#{$prefix}--actionable-notification--toast)
199
+ .#{$prefix}--actionable-notification__details {
194
200
  @include breakpoint(md) {
195
201
  margin: 0 $spacing-05;
196
202
  }
@@ -8,7 +8,7 @@
8
8
  @use '../../breakpoint' as *;
9
9
  @use '../../colors' as *;
10
10
  @use '../../config' as *;
11
- @use '../../feature-flags' as *;
11
+ @use '../../feature-flags';
12
12
  @use '../../motion' as *;
13
13
  @use '../../spacing' as *;
14
14
  @use '../../theme' as *;
@@ -34,8 +34,11 @@
34
34
  height: auto;
35
35
  min-height: rem(48px);
36
36
  flex-wrap: wrap;
37
- margin-top: $spacing-05;
38
- margin-bottom: $spacing-05;
37
+ @if not enabled('enable-v11-release') {
38
+ margin-top: $spacing-05;
39
+ margin-bottom: $spacing-05;
40
+ }
41
+
39
42
  color: $text-inverse;
40
43
 
41
44
  @include breakpoint(md) {
@@ -197,7 +200,7 @@
197
200
  padding: rem(15px) 0;
198
201
  }
199
202
 
200
- @if feature-flag-enabled('enable-v11-release') {
203
+ @if feature-flags.enabled('enable-v11-release') {
201
204
  .#{$prefix}--inline-notification__content {
202
205
  @include type-style('body-short-01');
203
206
 
@@ -10,7 +10,7 @@
10
10
  @use '../../breakpoint' as *;
11
11
  @use '../../colors' as *;
12
12
  @use '../../config' as *;
13
- @use '../../feature-flags' as *;
13
+ @use '../../feature-flags';
14
14
  @use '../../motion' as *;
15
15
  @use '../../spacing' as *;
16
16
  @use '../../theme' as *;
@@ -32,14 +32,19 @@
32
32
  width: rem(288px);
33
33
  height: auto;
34
34
  padding-left: $spacing-05;
35
- margin-top: $spacing-03;
36
- margin-right: $spacing-05;
37
- margin-bottom: $spacing-03;
35
+ @if not enabled('enable-v11-release') {
36
+ margin-top: $spacing-03;
37
+ margin-right: $spacing-05;
38
+ margin-bottom: $spacing-03;
39
+ }
40
+
38
41
  box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.2);
39
42
  color: $text-inverse;
40
43
 
41
- &:first-child {
42
- margin-top: $spacing-05;
44
+ @if not enabled('enable-v11-release') {
45
+ &:first-child {
46
+ margin-top: $spacing-05;
47
+ }
43
48
  }
44
49
 
45
50
  @include breakpoint(max) {
@@ -146,7 +151,7 @@
146
151
  margin-right: $spacing-05;
147
152
  }
148
153
 
149
- @if feature-flag-enabled('enable-v11-release') {
154
+ @if feature-flags.enabled('enable-v11-release') {
150
155
  .#{$prefix}--toast-notification__content {
151
156
  @include type-style('body-short-01');
152
157
 
@@ -205,7 +210,7 @@
205
210
  fill: $icon-primary;
206
211
  }
207
212
 
208
- @if not feature-flag-enabled('enable-v11-release') {
213
+ @if not feature-flags.enabled('enable-v11-release') {
209
214
  .#{$prefix}--toast-notification__title {
210
215
  @include type-style('productive-heading-01');
211
216
 
@@ -225,6 +225,12 @@ $progress-indicator-bar-width: 1px inset transparent !default;
225
225
  cursor: pointer;
226
226
  }
227
227
 
228
+ .#{$prefix}--progress-step-button:not(.#{$prefix}--progress-step-button--unclickable)
229
+ .#{$prefix}--progress-label:active {
230
+ box-shadow: 0 rem(3px) 0 0 $interactive;
231
+ color: $interactive;
232
+ }
233
+
228
234
  //DISABLED STYLING
229
235
  .#{$prefix}--progress-step--disabled {
230
236
  cursor: not-allowed;
@@ -124,7 +124,7 @@
124
124
 
125
125
  .#{$prefix}--slider-text-input,
126
126
  .#{$prefix}-slider-text-input {
127
- width: auto;
127
+ width: rem(64px);
128
128
  height: rem(40px);
129
129
  -moz-appearance: textfield;
130
130
  text-align: center;
@@ -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 'stack';
9
+ @use 'stack';
10
+
11
+ @include stack.stack;
@@ -0,0 +1,34 @@
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
+ @use '../../config' as *;
9
+ @use '../../spacing';
10
+ @use '../../utilities/custom-property';
11
+
12
+ @mixin stack() {
13
+ .#{$prefix}--stack-horizontal {
14
+ display: inline-grid;
15
+ column-gap: custom-property.get-var('stack-gap', 0);
16
+ grid-auto-flow: column;
17
+ }
18
+
19
+ .#{$prefix}--stack-vertical {
20
+ display: grid;
21
+ grid-auto-flow: row;
22
+ row-gap: custom-property.get-var('stack-gap', 0);
23
+ }
24
+
25
+ $index: 1;
26
+
27
+ @each $step, $value in spacing.$spacing {
28
+ .#{$prefix}--stack-scale-#{$index} {
29
+ @include custom-property.declaration('stack-gap', $value);
30
+ }
31
+
32
+ $index: $index + 1;
33
+ }
34
+ }
@@ -36,7 +36,10 @@
36
36
 
37
37
  display: table;
38
38
  width: 100%;
39
- margin-bottom: 5rem;
39
+ @if not enabled('enable-v11-release') {
40
+ margin-bottom: 5rem;
41
+ }
42
+
40
43
  background-color: transparent;
41
44
  border-collapse: collapse;
42
45
  border-spacing: 0;
@@ -114,6 +114,12 @@
114
114
  );
115
115
  }
116
116
 
117
+ .#{$prefix}--tag--outline {
118
+ @include tag-theme($background, $text-primary, $layer-hover);
119
+
120
+ box-shadow: inset 0 0 0 1px $background-inverse;
121
+ }
122
+
117
123
  .#{$prefix}--tag--disabled,
118
124
  .#{$prefix}--tag--filter.#{$prefix}--tag--disabled,
119
125
  .#{$prefix}--tag--interactive.#{$prefix}--tag--disabled {
@@ -6,7 +6,7 @@
6
6
  //3
7
7
 
8
8
  @use '../../config' as *;
9
- @use '../../feature-flags' as *;
9
+ @use '../../feature-flags';
10
10
  @use '../../motion' as *;
11
11
  @use '../../spacing' as *;
12
12
  @use '../../theme' as *;
@@ -15,12 +15,13 @@
15
15
  @use '../../utilities/convert' as *;
16
16
  @use '../../utilities/high-contrast-mode' as *;
17
17
  @use '../../utilities/visually-hidden' as *;
18
+ @use '../../utilities/skeleton' as *;
18
19
 
19
20
  /// Toggle styles
20
21
  /// @access public
21
22
  /// @group toggle
22
23
  @mixin toggle {
23
- @if enabled('enable-v11-release') {
24
+ @if feature-flags.enabled('enable-v11-release') {
24
25
  .#{$prefix}--toggle__label-text {
25
26
  @include type-style('label-01');
26
27
 
@@ -586,30 +587,91 @@
586
587
  //----------------------------------------------
587
588
  // Skeleton
588
589
  // ---------------------------------------------
590
+ //md toggle input
591
+ .#{$prefix}--toggle.#{$prefix}--skeleton
592
+ + .#{$prefix}--toggle-input__label
593
+ .#{$prefix}--toggle__switch {
594
+ @include skeleton;
589
595
 
590
- .#{$prefix}--toggle__label.#{$prefix}--skeleton {
591
- flex-direction: column;
592
- align-items: flex-start;
596
+ width: 3rem;
597
+ margin-top: 0.5rem;
598
+ }
593
599
 
594
- .#{$prefix}--toggle__label-text {
595
- margin-bottom: $spacing-03;
596
- }
600
+ //md skeleton label text
601
+ .#{$prefix}--toggle.#{$prefix}--skeleton
602
+ + .#{$prefix}--toggle-input__label
603
+ > div {
604
+ overflow: hidden;
605
+ width: 1.5rem;
606
+ height: 0.5rem;
607
+ //hides text
608
+ font-size: 0%;
609
+ line-height: 0;
610
+
611
+ @include skeleton;
597
612
  }
598
613
 
599
- // Windows HCM fix
600
- .#{$prefix}--toggle__switch::after,
601
- .#{$prefix}--toggle__switch::before {
602
- @include high-contrast-mode('outline');
614
+ //small toggle input
615
+ .#{$prefix}--toggle-input--small.#{$prefix}--skeleton
616
+ + .#{$prefix}--toggle-input__label
617
+ .#{$prefix}--toggle__switch {
618
+ @include skeleton;
619
+
620
+ width: 2rem;
621
+ margin-top: 0.5rem;
603
622
  }
604
623
 
605
- // stylelint-disable-next-line no-duplicate-selectors
606
- .#{$prefix}--toggle-input:focus
624
+ //sm skeleton label text
625
+ .#{$prefix}--toggle-input--small.#{$prefix}--skeleton
607
626
  + .#{$prefix}--toggle-input__label
608
- > .#{$prefix}--toggle__switch::before,
609
- .#{$prefix}--toggle-input:active
627
+ > div {
628
+ overflow: hidden;
629
+ width: 1rem;
630
+ height: 0.5rem;
631
+ //hides text
632
+ font-size: 0%;
633
+ line-height: 0;
634
+
635
+ @include skeleton;
636
+ }
637
+
638
+ // on/off text skeleton
639
+ .#{$prefix}--toggle.#{$prefix}--skeleton
610
640
  + .#{$prefix}--toggle-input__label
611
- > .#{$prefix}--toggle__switch::before {
612
- @include high-contrast-mode('focus');
641
+ .#{$prefix}--toggle__switch
642
+ .#{$prefix}--toggle__text--left {
643
+ @include skeleton;
644
+
645
+ position: absolute;
646
+ width: 1rem;
647
+ height: 0.5rem;
648
+ }
649
+
650
+ .#{$prefix}--toggle-input--small.#{$prefix}--skeleton
651
+ + .#{$prefix}--toggle-input__label
652
+ .#{$prefix}--toggle__switch
653
+ .#{$prefix}--toggle__text--left {
654
+ left: 2rem;
655
+ }
656
+
657
+ //pseudo "toggle" button
658
+ .#{$prefix}--toggle.#{$prefix}--skeleton
659
+ + .#{$prefix}--toggle-input__label
660
+ .#{$prefix}--toggle__switch::after,
661
+ .#{$prefix}--toggle.#{$prefix}--skeleton
662
+ + .#{$prefix}--toggle-input__label
663
+ .#{$prefix}--toggle__appearance::after,
664
+ .#{$prefix}--toggle.#{$prefix}--skeleton
665
+ + .#{$prefix}--toggle-input__label
666
+ .#{$prefix}--toggle__appearance::before {
667
+ display: none;
668
+ }
669
+
670
+ //make it square
671
+ .#{$prefix}--toggle.#{$prefix}--skeleton
672
+ + .#{$prefix}--toggle-input__label
673
+ .#{$prefix}--toggle__switch::before {
674
+ border-radius: 0;
613
675
  }
614
676
  }
615
677
  }
@@ -269,6 +269,25 @@
269
269
  position: relative;
270
270
  }
271
271
 
272
+ .#{$prefix}--header__submenu--current::after {
273
+ position: absolute;
274
+ top: 0;
275
+ right: 0;
276
+ bottom: 0;
277
+ left: 0;
278
+ width: 100%;
279
+ border-bottom: 3px solid $border-interactive;
280
+ content: '';
281
+ }
282
+
283
+ .#{$prefix}--header__submenu--current:focus {
284
+ border: 2px solid $focus;
285
+ }
286
+
287
+ .#{$prefix}--header__submenu--current:focus::after {
288
+ border: 0;
289
+ }
290
+
272
291
  .#{$prefix}--header__menu-title[aria-haspopup='true'] {
273
292
  position: relative;
274
293
  }
@@ -5,10 +5,12 @@
5
5
  // LICENSE file in the root directory of this source tree.
6
6
  //
7
7
 
8
+ @use '../theme';
9
+
8
10
  /// Adds box shadow
9
11
  /// @access public
10
12
  /// @example @include box-shadow;
11
13
  /// @group utilities
12
14
  @mixin box-shadow {
13
- box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
15
+ box-shadow: 0 2px 6px theme.$shadow;
14
16
  }
@@ -5,11 +5,12 @@
5
5
  // LICENSE file in the root directory of this source tree.
6
6
  //
7
7
 
8
+ @use 'sass:meta';
9
+ @use "sass:math";
10
+
8
11
  /// Default font size
9
12
  /// @type Number
10
13
  /// @access public
11
- @use "sass:math";
12
-
13
14
  $base-font-size: 16px !default;
14
15
 
15
16
  /// Convert a given px unit to a rem unit
@@ -23,7 +24,11 @@ $base-font-size: 16px !default;
23
24
  @warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
24
25
  }
25
26
 
26
- @return math.div($px, $base-font-size) * 1rem;
27
+ @if meta.function-exists('div', 'math') {
28
+ @return math.div($px, $base-font-size) * 1rem;
29
+ } @else {
30
+ @return ($px / $base-font-size) * 1rem;
31
+ }
27
32
  }
28
33
 
29
34
  /// Convert a given px unit to a em unit
@@ -37,5 +42,9 @@ $base-font-size: 16px !default;
37
42
  @warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
38
43
  }
39
44
 
40
- @return math.div($px, $base-font-size) * 1em;
45
+ @if meta.function-exists('div', 'math') {
46
+ @return math.div($px, $base-font-size) * 1em;
47
+ } @else {
48
+ @return ($px / $base-font-size) * 1em;
49
+ }
41
50
  }