@carbon/styles 1.3.0-rc.0 → 1.4.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 +21965 -0
- package/css/styles.min.css +1 -0
- package/index.scss +1 -1
- package/package.json +13 -2
- package/scss/__tests__/type-test.js +10 -0
- package/scss/components/checkbox/_checkbox.scss +4 -1
- package/scss/components/copy-button/_copy-button.scss +4 -0
- package/scss/components/link/_link.scss +4 -2
- package/scss/components/modal/_modal.scss +4 -0
- package/scss/components/structured-list/_structured-list.scss +4 -3
- package/scss/components/toggle/_toggle.scss +2 -0
- package/scss/type/_index.scss +3 -0
package/index.scss
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
@forward 'scss/config';
|
|
9
9
|
@forward 'scss/colors' hide $white;
|
|
10
|
-
@forward 'scss/grid';
|
|
11
10
|
@forward 'scss/motion';
|
|
12
11
|
@forward 'scss/type';
|
|
13
12
|
@forward 'scss/themes';
|
|
@@ -15,6 +14,7 @@
|
|
|
15
14
|
|
|
16
15
|
@use 'scss/reset';
|
|
17
16
|
@forward 'scss/fonts';
|
|
17
|
+
@forward 'scss/grid';
|
|
18
18
|
@forward 'scss/layer';
|
|
19
19
|
@forward 'scss/zone';
|
|
20
20
|
@use 'scss/components';
|
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": "1.
|
|
4
|
+
"version": "1.4.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -17,12 +17,17 @@
|
|
|
17
17
|
"react"
|
|
18
18
|
],
|
|
19
19
|
"files": [
|
|
20
|
+
"css",
|
|
20
21
|
"scss",
|
|
21
22
|
"index.scss"
|
|
22
23
|
],
|
|
23
24
|
"publishConfig": {
|
|
24
25
|
"access": "public"
|
|
25
26
|
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "yarn clean && node tasks/build-css.js",
|
|
29
|
+
"clean": "rimraf css"
|
|
30
|
+
},
|
|
26
31
|
"peerDependencies": {
|
|
27
32
|
"sass": "^1.33.0"
|
|
28
33
|
},
|
|
@@ -38,7 +43,13 @@
|
|
|
38
43
|
},
|
|
39
44
|
"devDependencies": {
|
|
40
45
|
"@carbon/test-utils": "^10.24.0-rc.0",
|
|
46
|
+
"autoprefixer": "^10.4.7",
|
|
47
|
+
"browserslist-config-carbon": "^11.0.0",
|
|
41
48
|
"css": "^3.0.0",
|
|
49
|
+
"cssnano": "^5.1.9",
|
|
50
|
+
"postcss": "^8.4.14",
|
|
51
|
+
"postcss-flexbugs-fixes": "^5.0.2",
|
|
52
|
+
"rimraf": "^3.0.2",
|
|
42
53
|
"sass": "^1.51.0"
|
|
43
54
|
},
|
|
44
55
|
"sideEffects": [
|
|
@@ -46,5 +57,5 @@
|
|
|
46
57
|
"scss/**/*.scss",
|
|
47
58
|
"scss/**/*.css"
|
|
48
59
|
],
|
|
49
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "3536b86f990a6016dfbeac9dd118fc21c4431dcb"
|
|
50
61
|
}
|
|
@@ -27,19 +27,27 @@ describe('@carbon/styles/scss/type', () => {
|
|
|
27
27
|
reset: meta.mixin-exists('reset', 'type'),
|
|
28
28
|
type-style: meta.mixin-exists('type-style', 'type'),
|
|
29
29
|
font-family: meta.mixin-exists('font-family', 'type'),
|
|
30
|
+
font-weight: meta.mixin-exists('font-family', 'type'),
|
|
30
31
|
default-type: meta.mixin-exists('default-type', 'type'),
|
|
31
32
|
type-classes: meta.mixin-exists('type-classes', 'type'),
|
|
32
33
|
),
|
|
34
|
+
functions: (
|
|
35
|
+
font-weight: meta.function-exists('font-family', 'type'),
|
|
36
|
+
),
|
|
33
37
|
));
|
|
34
38
|
`);
|
|
35
39
|
|
|
36
40
|
const { value: api } = get('api');
|
|
41
|
+
expect(api.functions).toEqual({
|
|
42
|
+
'font-weight': true,
|
|
43
|
+
});
|
|
37
44
|
expect(api.mixins).toEqual({
|
|
38
45
|
reset: true,
|
|
39
46
|
'type-style': true,
|
|
40
47
|
'font-family': true,
|
|
41
48
|
'default-type': true,
|
|
42
49
|
'type-classes': true,
|
|
50
|
+
'font-weight': true,
|
|
43
51
|
});
|
|
44
52
|
expect(api.variables).toMatchInlineSnapshot(`
|
|
45
53
|
Array [
|
|
@@ -73,6 +81,8 @@ describe('@carbon/styles/scss/type', () => {
|
|
|
73
81
|
"display-02",
|
|
74
82
|
"display-03",
|
|
75
83
|
"display-04",
|
|
84
|
+
"font-families",
|
|
85
|
+
"font-weights",
|
|
76
86
|
"tokens",
|
|
77
87
|
]
|
|
78
88
|
`);
|
|
@@ -123,8 +123,8 @@
|
|
|
123
123
|
.#{$prefix}--checkbox:indeterminate + .#{$prefix}--checkbox-label::before,
|
|
124
124
|
.#{$prefix}--checkbox-label[data-contained-checkbox-state='true']::before,
|
|
125
125
|
.#{$prefix}--checkbox-label[data-contained-checkbox-state='mixed']::before {
|
|
126
|
+
border: none;
|
|
126
127
|
border-width: 1px;
|
|
127
|
-
border-color: $icon-primary;
|
|
128
128
|
background-color: $icon-primary;
|
|
129
129
|
}
|
|
130
130
|
|
|
@@ -187,6 +187,9 @@
|
|
|
187
187
|
//-----------------------------------------------
|
|
188
188
|
// Skeleton
|
|
189
189
|
//-----------------------------------------------
|
|
190
|
+
.#{$prefix}--checkbox-skeleton .#{$prefix}--checkbox-label {
|
|
191
|
+
cursor: default;
|
|
192
|
+
}
|
|
190
193
|
|
|
191
194
|
.#{$prefix}--checkbox-label-text.#{$prefix}--skeleton {
|
|
192
195
|
@include skeleton;
|
|
@@ -67,6 +67,10 @@
|
|
|
67
67
|
display: block;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
+
&.#{$prefix}--copy-btn--animating::before {
|
|
71
|
+
border: none;
|
|
72
|
+
}
|
|
73
|
+
|
|
70
74
|
&.#{$prefix}--copy-btn--animating.#{$prefix}--copy-btn--fade-out::before,
|
|
71
75
|
&.#{$prefix}--copy-btn--animating.#{$prefix}--copy-btn--fade-out
|
|
72
76
|
.#{$prefix}--copy-btn__feedback {
|
|
@@ -97,11 +97,13 @@ $link-focus-text-color: custom-property.get-var(
|
|
|
97
97
|
text-decoration: underline;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
.#{$prefix}--link--sm
|
|
100
|
+
.#{$prefix}--link--sm,
|
|
101
|
+
.#{$prefix}--link--sm.#{$prefix}--link--disabled:hover {
|
|
101
102
|
@include type.type-style('helper-text-01');
|
|
102
103
|
}
|
|
103
104
|
|
|
104
|
-
.#{$prefix}--link--lg
|
|
105
|
+
.#{$prefix}--link--lg,
|
|
106
|
+
.#{$prefix}--link--lg.#{$prefix}--link--disabled:hover {
|
|
105
107
|
@include type.type-style('body-compact-02');
|
|
106
108
|
}
|
|
107
109
|
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
display: table-row;
|
|
84
84
|
border-bottom: 1px solid $border-subtle;
|
|
85
85
|
transition: background-color motion.$duration-fast-02
|
|
86
|
-
motion(standard, productive);
|
|
86
|
+
motion.motion(standard, productive);
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
.#{$prefix}--structured-list--selection
|
|
@@ -162,7 +162,8 @@
|
|
|
162
162
|
border-top: 1px solid $border-subtle;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
transition: color motion.$duration-fast-02
|
|
165
|
+
transition: color motion.$duration-fast-02
|
|
166
|
+
motion.motion(standard, productive);
|
|
166
167
|
}
|
|
167
168
|
|
|
168
169
|
.#{$prefix}--structured-list-content--nowrap {
|
|
@@ -172,7 +173,7 @@
|
|
|
172
173
|
.#{$prefix}--structured-list-svg {
|
|
173
174
|
display: inline-block;
|
|
174
175
|
fill: transparent;
|
|
175
|
-
transition: all motion.$duration-fast-02 motion(standard, productive);
|
|
176
|
+
transition: all motion.$duration-fast-02 motion.motion(standard, productive);
|
|
176
177
|
vertical-align: middle;
|
|
177
178
|
}
|
|
178
179
|
|
package/scss/type/_index.scss
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
font-family,
|
|
14
14
|
default-type,
|
|
15
15
|
type-classes,
|
|
16
|
+
font-weight,
|
|
16
17
|
|
|
17
18
|
// Variables
|
|
18
19
|
$caption-01,
|
|
@@ -46,6 +47,8 @@
|
|
|
46
47
|
$display-02,
|
|
47
48
|
$display-03,
|
|
48
49
|
$display-04,
|
|
50
|
+
$font-families,
|
|
51
|
+
$font-weights,
|
|
49
52
|
$tokens;
|
|
50
53
|
|
|
51
54
|
@use '@carbon/type';
|