@carbon/styles 1.8.0 → 1.10.0-rc.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.
@@ -53,6 +53,7 @@ describe('@carbon/styles/scss/type', () => {
53
53
  Array [
54
54
  "label-01",
55
55
  "helper-text-01",
56
+ "helper-text-02",
56
57
  "body-short-01",
57
58
  "body-short-02",
58
59
  "body-long-01",
package/scss/_zone.scss CHANGED
@@ -36,6 +36,9 @@ $-components: (
36
36
 
37
37
  @each $name, $theme in $zones {
38
38
  .#{config.$prefix}--#{'' + $name} {
39
+ background: var(--cds-background);
40
+ color: var(--cds-text-primary);
41
+
39
42
  @each $key, $value in $theme {
40
43
  @if type-of($value) == color {
41
44
  @include custom-property.declaration($key, $value);
@@ -8,6 +8,7 @@
8
8
  @use 'mixins' as *;
9
9
  @use 'vars' as *;
10
10
  @use '../../config' as *;
11
+ @use '../../breakpoint' as *;
11
12
  @use '../../motion' as *;
12
13
  @use '../../spacing' as *;
13
14
  @use '../../theme' as *;
@@ -52,6 +53,14 @@
52
53
  @include type-style('body-compact-01');
53
54
 
54
55
  color: $text-secondary;
56
+
57
+ @include breakpoint(md) {
58
+ max-width: 50ch;
59
+ }
60
+
61
+ @include breakpoint(lg) {
62
+ max-width: 80ch;
63
+ }
55
64
  }
56
65
 
57
66
  //----------------------------------------------------------------------------
@@ -12,6 +12,7 @@
12
12
  @use '../../utilities/convert' as *;
13
13
  @use '../../utilities/focus-outline' as *;
14
14
  @use '../../utilities/skeleton' as *;
15
+ @use '../..//utilities/button-reset';
15
16
 
16
17
  /// @type Number
17
18
  /// @access public
@@ -51,12 +52,44 @@ $input-label-weight: 400 !default;
51
52
  margin-bottom: 0;
52
53
  }
53
54
 
54
- .#{$prefix}--label .#{$prefix}--tooltip__trigger {
55
- // When tooltip trigger is put in form label the trigger button should fit in the size of label
56
- // https://github.com/IBM/carbon-components-react/issues/115
55
+ .#{$prefix}--label + .#{$prefix}--tooltip {
56
+ position: relative;
57
+ top: 0.2rem;
58
+ left: 0.5rem;
59
+ }
60
+
61
+ .#{$prefix}--label + .#{$prefix}--tooltip .#{$prefix}--tooltip__trigger {
62
+ @include button-reset.reset();
63
+
64
+ display: flex;
65
+ align-items: center;
66
+ justify-content: center;
57
67
  @include type-style('label-01');
58
68
  }
59
69
 
70
+ .#{$prefix}--label
71
+ + .#{$prefix}--tooltip
72
+ .#{$prefix}--tooltip__trigger:focus {
73
+ outline: 1px solid $focus;
74
+ }
75
+
76
+ .#{$prefix}--label + .#{$prefix}--tooltip .#{$prefix}--tooltip__trigger svg {
77
+ fill: $icon-secondary;
78
+ }
79
+
80
+ .#{$prefix}--label
81
+ + .#{$prefix}--tooltip
82
+ .#{$prefix}--tooltip__trigger
83
+ svg
84
+ :hover {
85
+ fill: $icon-primary;
86
+ }
87
+
88
+ .#{$prefix}--label + .#{$prefix}--toggletip {
89
+ top: 0.2rem;
90
+ left: 0.5rem;
91
+ }
92
+
60
93
  // Skeleton State
61
94
  .#{$prefix}--label.#{$prefix}--skeleton {
62
95
  @include skeleton;
@@ -146,6 +146,8 @@ $list-box-menu-width: rem(300px);
146
146
  }
147
147
 
148
148
  .#{$prefix}--list-box[data-invalid].#{$prefix}--list-box--inline
149
+ .#{$prefix}--list-box__field,
150
+ .#{$prefix}--list-box.#{$prefix}--list-box--warning.#{$prefix}--list-box--inline
149
151
  .#{$prefix}--list-box__field {
150
152
  padding-right: rem(56px);
151
153
  }
@@ -21,6 +21,7 @@
21
21
  $caption-01,
22
22
  $label-01,
23
23
  $helper-text-01,
24
+ $helper-text-02,
24
25
  $body-short-01,
25
26
  $body-short-02,
26
27
  $body-long-01,
@@ -20,6 +20,7 @@
20
20
  appearance: none;
21
21
  background: none;
22
22
  cursor: pointer;
23
+ text-align: start;
23
24
 
24
25
  @if ($width == true) {
25
26
  width: 100%;
@@ -0,0 +1,44 @@
1
+ @use '../breakpoint' as *;
2
+ @use '../config';
3
+
4
+ // Mixins that can be used to hide elements only at specific breakpoints.
5
+ // Helpful for when you would like to hide elements outside of a Grid context
6
+ @mixin hide-at-sm {
7
+ padding: 2rem 1rem;
8
+ background: #8a3ffc;
9
+ @include breakpoint-between('sm', 'md') {
10
+ display: none;
11
+ }
12
+ }
13
+
14
+ @mixin hide-at-md {
15
+ padding: 2rem 1rem;
16
+ background: #4589ff;
17
+ @include breakpoint-between('md', 'lg') {
18
+ display: none;
19
+ }
20
+ }
21
+
22
+ @mixin hide-at-lg {
23
+ padding: 2rem 1rem;
24
+ background: #42be65;
25
+ @include breakpoint-between('lg', 'xlg') {
26
+ display: none;
27
+ }
28
+ }
29
+
30
+ @mixin hide-at-xlg {
31
+ padding: 2rem 1rem;
32
+ background: #f1c21b;
33
+ @include breakpoint-between('xlg', 'max') {
34
+ display: none;
35
+ }
36
+ }
37
+
38
+ @mixin hide-at-max {
39
+ padding: 2rem 1rem;
40
+ background: #da1e28;
41
+ @include breakpoint-up('max') {
42
+ display: none;
43
+ }
44
+ }
@@ -10,6 +10,7 @@
10
10
  @forward 'component-reset' as component-*;
11
11
  @forward 'convert' show em, rem;
12
12
  @forward 'focus-outline';
13
+ @forward 'hide-at-breakpoint';
13
14
  @forward 'high-contrast-mode';
14
15
  @forward 'keyframes';
15
16
  @forward 'placeholder-colors';