@carbon/styles 1.112.0 → 1.113.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 +1705 -621
- package/css/styles.min.css +1 -1
- package/package.json +10 -10
- package/scss/components/__tests__/pagination-test.js +42 -1
- package/scss/components/__tests__/ui-shell-test.js +58 -1
- package/scss/components/_index.scss +4 -0
- package/scss/components/action-set/_action-set.scss +130 -0
- package/scss/components/action-set/_index.scss +11 -0
- package/scss/components/date-picker/_date-picker-next.scss +421 -0
- package/scss/components/date-picker/_index.scss +3 -0
- package/scss/components/modal/_modal.scss +2 -18
- package/scss/components/pagination/_pagination.scss +29 -18
- package/scss/components/pagination/_unstable_pagination.scss +20 -13
- package/scss/components/resizer/_index.scss +11 -0
- package/scss/components/resizer/_resizer.scss +60 -0
- package/scss/components/side-panel/_animations.scss +74 -0
- package/scss/components/side-panel/_index.scss +11 -0
- package/scss/components/side-panel/_side-panel-variables.scss +15 -0
- package/scss/components/side-panel/_side-panel.scss +642 -0
- package/scss/components/truncated-text/_index.scss +11 -0
- package/scss/components/truncated-text/_truncated-text.scss +54 -0
- package/scss/components/ui-shell/header/_header.scss +46 -21
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.113.0-rc.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -40,15 +40,15 @@
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@carbon/colors": "^11.
|
|
44
|
-
"@carbon/feature-flags": "^1.
|
|
45
|
-
"@carbon/grid": "^11.
|
|
46
|
-
"@carbon/layout": "^11.
|
|
47
|
-
"@carbon/motion": "^11.
|
|
48
|
-
"@carbon/themes": "^11.
|
|
49
|
-
"@carbon/type": "^11.
|
|
43
|
+
"@carbon/colors": "^11.56.0-rc.0",
|
|
44
|
+
"@carbon/feature-flags": "^1.7.0-rc.0",
|
|
45
|
+
"@carbon/grid": "^11.60.0-rc.0",
|
|
46
|
+
"@carbon/layout": "^11.57.0-rc.0",
|
|
47
|
+
"@carbon/motion": "^11.50.0-rc.0",
|
|
48
|
+
"@carbon/themes": "^11.79.0-rc.0",
|
|
49
|
+
"@carbon/type": "^11.65.0-rc.0",
|
|
50
50
|
"@ibm/plex": "6.4.1",
|
|
51
|
-
"@ibm/plex-mono": "
|
|
51
|
+
"@ibm/plex-mono": "2.5.0",
|
|
52
52
|
"@ibm/plex-sans": "1.1.0",
|
|
53
53
|
"@ibm/plex-sans-arabic": "1.1.0",
|
|
54
54
|
"@ibm/plex-sans-devanagari": "1.1.0",
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"scss/**/*.css",
|
|
76
76
|
"css/**/*.css"
|
|
77
77
|
],
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "82f04fbfdb385323883f4f8e3ce97a14865a744a"
|
|
79
79
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2018,
|
|
2
|
+
* Copyright IBM Corp. 2018, 2026
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
|
+
const postcss = require('postcss');
|
|
12
13
|
const { SassRenderer } = require('@carbon/test-utils/scss');
|
|
13
14
|
|
|
14
15
|
const { render } = SassRenderer.create(__dirname);
|
|
@@ -23,4 +24,44 @@ describe('scss/components/pagination', () => {
|
|
|
23
24
|
`);
|
|
24
25
|
expect(unwrap('mixin')).toBe(true);
|
|
25
26
|
});
|
|
27
|
+
|
|
28
|
+
test('hover styles are only applied on devices that support hover', async () => {
|
|
29
|
+
const { result } = await render(`
|
|
30
|
+
@use '../pagination';
|
|
31
|
+
`);
|
|
32
|
+
const hoverRules = [];
|
|
33
|
+
|
|
34
|
+
postcss.parse(result.css.toString()).walkRules((rule) => {
|
|
35
|
+
if (
|
|
36
|
+
(rule.selector.includes('.cds--pagination') ||
|
|
37
|
+
rule.selector.includes('.cds--unstable-pagination')) &&
|
|
38
|
+
rule.selector.includes(':hover')
|
|
39
|
+
) {
|
|
40
|
+
hoverRules.push(rule);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
expect(hoverRules.length).toBeGreaterThan(0);
|
|
45
|
+
expect(
|
|
46
|
+
hoverRules
|
|
47
|
+
.filter((rule) => {
|
|
48
|
+
let parent = rule.parent;
|
|
49
|
+
|
|
50
|
+
while (parent) {
|
|
51
|
+
if (
|
|
52
|
+
parent.type === 'atrule' &&
|
|
53
|
+
parent.name === 'media' &&
|
|
54
|
+
parent.params.includes('(any-hover: hover)')
|
|
55
|
+
) {
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
parent = parent.parent;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return true;
|
|
63
|
+
})
|
|
64
|
+
.map((rule) => rule.selector)
|
|
65
|
+
).toEqual([]);
|
|
66
|
+
});
|
|
26
67
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2018,
|
|
2
|
+
* Copyright IBM Corp. 2018, 2026
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
|
+
const postcss = require('postcss');
|
|
12
13
|
const { SassRenderer } = require('@carbon/test-utils/scss');
|
|
13
14
|
|
|
14
15
|
const { render } = SassRenderer.create(__dirname);
|
|
@@ -24,4 +25,60 @@ describe('scss/components/ui-shell', () => {
|
|
|
24
25
|
`);
|
|
25
26
|
expect(unwrap('mixin')).toBe(true);
|
|
26
27
|
});
|
|
28
|
+
|
|
29
|
+
test('header hover styles are only applied on devices that support hover', async () => {
|
|
30
|
+
const { result } = await render(`
|
|
31
|
+
@use '../ui-shell/header';
|
|
32
|
+
`);
|
|
33
|
+
const hoverRules = [];
|
|
34
|
+
|
|
35
|
+
postcss.parse(result.css.toString()).walkRules((rule) => {
|
|
36
|
+
if (
|
|
37
|
+
rule.selector.includes('.cds--header') &&
|
|
38
|
+
rule.selector.includes(':hover')
|
|
39
|
+
) {
|
|
40
|
+
hoverRules.push(rule);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
expect(hoverRules.length).toBeGreaterThan(0);
|
|
45
|
+
expect(
|
|
46
|
+
hoverRules.some((rule) =>
|
|
47
|
+
rule.selector.includes('.cds--header__action:hover')
|
|
48
|
+
)
|
|
49
|
+
).toBe(true);
|
|
50
|
+
expect(
|
|
51
|
+
hoverRules.some((rule) =>
|
|
52
|
+
rule.selector.includes('.cds--header__menu-item:hover')
|
|
53
|
+
)
|
|
54
|
+
).toBe(true);
|
|
55
|
+
expect(
|
|
56
|
+
hoverRules.some(
|
|
57
|
+
(rule) =>
|
|
58
|
+
rule.selector.includes('.cds--header__menu-item--current') &&
|
|
59
|
+
rule.selector.includes(':hover')
|
|
60
|
+
)
|
|
61
|
+
).toBe(true);
|
|
62
|
+
expect(
|
|
63
|
+
hoverRules
|
|
64
|
+
.filter((rule) => {
|
|
65
|
+
let parent = rule.parent;
|
|
66
|
+
|
|
67
|
+
while (parent) {
|
|
68
|
+
if (
|
|
69
|
+
parent.type === 'atrule' &&
|
|
70
|
+
parent.name === 'media' &&
|
|
71
|
+
parent.params.includes('(any-hover: hover)')
|
|
72
|
+
) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
parent = parent.parent;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return true;
|
|
80
|
+
})
|
|
81
|
+
.map((rule) => rule.selector)
|
|
82
|
+
).toEqual([]);
|
|
83
|
+
});
|
|
27
84
|
});
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
//
|
|
7
7
|
|
|
8
8
|
@use 'accordion';
|
|
9
|
+
@use 'action-set';
|
|
9
10
|
@use 'ai-label';
|
|
10
11
|
@use 'aspect-ratio';
|
|
11
12
|
@use 'badge-indicator';
|
|
@@ -60,6 +61,8 @@
|
|
|
60
61
|
@use 'progress-bar';
|
|
61
62
|
@use 'progress-indicator';
|
|
62
63
|
@use 'radio-button';
|
|
64
|
+
@use 'resizer';
|
|
65
|
+
@use 'side-panel';
|
|
63
66
|
@use 'search';
|
|
64
67
|
@use 'select';
|
|
65
68
|
@use 'shape-indicator';
|
|
@@ -78,4 +81,5 @@
|
|
|
78
81
|
@use 'toggle';
|
|
79
82
|
@use 'tooltip';
|
|
80
83
|
@use 'treeview';
|
|
84
|
+
@use 'truncated-text';
|
|
81
85
|
@use 'ui-shell';
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright IBM Corp. 2021, 2025
|
|
3
|
+
//
|
|
4
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
// LICENSE file in the root directory of this source tree.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
//-----------------------------
|
|
9
|
+
// Action set
|
|
10
|
+
//-----------------------------
|
|
11
|
+
|
|
12
|
+
@use '../../config' as *;
|
|
13
|
+
@use '../../theme' as *;
|
|
14
|
+
@use '../../type';
|
|
15
|
+
@use '../../spacing' as *;
|
|
16
|
+
@use '../../utilities/convert' as *;
|
|
17
|
+
|
|
18
|
+
/// Action set styles
|
|
19
|
+
/// @access public
|
|
20
|
+
/// @group action-set
|
|
21
|
+
@mixin action-set {
|
|
22
|
+
.#{$prefix}--action-set {
|
|
23
|
+
align-items: stretch;
|
|
24
|
+
justify-content: flex-end;
|
|
25
|
+
background-color: $layer-01;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.#{$prefix}--action-set .#{$prefix}--action-set__action-button {
|
|
29
|
+
@include type.type-style('body-short-01');
|
|
30
|
+
|
|
31
|
+
align-items: center;
|
|
32
|
+
margin: 0;
|
|
33
|
+
|
|
34
|
+
&.#{$prefix}--action-set__action-button--expressive {
|
|
35
|
+
block-size: $spacing-10;
|
|
36
|
+
padding-block: $spacing-05 $spacing-07;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.#{$prefix}--action-set.#{$prefix}--btn-set
|
|
41
|
+
.#{$prefix}--action-set__action-button.#{$prefix}--btn.#{$prefix}--btn--expressive,
|
|
42
|
+
.#{$prefix}--action-set.#{$prefix}--btn-set
|
|
43
|
+
.#{$prefix}--action-set__action-button.#{$prefix}--btn {
|
|
44
|
+
max-inline-size: none;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.#{$prefix}--action-set:not(.#{$prefix}--action-set--stacking)
|
|
48
|
+
.#{$prefix}--action-set__action-button--ghost {
|
|
49
|
+
padding-inline-start: $spacing-05;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// For row-single in medium,
|
|
53
|
+
// or for ghosts in row-single,
|
|
54
|
+
// buttons are 100% width
|
|
55
|
+
.#{$prefix}--action-set.#{$prefix}--action-set--row-single.#{$prefix}--action-set--md
|
|
56
|
+
.#{$prefix}--action-set__action-button,
|
|
57
|
+
.#{$prefix}--action-set.#{$prefix}--action-set--row-single
|
|
58
|
+
.#{$prefix}--action-set__action-button--ghost {
|
|
59
|
+
flex: 0 0 100%;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// For ghosts in row-double,
|
|
63
|
+
// buttons are 75% width and expand to use any remaining space
|
|
64
|
+
.#{$prefix}--action-set.#{$prefix}--action-set--row-double
|
|
65
|
+
.#{$prefix}--action-set__action-button--ghost {
|
|
66
|
+
flex: 1 1 75%;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// For row-single in large (non-ghost),
|
|
70
|
+
// or row-double in medium or large,
|
|
71
|
+
// buttons are 50% width
|
|
72
|
+
.#{$prefix}--action-set.#{$prefix}--action-set--row-single.#{$prefix}--action-set--lg
|
|
73
|
+
.#{$prefix}--action-set__action-button:not(
|
|
74
|
+
.#{$prefix}--action-set__action-button--ghost
|
|
75
|
+
),
|
|
76
|
+
.#{$prefix}--action-set.#{$prefix}--action-set--row-double.#{$prefix}--action-set--md
|
|
77
|
+
.#{$prefix}--action-set__action-button,
|
|
78
|
+
.#{$prefix}--action-set.#{$prefix}--action-set--row-double.#{$prefix}--action-set--lg
|
|
79
|
+
.#{$prefix}--action-set__action-button,
|
|
80
|
+
.#{$prefix}--action-set.#{$prefix}--action-set--row-triple
|
|
81
|
+
.#{$prefix}--action-set__action-button--ghost {
|
|
82
|
+
flex: 0 1 50%;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// For ghosts in row-triple,
|
|
86
|
+
// buttons are 50% width and expand to use any remaining space
|
|
87
|
+
.#{$prefix}--action-set.#{$prefix}--action-set--row-triple
|
|
88
|
+
.#{$prefix}--action-set__action-button--ghost {
|
|
89
|
+
flex: 1 1 50%;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// For row-triple in large (non-ghost),
|
|
93
|
+
// or any non-ghosts in extra large or 2xl,
|
|
94
|
+
// or row-quadruple (non-ghost),
|
|
95
|
+
// buttons are 25% width with a max of 232px
|
|
96
|
+
.#{$prefix}--action-set.#{$prefix}--btn-set.#{$prefix}--action-set--row-triple.#{$prefix}--action-set--lg
|
|
97
|
+
.#{$prefix}--action-set__action-button:not(
|
|
98
|
+
.#{$prefix}--action-set__action-button--ghost
|
|
99
|
+
),
|
|
100
|
+
.#{$prefix}--action-set.#{$prefix}--btn-set.#{$prefix}--action-set--xl
|
|
101
|
+
.#{$prefix}--action-set__action-button:not(
|
|
102
|
+
.#{$prefix}--action-set__action-button--ghost
|
|
103
|
+
),
|
|
104
|
+
.#{$prefix}--action-set.#{$prefix}--btn-set.#{$prefix}--action-set--2xl
|
|
105
|
+
.#{$prefix}--action-set__action-button:not(
|
|
106
|
+
.#{$prefix}--action-set__action-button--ghost
|
|
107
|
+
),
|
|
108
|
+
.#{$prefix}--action-set.#{$prefix}--btn-set.#{$prefix}--action-set--row-quadruple
|
|
109
|
+
.#{$prefix}--action-set__action-button:not(
|
|
110
|
+
.#{$prefix}--action-set__action-button--ghost
|
|
111
|
+
) {
|
|
112
|
+
flex: 0 1 25%;
|
|
113
|
+
|
|
114
|
+
max-inline-size: to-rem(232px);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.#{$prefix}--action-set.#{$prefix}--btn-set.#{$prefix}--action-set--row-quadruple
|
|
118
|
+
.#{$prefix}--action-set__action-button--ghost {
|
|
119
|
+
flex: 1 1 25%;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.#{$prefix}--action-set
|
|
123
|
+
.#{$prefix}--action-set__action-button
|
|
124
|
+
.#{$prefix}--inline-loading {
|
|
125
|
+
position: absolute;
|
|
126
|
+
inline-size: $spacing-07;
|
|
127
|
+
inset-block-start: 0;
|
|
128
|
+
inset-inline-end: 0;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright IBM Corp. 2021, 2025
|
|
3
|
+
//
|
|
4
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
// LICENSE file in the root directory of this source tree.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
@forward 'action-set';
|
|
9
|
+
@use 'action-set';
|
|
10
|
+
|
|
11
|
+
@include action-set.action-set;
|