@carbon/styles 1.31.2 → 1.32.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 +115 -64
- package/css/styles.min.css +1 -1
- package/package.json +2 -2
- package/scss/_layout.scss +2 -2
- package/scss/components/button/_button.scss +1 -0
- package/scss/components/contained-list/_contained-list.scss +1 -4
- package/scss/components/data-table/action/_data-table-action.scss +2 -2
- package/scss/components/fluid-search/_fluid-search.scss +3 -12
- package/scss/components/popover/_popover.scss +1 -4
- package/scss/components/progress-bar/_progress-bar.scss +1 -4
- package/scss/components/tile/_tile.scss +16 -11
- package/scss/components/toggle/_toggle.scss +26 -8
- package/scss/components/ui-shell/header/_header.scss +4 -0
- package/scss/utilities/_skeleton.scss +25 -0
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.32.0-rc.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"scss/**/*.css",
|
|
60
60
|
"css/**/*.css"
|
|
61
61
|
],
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "fe40fbf428231bd35f6bc8cc871ea09c7afa5051"
|
|
63
63
|
}
|
package/scss/_layout.scss
CHANGED
|
@@ -75,7 +75,7 @@ $layout-tokens: (
|
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
.#{$prefix}--layout-constraint--#{$group}
|
|
78
|
+
.#{$prefix}--layout-constraint--#{$group}__default-#{$step} {
|
|
79
79
|
@include custom-property.declaration(
|
|
80
80
|
'layout-#{$group}-#{$property}',
|
|
81
81
|
custom-property.get-var(
|
|
@@ -89,7 +89,7 @@ $layout-tokens: (
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
@each $constraint in ('min', 'max') {
|
|
92
|
-
.#{$prefix}--layout-constraint--#{$group}
|
|
92
|
+
.#{$prefix}--layout-constraint--#{$group}__#{$constraint}-#{$step} {
|
|
93
93
|
@include custom-property.declaration(
|
|
94
94
|
'layout-#{$group}-#{$property}-#{$constraint}',
|
|
95
95
|
custom-property.get-var(
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
@use '../../../utilities/button-reset';
|
|
14
14
|
@use '../../../utilities/convert' as *;
|
|
15
15
|
@use '../../../utilities/focus-outline' as *;
|
|
16
|
-
@use '../../button/vars' as *;
|
|
17
16
|
|
|
18
17
|
/// Data table action styles
|
|
19
18
|
/// @access public
|
|
@@ -411,7 +410,8 @@
|
|
|
411
410
|
}
|
|
412
411
|
|
|
413
412
|
.#{$prefix}--action-list .#{$prefix}--btn {
|
|
414
|
-
padding: $
|
|
413
|
+
padding-right: $spacing-05;
|
|
414
|
+
padding-left: $spacing-05;
|
|
415
415
|
color: $text-on-color;
|
|
416
416
|
white-space: nowrap;
|
|
417
417
|
}
|
|
@@ -58,35 +58,26 @@
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
.#{$prefix}--search--fluid .#{$prefix}--search-magnifier-icon {
|
|
61
|
-
|
|
62
|
-
right: 1rem;
|
|
63
|
-
bottom: rem(13px);
|
|
64
|
-
left: auto;
|
|
61
|
+
inset: auto 1rem rem(13px) auto;
|
|
65
62
|
transform: none;
|
|
66
63
|
}
|
|
67
64
|
|
|
68
65
|
.#{$prefix}--search--fluid .#{$prefix}--search-close {
|
|
69
|
-
top: auto;
|
|
70
|
-
right: rem(48px);
|
|
71
|
-
bottom: 0;
|
|
72
|
-
left: auto;
|
|
73
66
|
width: rem(40px);
|
|
74
67
|
height: rem(40px);
|
|
75
68
|
border: none;
|
|
69
|
+
inset: auto rem(48px) 0 auto;
|
|
76
70
|
transition: background-color $duration-fast-01 motion(standard, productive);
|
|
77
71
|
}
|
|
78
72
|
|
|
79
73
|
.#{$prefix}--search--fluid .#{$prefix}--search-close::before {
|
|
80
74
|
position: absolute;
|
|
81
|
-
top: auto;
|
|
82
|
-
right: rem(-1px);
|
|
83
|
-
bottom: rem(14px);
|
|
84
|
-
left: auto;
|
|
85
75
|
display: block;
|
|
86
76
|
width: rem(1px);
|
|
87
77
|
height: 1rem;
|
|
88
78
|
background: $border-subtle;
|
|
89
79
|
content: '';
|
|
80
|
+
inset: auto rem(-1px) rem(14px) auto;
|
|
90
81
|
}
|
|
91
82
|
|
|
92
83
|
.#{$prefix}--search--fluid
|
|
@@ -110,11 +110,8 @@ $popover-caret-height: custom-property.get-var(
|
|
|
110
110
|
.#{$prefix}--popover {
|
|
111
111
|
position: absolute;
|
|
112
112
|
z-index: z('floating');
|
|
113
|
-
top: 0;
|
|
114
|
-
right: 0;
|
|
115
|
-
bottom: 0;
|
|
116
|
-
left: 0;
|
|
117
113
|
filter: $popover-drop-shadow;
|
|
114
|
+
inset: 0;
|
|
118
115
|
pointer-events: none;
|
|
119
116
|
}
|
|
120
117
|
|
|
@@ -68,10 +68,6 @@
|
|
|
68
68
|
.#{$prefix}--progress-bar--indeterminate
|
|
69
69
|
.#{$prefix}--progress-bar__track::after {
|
|
70
70
|
position: absolute;
|
|
71
|
-
top: 0;
|
|
72
|
-
right: 0;
|
|
73
|
-
bottom: 0;
|
|
74
|
-
left: 0;
|
|
75
71
|
animation-duration: 1400ms;
|
|
76
72
|
animation-iteration-count: infinite;
|
|
77
73
|
animation-name: progress-bar-indeterminate;
|
|
@@ -84,6 +80,7 @@
|
|
|
84
80
|
background-position-x: 0%;
|
|
85
81
|
background-size: 200% 100%;
|
|
86
82
|
content: '';
|
|
83
|
+
inset: 0;
|
|
87
84
|
}
|
|
88
85
|
|
|
89
86
|
.#{$prefix}--progress-bar__helper-text {
|
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
@use '../../utilities/focus-outline' as *;
|
|
17
17
|
@use '../../utilities/high-contrast-mode' as *;
|
|
18
18
|
@use '../../utilities/visually-hidden' as *;
|
|
19
|
+
@use '../../utilities/layout';
|
|
20
|
+
|
|
21
|
+
// padding + icon size (1rem) + padding
|
|
22
|
+
$-icon-container-size: calc(#{layout.density('padding-inline')} * 2 + 1rem);
|
|
19
23
|
|
|
20
24
|
/// Tile styles
|
|
21
25
|
/// @access public
|
|
@@ -26,11 +30,13 @@
|
|
|
26
30
|
}
|
|
27
31
|
|
|
28
32
|
.#{$prefix}--tile {
|
|
33
|
+
@include layout.use('density', $default: 'normal');
|
|
34
|
+
|
|
29
35
|
position: relative;
|
|
30
36
|
display: block;
|
|
31
37
|
min-width: 8rem;
|
|
32
38
|
min-height: 4rem;
|
|
33
|
-
padding:
|
|
39
|
+
padding: layout.density('padding-inline');
|
|
34
40
|
background-color: $layer;
|
|
35
41
|
outline: 2px solid transparent;
|
|
36
42
|
outline-offset: -2px;
|
|
@@ -99,7 +105,6 @@
|
|
|
99
105
|
.#{$prefix}--tile--clickable.#{$prefix}--link--disabled,
|
|
100
106
|
.#{$prefix}--tile--clickable:hover.#{$prefix}--link--disabled {
|
|
101
107
|
display: block;
|
|
102
|
-
padding: $spacing-05;
|
|
103
108
|
background-color: $layer;
|
|
104
109
|
color: $text-disabled;
|
|
105
110
|
cursor: not-allowed;
|
|
@@ -116,8 +121,8 @@
|
|
|
116
121
|
.#{$prefix}--tile--clickable.#{$prefix}--link--disabled
|
|
117
122
|
.#{$prefix}--tile--disabled-icon {
|
|
118
123
|
position: absolute;
|
|
119
|
-
right:
|
|
120
|
-
bottom:
|
|
124
|
+
right: layout.density('padding-inline');
|
|
125
|
+
bottom: layout.density('padding-inline');
|
|
121
126
|
}
|
|
122
127
|
|
|
123
128
|
.#{$prefix}--tile--clickable .#{$prefix}--tile--icon {
|
|
@@ -135,8 +140,8 @@
|
|
|
135
140
|
}
|
|
136
141
|
|
|
137
142
|
.#{$prefix}--tile--selectable {
|
|
138
|
-
padding-right: $spacing-09;
|
|
139
143
|
border: 1px solid transparent;
|
|
144
|
+
padding-inline-end: $-icon-container-size;
|
|
140
145
|
|
|
141
146
|
@if (
|
|
142
147
|
enabled('enable-experimental-tile-contrast') or
|
|
@@ -148,8 +153,8 @@
|
|
|
148
153
|
|
|
149
154
|
.#{$prefix}--tile__checkmark {
|
|
150
155
|
position: absolute;
|
|
151
|
-
top:
|
|
152
|
-
right:
|
|
156
|
+
top: layout.density('padding-inline');
|
|
157
|
+
right: layout.density('padding-inline');
|
|
153
158
|
height: 1rem;
|
|
154
159
|
border: none;
|
|
155
160
|
background: transparent;
|
|
@@ -175,8 +180,8 @@
|
|
|
175
180
|
right: 0;
|
|
176
181
|
bottom: 0;
|
|
177
182
|
display: flex;
|
|
178
|
-
width:
|
|
179
|
-
height:
|
|
183
|
+
width: $-icon-container-size;
|
|
184
|
+
height: $-icon-container-size;
|
|
180
185
|
align-items: center;
|
|
181
186
|
justify-content: center;
|
|
182
187
|
|
|
@@ -205,8 +210,8 @@
|
|
|
205
210
|
right: 0;
|
|
206
211
|
bottom: 0;
|
|
207
212
|
display: flex;
|
|
208
|
-
width:
|
|
209
|
-
height:
|
|
213
|
+
width: $-icon-container-size;
|
|
214
|
+
height: $-icon-container-size;
|
|
210
215
|
align-items: center;
|
|
211
216
|
justify-content: center;
|
|
212
217
|
|
|
@@ -77,10 +77,8 @@
|
|
|
77
77
|
.#{$prefix}--toggle__button:focus
|
|
78
78
|
+ .#{$prefix}--toggle__label
|
|
79
79
|
.#{$prefix}--toggle__switch,
|
|
80
|
-
.#{$prefix}--
|
|
81
|
-
|
|
82
|
-
.#{$prefix}--toggle__switch,
|
|
83
|
-
.#{$prefix}--toggle:active .#{$prefix}--toggle__switch {
|
|
80
|
+
.#{$prefix}--toggle:not(.#{$prefix}--toggle--disabled):active
|
|
81
|
+
.#{$prefix}--toggle__switch {
|
|
84
82
|
box-shadow: 0 0 0 1px $focus-inset, 0 0 0 3px $focus;
|
|
85
83
|
}
|
|
86
84
|
|
|
@@ -192,10 +190,30 @@
|
|
|
192
190
|
.#{$prefix}--toggle__button:focus
|
|
193
191
|
+ .#{$prefix}--toggle__label
|
|
194
192
|
.#{$prefix}--toggle__switch,
|
|
195
|
-
.#{$prefix}--
|
|
196
|
-
|
|
197
|
-
.#{$prefix}--toggle__switch,
|
|
198
|
-
.#{$prefix}--toggle:active .#{$prefix}--toggle__switch {
|
|
193
|
+
.#{$prefix}--toggle:not(.#{$prefix}--toggle--disabled):active
|
|
194
|
+
.#{$prefix}--toggle__switch {
|
|
199
195
|
@include high-contrast-mode('focus');
|
|
200
196
|
}
|
|
197
|
+
|
|
198
|
+
// Skeleton state
|
|
199
|
+
.#{$prefix}--toggle--skeleton {
|
|
200
|
+
display: flex;
|
|
201
|
+
align-items: center;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.#{$prefix}--toggle--skeleton .#{$prefix}--toggle__skeleton-circle {
|
|
205
|
+
@include circular-skeleton;
|
|
206
|
+
|
|
207
|
+
width: rem(18px);
|
|
208
|
+
height: rem(18px);
|
|
209
|
+
border-radius: 50%;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.#{$prefix}--toggle--skeleton .#{$prefix}--toggle__skeleton-rectangle {
|
|
213
|
+
@include skeleton;
|
|
214
|
+
|
|
215
|
+
width: rem(24px);
|
|
216
|
+
height: rem(8px);
|
|
217
|
+
margin-left: rem(8px);
|
|
218
|
+
}
|
|
201
219
|
}
|
|
@@ -42,3 +42,28 @@
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
+
|
|
46
|
+
/// Circular Skeleton loading animation
|
|
47
|
+
/// @access public
|
|
48
|
+
/// @example @include circular-skeleton;
|
|
49
|
+
/// @group utilities
|
|
50
|
+
@mixin circular-skeleton {
|
|
51
|
+
position: relative;
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
background: $skeleton-background;
|
|
54
|
+
border-radius: 50%;
|
|
55
|
+
|
|
56
|
+
&::before {
|
|
57
|
+
position: absolute;
|
|
58
|
+
width: 200%;
|
|
59
|
+
height: 100%;
|
|
60
|
+
animation: 3000ms ease-in-out skeleton infinite;
|
|
61
|
+
background: $skeleton-element;
|
|
62
|
+
content: '';
|
|
63
|
+
will-change: transform-origin, transform, opacity;
|
|
64
|
+
|
|
65
|
+
@media (prefers-reduced-motion: reduce) {
|
|
66
|
+
animation: none;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|