@carbon/elements 10.32.0 → 10.34.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.
@@ -62,11 +62,11 @@
62
62
  } @else {
63
63
  // Explicitly include `display: block` to override
64
64
  display: block;
65
- flex: 0 0 percentage($span / $columns);
66
65
  // Add a `max-width` to ensure content within each column does not blow out
67
66
  // the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
68
67
  // do not appear to require this.
69
68
  max-width: percentage($span / $columns);
69
+ flex: 0 0 percentage($span / $columns);
70
70
  }
71
71
  }
72
72
 
@@ -117,17 +117,17 @@
117
117
  // Provide basic `.col-{bp}` classes for equal-width flexbox columns
118
118
  .#{$prefix}--col,
119
119
  .#{$prefix}--col#{$infix} {
120
+ max-width: 100%;
120
121
  flex-basis: 0;
121
122
  flex-grow: 1;
122
- max-width: 100%;
123
123
  }
124
124
 
125
125
  .#{$prefix}--col--auto,
126
126
  .#{$prefix}--col#{$infix}--auto {
127
- flex: 1 0 0%;
128
127
  width: auto;
129
128
  // Reset earlier grid tiers
130
129
  max-width: 100%;
130
+ flex: 1 0 0%;
131
131
  }
132
132
 
133
133
  @for $i from 0 through $columns {
@@ -266,11 +266,11 @@ $carbon--aspect-ratios: (
266
266
  }
267
267
 
268
268
  .#{$prefix}--aspect-ratio::before {
269
- float: left;
270
269
  width: 1px;
271
270
  height: 0;
272
271
  margin-left: -1px;
273
272
  content: '';
273
+ float: left;
274
274
  }
275
275
 
276
276
  .#{$prefix}--aspect-ratio::after {
@@ -62,11 +62,11 @@
62
62
  } @else {
63
63
  // Explicitly include `display: block` to override
64
64
  display: block;
65
- flex: 0 0 percentage($span / $columns);
66
65
  // Add a `max-width` to ensure content within each column does not blow out
67
66
  // the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
68
67
  // do not appear to require this.
69
68
  max-width: percentage($span / $columns);
69
+ flex: 0 0 percentage($span / $columns);
70
70
  }
71
71
  }
72
72
 
@@ -117,17 +117,17 @@
117
117
  // Provide basic `.col-{bp}` classes for equal-width flexbox columns
118
118
  .#{$prefix}--col,
119
119
  .#{$prefix}--col#{$infix} {
120
+ max-width: 100%;
120
121
  flex-basis: 0;
121
122
  flex-grow: 1;
122
- max-width: 100%;
123
123
  }
124
124
 
125
125
  .#{$prefix}--col--auto,
126
126
  .#{$prefix}--col#{$infix}--auto {
127
- flex: 1 0 0%;
128
127
  width: auto;
129
128
  // Reset earlier grid tiers
130
129
  max-width: 100%;
130
+ flex: 1 0 0%;
131
131
  }
132
132
 
133
133
  @for $i from 0 through $columns {
@@ -266,11 +266,11 @@ $carbon--aspect-ratios: (
266
266
  }
267
267
 
268
268
  .#{$prefix}--aspect-ratio::before {
269
- float: left;
270
269
  width: 1px;
271
270
  height: 0;
272
271
  margin-left: -1px;
273
272
  content: '';
273
+ float: left;
274
274
  }
275
275
 
276
276
  .#{$prefix}--aspect-ratio::after {
@@ -11,24 +11,24 @@
11
11
 
12
12
  @mixin css-grid() {
13
13
  display: grid;
14
+ padding-right: calc(var(--cds-grid-margin) + var(--cds-grid-gutter) / 2);
15
+ padding-left: calc(var(--cds-grid-margin) + var(--cds-grid-gutter) / 2);
16
+ margin-right: auto;
17
+ margin-left: auto;
18
+ column-gap: var(--cds-grid-gutter);
14
19
  grid-template-columns: repeat(
15
20
  var(--cds-grid-columns),
16
21
  minmax(0, var(--cds-grid-column-size))
17
22
  );
18
- margin-right: auto;
19
- margin-left: auto;
20
- padding-right: calc(var(--cds-grid-margin) + var(--cds-grid-gutter) / 2);
21
- padding-left: calc(var(--cds-grid-margin) + var(--cds-grid-gutter) / 2);
22
- column-gap: var(--cds-grid-gutter);
23
23
  }
24
24
 
25
25
  @mixin subgrid() {
26
26
  display: grid;
27
+ column-gap: var(--cds-grid-gutter);
27
28
  grid-template-columns: repeat(
28
29
  var(--cds-grid-columns),
29
30
  minmax(0, var(--cds-grid-column-size))
30
31
  );
31
- column-gap: var(--cds-grid-gutter);
32
32
  }
33
33
 
34
34
  :root {
@@ -68,19 +68,19 @@
68
68
  }
69
69
 
70
70
  .#{$prefix}--css-grid--narrow .#{$prefix}--subgrid.#{$prefix}--css-grid {
71
- margin-right: 0;
72
- margin-left: 0;
73
71
  padding-right: 0;
74
72
  padding-left: 0;
73
+ margin-right: 0;
74
+ margin-left: 0;
75
75
  }
76
76
 
77
77
  .#{$prefix}--css-grid--condensed .#{$prefix}--subgrid.#{$prefix}--css-grid {
78
78
  --cds-grid-gutter: 2rem;
79
79
 
80
- margin-right: 0;
81
- margin-left: 0;
82
80
  padding-right: calc(var(--cds-grid-gutter) / 2);
83
81
  padding-left: calc(var(--cds-grid-gutter) / 2);
82
+ margin-right: 0;
83
+ margin-left: 0;
84
84
  }
85
85
 
86
86
  // -----------------------------------------------------------------------------
@@ -58,11 +58,11 @@
58
58
  } @else {
59
59
  // Explicitly include `display: block` to override
60
60
  display: block;
61
- flex: 0 0 percentage($span / $columns);
62
61
  // Add a `max-width` to ensure content within each column does not blow out
63
62
  // the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
64
63
  // do not appear to require this.
65
64
  max-width: percentage($span / $columns);
65
+ flex: 0 0 percentage($span / $columns);
66
66
  }
67
67
  }
68
68
 
@@ -113,17 +113,17 @@
113
113
  // Provide basic `.col-{bp}` classes for equal-width flexbox columns
114
114
  .#{$prefix}--col,
115
115
  .#{$prefix}--col#{$infix} {
116
+ max-width: 100%;
116
117
  flex-basis: 0;
117
118
  flex-grow: 1;
118
- max-width: 100%;
119
119
  }
120
120
 
121
121
  .#{$prefix}--col--auto,
122
122
  .#{$prefix}--col#{$infix}--auto {
123
- flex: 1 0 0%;
124
123
  width: auto;
125
124
  // Reset earlier grid tiers
126
125
  max-width: 100%;
126
+ flex: 1 0 0%;
127
127
  }
128
128
 
129
129
  @for $i from 0 through $columns {
@@ -191,8 +191,11 @@
191
191
  $hover-field: map-get($theme, 'hover-field') !global;
192
192
  $danger: map-get($theme, 'danger') !global;
193
193
  $caption-01: map-get($theme, 'caption-01') !global;
194
+ $caption-02: map-get($theme, 'caption-02') !global;
194
195
  $label-01: map-get($theme, 'label-01') !global;
196
+ $label-02: map-get($theme, 'label-02') !global;
195
197
  $helper-text-01: map-get($theme, 'helper-text-01') !global;
198
+ $helper-text-02: map-get($theme, 'helper-text-02') !global;
196
199
  $body-short-01: map-get($theme, 'body-short-01') !global;
197
200
  $body-long-01: map-get($theme, 'body-long-01') !global;
198
201
  $body-short-02: map-get($theme, 'body-short-02') !global;
@@ -2493,11 +2496,26 @@
2493
2496
  @include custom-property('caption-01', map-get($theme, 'caption-01'));
2494
2497
  }
2495
2498
 
2499
+ @if should-emit(
2500
+ $theme,
2501
+ $parent-carbon-theme,
2502
+ 'caption-02',
2503
+ $emit-difference
2504
+ )
2505
+ {
2506
+ @include custom-property('caption-02', map-get($theme, 'caption-02'));
2507
+ }
2508
+
2496
2509
  @if should-emit($theme, $parent-carbon-theme, 'label-01', $emit-difference)
2497
2510
  {
2498
2511
  @include custom-property('label-01', map-get($theme, 'label-01'));
2499
2512
  }
2500
2513
 
2514
+ @if should-emit($theme, $parent-carbon-theme, 'label-02', $emit-difference)
2515
+ {
2516
+ @include custom-property('label-02', map-get($theme, 'label-02'));
2517
+ }
2518
+
2501
2519
  @if should-emit(
2502
2520
  $theme,
2503
2521
  $parent-carbon-theme,
@@ -2511,6 +2529,19 @@
2511
2529
  );
2512
2530
  }
2513
2531
 
2532
+ @if should-emit(
2533
+ $theme,
2534
+ $parent-carbon-theme,
2535
+ 'helper-text-02',
2536
+ $emit-difference
2537
+ )
2538
+ {
2539
+ @include custom-property(
2540
+ 'helper-text-02',
2541
+ map-get($theme, 'helper-text-02')
2542
+ );
2543
+ }
2544
+
2514
2545
  @if should-emit(
2515
2546
  $theme,
2516
2547
  $parent-carbon-theme,
@@ -34,7 +34,7 @@ $carbon--theme--white: (
34
34
  inverse-01: #ffffff,
35
35
  inverse-02: #393939,
36
36
  support-01: #da1e28,
37
- support-02: #24a148,
37
+ support-02: #198038,
38
38
  support-03: #f1c21b,
39
39
  support-04: #0043ce,
40
40
  inverse-support-01: #fa4d56,
@@ -99,7 +99,7 @@ $carbon--theme--white: (
99
99
  icon-on-color: #ffffff,
100
100
  icon-inverse: #ffffff,
101
101
  support-error: #da1e28,
102
- support-success: #24a148,
102
+ support-success: #198038,
103
103
  support-warning: #f1c21b,
104
104
  support-info: #0043ce,
105
105
  support-error-inverse: #fa4d56,
@@ -159,17 +159,34 @@ $carbon--theme--white: (
159
159
  line-height: 1.34,
160
160
  letter-spacing: 0.32px,
161
161
  ),
162
+ caption-02: (
163
+ font-size: 0.875rem,
164
+ font-weight: 400,
165
+ line-height: 1.29,
166
+ letter-spacing: 0.32px,
167
+ ),
162
168
  label-01: (
163
169
  font-size: 0.75rem,
164
170
  font-weight: 400,
165
171
  line-height: 1.34,
166
172
  letter-spacing: 0.32px,
167
173
  ),
174
+ label-02: (
175
+ font-size: 0.875rem,
176
+ font-weight: 400,
177
+ line-height: 1.29,
178
+ letter-spacing: 0.32px,
179
+ ),
168
180
  helper-text-01: (
169
181
  font-size: 0.75rem,
170
182
  line-height: 1.34,
171
183
  letter-spacing: 0.32px,
172
184
  ),
185
+ helper-text-02: (
186
+ font-size: 0.875rem,
187
+ line-height: 1.29,
188
+ letter-spacing: 0.32px,
189
+ ),
173
190
  body-short-01: (
174
191
  font-size: 0.875rem,
175
192
  font-weight: 400,
@@ -595,6 +612,140 @@ $carbon--theme--g10: map-merge(
595
612
  )
596
613
  ) !default;
597
614
 
615
+ /// Carbon's g80 color theme
616
+ /// @type Map
617
+ /// @access public
618
+ /// @group @carbon/themes
619
+ $carbon--theme--g80: map-merge(
620
+ $carbon--theme--white,
621
+ (
622
+ background: #393939,
623
+ layer: #525252,
624
+ layer-accent: #6f6f6f,
625
+ field: #525252,
626
+ background-inverse: #f4f4f4,
627
+ interactive: #78a9ff,
628
+ border-subtle: #6f6f6f,
629
+ border-strong: #a8a8a8,
630
+ border-inverse: #f4f4f4,
631
+ border-interactive: #4589ff,
632
+ text-primary: #f4f4f4,
633
+ text-secondary: #c6c6c6,
634
+ text-placeholder: #6f6f6f,
635
+ text-helper: #a8a8a8,
636
+ text-error: #ffb3b8,
637
+ text-inverse: #161616,
638
+ link-primary: #78a9ff,
639
+ link-secondary: #a6c8ff,
640
+ link-visited: #be95ff,
641
+ link-inverse: #0f62fe,
642
+ icon-primary: #f4f4f4,
643
+ icon-secondary: #c6c6c6,
644
+ icon-inverse: #161616,
645
+ support-error: #ff8389,
646
+ support-success: #42be65,
647
+ support-info: #4589ff,
648
+ support-error-inverse: #da1e28,
649
+ support-success-inverse: #24a148,
650
+ support-info-inverse: #0f62fe,
651
+ overlay: rgba(22, 22, 22, 0.7),
652
+ button-secondary: #6f6f6f,
653
+ button-tertiary: #ffffff,
654
+ button-danger-secondary: #ff8389,
655
+ button-separator: #161616,
656
+ background-active: #525252,
657
+ layer-active: #6f6f6f,
658
+ button-secondary-active: #525252,
659
+ button-tertiary-active: #c6c6c6,
660
+ focus: #ffffff,
661
+ focus-inset: #161616,
662
+ focus-inverse: #0f62fe,
663
+ highlight: #0043ce,
664
+ background-hover: #474747,
665
+ layer-hover: #636363,
666
+ field-hover: #636363,
667
+ background-inverse-hover: #e8e8e8,
668
+ link-primary-hover: #a6c8ff,
669
+ button-primary-hover: #0151e4,
670
+ button-secondary-hover: #5e5e5e,
671
+ button-tertiary-hover: #ffffff,
672
+ background-selected: #525252,
673
+ background-selected-hover: #636363,
674
+ layer-selected: #6f6f6f,
675
+ layer-selected-hover: #616161,
676
+ layer-selected-inverse: #f4f4f4,
677
+ border-subtle-selected: #8d8d8d,
678
+ layer-disabled: #525252,
679
+ field-disabled: #525252,
680
+ border-disabled: #525252,
681
+ text-disabled: #8d8d8d,
682
+ button-disabled: #8d8d8d,
683
+ icon-disabled: #8d8d8d,
684
+ text-on-color-disabled: #c6c6c6,
685
+ icon-on-color-disabled: #c6c6c6,
686
+ layer-selected-disabled: #c6c6c6,
687
+ skeleton-background: #474747,
688
+ skeleton-element: #6f6f6f,
689
+ interactive-02: #6f6f6f,
690
+ interactive-03: #ffffff,
691
+ interactive-04: #78a9ff,
692
+ ui-background: #393939,
693
+ ui-01: #525252,
694
+ ui-02: #525252,
695
+ ui-03: #6f6f6f,
696
+ ui-04: #a8a8a8,
697
+ ui-05: #f4f4f4,
698
+ text-01: #f4f4f4,
699
+ text-02: #c6c6c6,
700
+ text-03: #6f6f6f,
701
+ text-05: #a8a8a8,
702
+ icon-01: #f4f4f4,
703
+ icon-02: #c6c6c6,
704
+ link-01: #78a9ff,
705
+ link-02: #a6c8ff,
706
+ inverse-link: #0f62fe,
707
+ field-01: #525252,
708
+ field-02: #6f6f6f,
709
+ inverse-01: #161616,
710
+ inverse-02: #f4f4f4,
711
+ support-01: #ff8389,
712
+ support-02: #42be65,
713
+ support-04: #4589ff,
714
+ inverse-support-01: #da1e28,
715
+ inverse-support-02: #24a148,
716
+ inverse-support-04: #0f62fe,
717
+ overlay-01: rgba(22, 22, 22, 0.7),
718
+ danger-02: #ff8389,
719
+ inverse-focus-ui: #0f62fe,
720
+ hover-primary: #0151e4,
721
+ hover-primary-text: #a6c8ff,
722
+ hover-secondary: #5e5e5e,
723
+ active-secondary: #525252,
724
+ hover-tertiary: #ffffff,
725
+ active-tertiary: #c6c6c6,
726
+ hover-ui: #474747,
727
+ hover-light-ui: #5e5e5e,
728
+ active-ui: #525252,
729
+ active-light-ui: #8d8d8d,
730
+ selected-ui: #525252,
731
+ selected-light-ui: #8d8d8d,
732
+ inverse-hover-ui: #e8e8e8,
733
+ hover-selected-ui: #616161,
734
+ hover-row: #636363,
735
+ visited-link: #be95ff,
736
+ disabled-01: #525252,
737
+ disabled-02: #8d8d8d,
738
+ disabled-03: #c6c6c6,
739
+ decorative-01: #6f6f6f,
740
+ skeleton-01: #474747,
741
+ skeleton-02: #6f6f6f,
742
+ brand-02: #6f6f6f,
743
+ brand-03: #ffffff,
744
+ active-01: #525252,
745
+ hover-field: #474747,
746
+ )
747
+ ) !default;
748
+
598
749
  /// Carbon's g90 color theme
599
750
  /// @type Map
600
751
  /// @access public
@@ -1882,18 +2033,36 @@ $carbon--theme: (
1882
2033
  $caption-01,
1883
2034
  map-get($carbon--theme--white, 'caption-01')
1884
2035
  ),
2036
+ caption-02:
2037
+ if(
2038
+ global-variable-exists('caption-02'),
2039
+ $caption-02,
2040
+ map-get($carbon--theme--white, 'caption-02')
2041
+ ),
1885
2042
  label-01:
1886
2043
  if(
1887
2044
  global-variable-exists('label-01'),
1888
2045
  $label-01,
1889
2046
  map-get($carbon--theme--white, 'label-01')
1890
2047
  ),
2048
+ label-02:
2049
+ if(
2050
+ global-variable-exists('label-02'),
2051
+ $label-02,
2052
+ map-get($carbon--theme--white, 'label-02')
2053
+ ),
1891
2054
  helper-text-01:
1892
2055
  if(
1893
2056
  global-variable-exists('helper-text-01'),
1894
2057
  $helper-text-01,
1895
2058
  map-get($carbon--theme--white, 'helper-text-01')
1896
2059
  ),
2060
+ helper-text-02:
2061
+ if(
2062
+ global-variable-exists('helper-text-02'),
2063
+ $helper-text-02,
2064
+ map-get($carbon--theme--white, 'helper-text-02')
2065
+ ),
1897
2066
  body-short-01:
1898
2067
  if(
1899
2068
  global-variable-exists('body-short-01'),
@@ -308,7 +308,7 @@ $support-02: if(
308
308
  global-variable-exists('carbon--theme') and
309
309
  map-has-key($carbon--theme, 'support-02'),
310
310
  map-get($carbon--theme, 'support-02'),
311
- #24a148
311
+ #198038
312
312
  ) !default;
313
313
 
314
314
  /// Warning
@@ -987,7 +987,7 @@ $support-success: if(
987
987
  global-variable-exists('carbon--theme') and
988
988
  map-has-key($carbon--theme, 'support-success'),
989
989
  map-get($carbon--theme, 'support-success'),
990
- #24a148
990
+ #198038
991
991
  ) !default;
992
992
 
993
993
  /// @type {undefined}
@@ -1545,6 +1545,21 @@ $caption-01: if(
1545
1545
  )
1546
1546
  ) !default;
1547
1547
 
1548
+ /// @type {Number}
1549
+ /// @access public
1550
+ /// @group @carbon/themes
1551
+ $caption-02: if(
1552
+ global-variable-exists('carbon--theme') and
1553
+ map-has-key($carbon--theme, 'caption-02'),
1554
+ map-get($carbon--theme, 'caption-02'),
1555
+ (
1556
+ font-size: 0.875rem,
1557
+ font-weight: 400,
1558
+ line-height: 1.29,
1559
+ letter-spacing: 0.32px,
1560
+ )
1561
+ ) !default;
1562
+
1548
1563
  /// @type {Number}
1549
1564
  /// @access public
1550
1565
  /// @group @carbon/themes
@@ -1560,6 +1575,21 @@ $label-01: if(
1560
1575
  )
1561
1576
  ) !default;
1562
1577
 
1578
+ /// @type {Number}
1579
+ /// @access public
1580
+ /// @group @carbon/themes
1581
+ $label-02: if(
1582
+ global-variable-exists('carbon--theme') and
1583
+ map-has-key($carbon--theme, 'label-02'),
1584
+ map-get($carbon--theme, 'label-02'),
1585
+ (
1586
+ font-size: 0.875rem,
1587
+ font-weight: 400,
1588
+ line-height: 1.29,
1589
+ letter-spacing: 0.32px,
1590
+ )
1591
+ ) !default;
1592
+
1563
1593
  /// @type {Number}
1564
1594
  /// @access public
1565
1595
  /// @group @carbon/themes
@@ -1574,6 +1604,20 @@ $helper-text-01: if(
1574
1604
  )
1575
1605
  ) !default;
1576
1606
 
1607
+ /// @type {Number}
1608
+ /// @access public
1609
+ /// @group @carbon/themes
1610
+ $helper-text-02: if(
1611
+ global-variable-exists('carbon--theme') and
1612
+ map-has-key($carbon--theme, 'helper-text-02'),
1613
+ map-get($carbon--theme, 'helper-text-02'),
1614
+ (
1615
+ font-size: 0.875rem,
1616
+ line-height: 1.29,
1617
+ letter-spacing: 0.32px,
1618
+ )
1619
+ ) !default;
1620
+
1577
1621
  /// @type {Number}
1578
1622
  /// @access public
1579
1623
  /// @group @carbon/themes
@@ -29,7 +29,7 @@ $-custom-property-prefix: 'cds';
29
29
 
30
30
  /// @access public
31
31
  /// @group @carbon/themes
32
- @mixin set($active-theme) {
32
+ @mixin set-theme($active-theme) {
33
33
  $theme: $active-theme !global;
34
34
  }
35
35