@carbon/styles 1.33.0 → 1.34.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 +58 -28
- package/css/styles.min.css +1 -1
- package/package.json +8 -8
- package/scss/components/button/_button.scss +5 -0
- package/scss/components/button/_mixins.scss +8 -2
- package/scss/components/code-snippet/_code-snippet.scss +2 -0
- package/scss/components/overflow-menu/_overflow-menu.scss +1 -0
- package/scss/components/popover/_popover.scss +4 -0
- package/scss/components/search/_search.scss +4 -0
- package/scss/components/tabs/_tabs.scss +28 -27
- package/scss/components/tile/_tile.scss +1 -0
- package/scss/components/toggletip/_toggletip.scss +4 -0
- package/scss/components/treeview/_treeview.scss +13 -3
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.34.0-rc.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@carbon/colors": "^11.
|
|
40
|
+
"@carbon/colors": "^11.18.0-rc.0",
|
|
41
41
|
"@carbon/feature-flags": "^0.15.0",
|
|
42
|
-
"@carbon/grid": "^11.
|
|
43
|
-
"@carbon/layout": "^11.
|
|
44
|
-
"@carbon/motion": "^11.
|
|
45
|
-
"@carbon/themes": "^11.
|
|
46
|
-
"@carbon/type": "^11.
|
|
42
|
+
"@carbon/grid": "^11.17.0-rc.0",
|
|
43
|
+
"@carbon/layout": "^11.17.0-rc.0",
|
|
44
|
+
"@carbon/motion": "^11.14.0-rc.0",
|
|
45
|
+
"@carbon/themes": "^11.22.0-rc.0",
|
|
46
|
+
"@carbon/type": "^11.21.0-rc.0",
|
|
47
47
|
"@ibm/plex": "6.0.0-next.6"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"scss/**/*.css",
|
|
65
65
|
"css/**/*.css"
|
|
66
66
|
],
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "52fd3db75951b341e4abb3af2e7441da6639bfa4"
|
|
68
68
|
}
|
|
@@ -302,6 +302,11 @@
|
|
|
302
302
|
//expressive styles
|
|
303
303
|
.#{$prefix}--btn--expressive {
|
|
304
304
|
@include type-style('body-compact-02');
|
|
305
|
+
|
|
306
|
+
padding-block: min(
|
|
307
|
+
calc((layout.size('height') - var(--temp-expressive-1lh)) / 2 - rem(1px)),
|
|
308
|
+
var(--temp-padding-block-max)
|
|
309
|
+
);
|
|
305
310
|
}
|
|
306
311
|
|
|
307
312
|
.#{$prefix}--btn--icon-only.#{$prefix}--btn--expressive {
|
|
@@ -29,6 +29,12 @@ $button-focus-color: custom-property.get-var('button-focus-color', $focus);
|
|
|
29
29
|
map.get($body-compact-01, line-height)
|
|
30
30
|
)} * 1em
|
|
31
31
|
);
|
|
32
|
+
--temp-expressive-1lh: (
|
|
33
|
+
#{custom-property.get-var(
|
|
34
|
+
'body-compact-02-line-height',
|
|
35
|
+
map.get($body-compact-02, line-height)
|
|
36
|
+
)} * 1em
|
|
37
|
+
);
|
|
32
38
|
// -1px to compensate for border width
|
|
33
39
|
--temp-padding-block-max: calc(
|
|
34
40
|
(#{custom-property.get-var('layout-size-height-lg')} - var(--temp-1lh)) / 2 -
|
|
@@ -42,7 +48,7 @@ $button-focus-color: custom-property.get-var('button-focus-color', $focus);
|
|
|
42
48
|
display: inline-flex;
|
|
43
49
|
width: max-content;
|
|
44
50
|
max-width: rem(320px);
|
|
45
|
-
height: layout.size('height');
|
|
51
|
+
min-height: layout.size('height');
|
|
46
52
|
flex-shrink: 0;
|
|
47
53
|
justify-content: space-between;
|
|
48
54
|
// Fix to remove added margins on buttons in safari (see #5155)
|
|
@@ -51,7 +57,7 @@ $button-focus-color: custom-property.get-var('button-focus-color', $focus);
|
|
|
51
57
|
cursor: pointer;
|
|
52
58
|
outline: none;
|
|
53
59
|
// -1px to compensate for border width
|
|
54
|
-
padding-block
|
|
60
|
+
padding-block: min(
|
|
55
61
|
calc((layout.size('height') - var(--temp-1lh)) / 2 - rem(1px)),
|
|
56
62
|
var(--temp-padding-block-max)
|
|
57
63
|
);
|
|
@@ -306,6 +306,7 @@ $copy-btn-feedback: $background-inverse !default;
|
|
|
306
306
|
.#{$prefix}--snippet--inline.#{$prefix}--btn {
|
|
307
307
|
width: initial;
|
|
308
308
|
height: 1.25rem;
|
|
309
|
+
min-height: 1.25rem;
|
|
309
310
|
padding-inline: 0;
|
|
310
311
|
}
|
|
311
312
|
|
|
@@ -334,6 +335,7 @@ $copy-btn-feedback: $background-inverse !default;
|
|
|
334
335
|
right: 0;
|
|
335
336
|
bottom: 0;
|
|
336
337
|
display: inline-flex;
|
|
338
|
+
height: rem(32px);
|
|
337
339
|
align-items: center;
|
|
338
340
|
|
|
339
341
|
padding: $spacing-03 $spacing-05;
|
|
@@ -392,6 +392,10 @@ $popover-caret-height: custom-property.get-var(
|
|
|
392
392
|
border-radius: 0;
|
|
393
393
|
}
|
|
394
394
|
|
|
395
|
+
.#{$prefix}--popover--tab-tip .#{$prefix}--popover {
|
|
396
|
+
will-change: filter;
|
|
397
|
+
}
|
|
398
|
+
|
|
395
399
|
.#{$prefix}--popover--tab-tip__button {
|
|
396
400
|
@include button-reset.reset;
|
|
397
401
|
|
|
@@ -350,6 +350,10 @@
|
|
|
350
350
|
.#{$prefix}--search--expandable .#{$prefix}--search-magnifier {
|
|
351
351
|
position: absolute;
|
|
352
352
|
cursor: pointer;
|
|
353
|
+
|
|
354
|
+
&:focus {
|
|
355
|
+
outline: 2px solid $focus;
|
|
356
|
+
}
|
|
353
357
|
}
|
|
354
358
|
|
|
355
359
|
.#{$prefix}--search--expandable .#{$prefix}--search-magnifier:hover {
|
|
@@ -31,27 +31,37 @@
|
|
|
31
31
|
@use '../../utilities/button-reset';
|
|
32
32
|
@use '../../utilities/high-contrast-mode' as *;
|
|
33
33
|
@use '../../utilities/convert' as *;
|
|
34
|
-
|
|
35
|
-
$icon-tab-size: custom-property.get-var('icon-tab-size', rem(40px));
|
|
34
|
+
@use '../../utilities/layout';
|
|
36
35
|
|
|
37
36
|
/// Tabs styles
|
|
38
37
|
/// @access public
|
|
39
38
|
/// @group tabs
|
|
40
39
|
@mixin tabs {
|
|
40
|
+
.#{$prefix}--tabs,
|
|
41
|
+
.#{$prefix}--tab-content {
|
|
42
|
+
@include layout.use('density', $default: 'normal');
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.#{$prefix}--tabs.#{$prefix}--tabs--tall,
|
|
46
|
+
.#{$prefix}--tabs.#{$prefix}--tabs--contained.#{$prefix}--tabs--tall {
|
|
47
|
+
@include layout.use('size', $min: 'lg', $max: 'xl', $default: 'xl');
|
|
48
|
+
}
|
|
49
|
+
|
|
41
50
|
.#{$prefix}--tabs {
|
|
42
51
|
@include reset;
|
|
43
52
|
@include type-style('body-compact-01');
|
|
53
|
+
@include layout.use('size', $min: 'sm', $max: 'lg', $default: 'md');
|
|
44
54
|
|
|
45
55
|
position: relative;
|
|
46
56
|
display: flex;
|
|
47
57
|
width: 100%;
|
|
48
58
|
height: auto;
|
|
49
|
-
min-height:
|
|
50
|
-
max-height:
|
|
59
|
+
min-height: layout.size('height');
|
|
60
|
+
max-height: custom-property.get-var('layout-size-height-xl');
|
|
51
61
|
color: $text-primary;
|
|
52
62
|
|
|
53
63
|
&.#{$prefix}--tabs--contained {
|
|
54
|
-
min
|
|
64
|
+
@include layout.use('size', $min: 'sm', $max: 'xl', $default: 'lg');
|
|
55
65
|
}
|
|
56
66
|
|
|
57
67
|
.#{$prefix}--tab--list {
|
|
@@ -241,6 +251,12 @@ $icon-tab-size: custom-property.get-var('icon-tab-size', rem(40px));
|
|
|
241
251
|
display: flex;
|
|
242
252
|
}
|
|
243
253
|
|
|
254
|
+
&:not(.#{$prefix}--tabs--contained)
|
|
255
|
+
.#{$prefix}--tabs__nav-item-label-wrapper {
|
|
256
|
+
position: relative;
|
|
257
|
+
top: rem(1px);
|
|
258
|
+
}
|
|
259
|
+
|
|
244
260
|
//-----------------------------
|
|
245
261
|
// Item
|
|
246
262
|
//-----------------------------
|
|
@@ -285,11 +301,6 @@ $icon-tab-size: custom-property.get-var('icon-tab-size', rem(40px));
|
|
|
285
301
|
.#{$prefix}--tabs__nav-item:not(.#{$prefix}--tabs__nav-item--disabled)
|
|
286
302
|
.#{$prefix}--tabs__nav-item--icon
|
|
287
303
|
.#{$prefix}--tabs__nav-item--close-icon {
|
|
288
|
-
padding: $spacing-05;
|
|
289
|
-
margin-top: -$spacing-03;
|
|
290
|
-
margin-right: -$spacing-05;
|
|
291
|
-
margin-left: -$spacing-05;
|
|
292
|
-
|
|
293
304
|
&:hover {
|
|
294
305
|
background-color: inherit;
|
|
295
306
|
}
|
|
@@ -343,7 +354,7 @@ $icon-tab-size: custom-property.get-var('icon-tab-size', rem(40px));
|
|
|
343
354
|
}
|
|
344
355
|
|
|
345
356
|
&.#{$prefix}--tabs--contained .#{$prefix}--tabs__nav-item--icon {
|
|
346
|
-
padding-
|
|
357
|
+
padding-inline-start: layout.density('padding-inline');
|
|
347
358
|
}
|
|
348
359
|
|
|
349
360
|
//-----------------------------
|
|
@@ -355,9 +366,9 @@ $icon-tab-size: custom-property.get-var('icon-tab-size', rem(40px));
|
|
|
355
366
|
@include type-style('body-compact-01');
|
|
356
367
|
|
|
357
368
|
overflow: hidden;
|
|
358
|
-
padding: $spacing-04 $spacing-05 $spacing-03;
|
|
359
369
|
border-bottom: $tab-underline-color;
|
|
360
370
|
color: $text-secondary;
|
|
371
|
+
padding-inline: layout.density('padding-inline');
|
|
361
372
|
text-align: left;
|
|
362
373
|
text-decoration: none;
|
|
363
374
|
text-overflow: ellipsis;
|
|
@@ -372,9 +383,8 @@ $icon-tab-size: custom-property.get-var('icon-tab-size', rem(40px));
|
|
|
372
383
|
}
|
|
373
384
|
|
|
374
385
|
&.#{$prefix}--tabs--contained .#{$prefix}--tabs__nav-link {
|
|
375
|
-
height: rem(48px);
|
|
376
|
-
padding: $spacing-03 $spacing-05;
|
|
377
386
|
border-bottom: 0;
|
|
387
|
+
padding-inline: layout.density('padding-inline');
|
|
378
388
|
}
|
|
379
389
|
|
|
380
390
|
&.#{$prefix}--tabs--contained:not(.#{$prefix}--tabs--tall)
|
|
@@ -389,11 +399,6 @@ $icon-tab-size: custom-property.get-var('icon-tab-size', rem(40px));
|
|
|
389
399
|
min-height: rem(16px);
|
|
390
400
|
}
|
|
391
401
|
|
|
392
|
-
&.#{$prefix}--tabs--contained.#{$prefix}--tabs--tall
|
|
393
|
-
.#{$prefix}--tabs__nav-link {
|
|
394
|
-
height: rem(64px);
|
|
395
|
-
}
|
|
396
|
-
|
|
397
402
|
//-----------------------------
|
|
398
403
|
// Icon Item
|
|
399
404
|
//-----------------------------
|
|
@@ -405,8 +410,8 @@ $icon-tab-size: custom-property.get-var('icon-tab-size', rem(40px));
|
|
|
405
410
|
.#{$prefix}--tabs__nav-item--icon-only,
|
|
406
411
|
&.#{$prefix}--tabs--contained .#{$prefix}--tabs__nav-item--icon-only {
|
|
407
412
|
display: flex;
|
|
408
|
-
width:
|
|
409
|
-
height:
|
|
413
|
+
width: layout.size('height');
|
|
414
|
+
height: layout.size('height');
|
|
410
415
|
align-items: center;
|
|
411
416
|
justify-content: center;
|
|
412
417
|
padding: 0;
|
|
@@ -416,10 +421,6 @@ $icon-tab-size: custom-property.get-var('icon-tab-size', rem(40px));
|
|
|
416
421
|
}
|
|
417
422
|
}
|
|
418
423
|
|
|
419
|
-
&.#{$prefix}--tabs__icon--lg {
|
|
420
|
-
@include custom-property.declaration('icon-tab-size', rem(48px));
|
|
421
|
-
}
|
|
422
|
-
|
|
423
424
|
//-----------------------------
|
|
424
425
|
// Item Hover
|
|
425
426
|
//-----------------------------
|
|
@@ -558,7 +559,7 @@ $icon-tab-size: custom-property.get-var('icon-tab-size', rem(40px));
|
|
|
558
559
|
// Tab Content Container
|
|
559
560
|
//-----------------------------
|
|
560
561
|
.#{$prefix}--tab-content {
|
|
561
|
-
padding:
|
|
562
|
+
padding: layout.density('padding-inline');
|
|
562
563
|
|
|
563
564
|
&:focus {
|
|
564
565
|
@include focus-outline('outline');
|
|
@@ -589,7 +590,7 @@ $icon-tab-size: custom-property.get-var('icon-tab-size', rem(40px));
|
|
|
589
590
|
width: 10rem;
|
|
590
591
|
height: 100%;
|
|
591
592
|
align-items: center;
|
|
592
|
-
padding: 0
|
|
593
|
+
padding: 0 layout.density('padding-inline');
|
|
593
594
|
}
|
|
594
595
|
|
|
595
596
|
.#{$prefix}--tabs.#{$prefix}--skeleton .#{$prefix}--tabs__nav-link span {
|
|
@@ -108,6 +108,7 @@ $-icon-container-size: calc(#{layout.density('padding-inline')} * 2 + 1rem);
|
|
|
108
108
|
.#{$prefix}--tile--clickable.#{$prefix}--link--disabled,
|
|
109
109
|
.#{$prefix}--tile--clickable:hover.#{$prefix}--link--disabled {
|
|
110
110
|
display: block;
|
|
111
|
+
padding: layout.density('padding-inline');
|
|
111
112
|
background-color: $layer;
|
|
112
113
|
color: $text-disabled;
|
|
113
114
|
cursor: not-allowed;
|
|
@@ -98,7 +98,8 @@
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
.#{$prefix}--tree-node:not(.#{$prefix}--tree-parent-node)
|
|
102
|
+
.#{$prefix}--tree-node__label {
|
|
102
103
|
// (min-height 32px - single line text height 18px) / 2 = 7px
|
|
103
104
|
padding-top: rem(7px);
|
|
104
105
|
padding-bottom: rem(7px);
|
|
@@ -216,9 +217,18 @@
|
|
|
216
217
|
}
|
|
217
218
|
}
|
|
218
219
|
|
|
220
|
+
// xs size variant
|
|
219
221
|
.#{$prefix}--tree--xs .#{$prefix}--tree-node__label {
|
|
220
222
|
min-height: rem(24px);
|
|
221
|
-
|
|
222
|
-
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.#{$prefix}--tree--xs
|
|
226
|
+
.#{$prefix}--tree-node:not(.#{$prefix}--tree-parent-node)
|
|
227
|
+
.#{$prefix}--tree-node__label {
|
|
228
|
+
padding: 0;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.#{$prefix}--tree--xs .#{$prefix}--tree-parent-node__toggle {
|
|
232
|
+
margin-top: 0;
|
|
223
233
|
}
|
|
224
234
|
}
|