@carbon/styles 0.8.0-rc.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.
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.8.0-rc.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.39.0-rc.0",
26
- "@carbon/layout": "^10.34.0-rc.0",
27
- "@carbon/motion": "^10.25.0",
28
- "@carbon/themes": "^10.46.0-rc.0",
29
- "@carbon/type": "^10.38.0-rc.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": "b5f01ac2dbf9e5acb901cfc939b4ddd4d951a35e"
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
+ );
@@ -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 {
@@ -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 {
@@ -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 *;
@@ -200,7 +200,7 @@
200
200
  padding: rem(15px) 0;
201
201
  }
202
202
 
203
- @if feature-flag-enabled('enable-v11-release') {
203
+ @if feature-flags.enabled('enable-v11-release') {
204
204
  .#{$prefix}--inline-notification__content {
205
205
  @include type-style('body-short-01');
206
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 *;
@@ -151,7 +151,7 @@
151
151
  margin-right: $spacing-05;
152
152
  }
153
153
 
154
- @if feature-flag-enabled('enable-v11-release') {
154
+ @if feature-flags.enabled('enable-v11-release') {
155
155
  .#{$prefix}--toast-notification__content {
156
156
  @include type-style('body-short-01');
157
157
 
@@ -210,7 +210,7 @@
210
210
  fill: $icon-primary;
211
211
  }
212
212
 
213
- @if not feature-flag-enabled('enable-v11-release') {
213
+ @if not feature-flags.enabled('enable-v11-release') {
214
214
  .#{$prefix}--toast-notification__title {
215
215
  @include type-style('productive-heading-01');
216
216
 
@@ -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
  }