@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.
- package/css/styles.css +102 -2
- package/css/styles.min.css +1 -1
- package/index.scss +1 -0
- package/package.json +8 -8
- package/scss/__tests__/__snapshots__/type-test.js.snap +1414 -1331
- package/scss/__tests__/type-test.js +1 -0
- package/scss/_zone.scss +3 -0
- package/scss/components/data-table/_data-table.scss +9 -0
- package/scss/components/form/_form.scss +36 -3
- package/scss/components/list-box/_list-box.scss +2 -0
- package/scss/type/_index.scss +1 -0
- package/scss/utilities/_button-reset.scss +1 -0
- package/scss/utilities/_hide-at-breakpoint.scss +44 -0
- package/scss/utilities/_index.scss +1 -0
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}--
|
|
55
|
-
|
|
56
|
-
|
|
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
|
}
|
package/scss/type/_index.scss
CHANGED
|
@@ -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
|
+
}
|