@carbon/ibm-products 1.51.0 → 1.53.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +10 -5
- package/css/index-full-carbon.css +89 -64
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +1 -1
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon.css +89 -64
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +1 -1
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +89 -64
- package/css/index.css.map +1 -1
- package/css/index.min.css +1 -1
- package/css/index.min.css.map +1 -1
- package/es/components/AboutModal/AboutModal.js +3 -4
- package/es/components/ActionBar/ActionBar.js +9 -18
- package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +8 -13
- package/es/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +7 -11
- package/es/components/Datagrid/Datagrid/DatagridToolbar.js +5 -5
- package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +3 -4
- package/es/components/Datagrid/index.js +1 -0
- package/es/components/Datagrid/useActionsColumn.js +10 -7
- package/es/components/Datagrid/useCustomizeColumns.js +5 -1
- package/es/components/Datagrid/useEditableCell.js +12 -0
- package/es/components/Datagrid/useExpandedRow.js +11 -7
- package/es/components/Datagrid/useFiltering.js +11 -8
- package/es/components/Datagrid/useInlineEdit.js +17 -8
- package/es/components/Datagrid/useNestedRows.js +10 -6
- package/es/components/ExampleComponent/ExampleComponent.js +32 -4
- package/es/components/ExampleComponent/useExample.js +49 -0
- package/es/components/InlineEditV1/InlineEditV1.js +3 -1
- package/es/components/NonLinearReading/NonLinearReading.js +7 -7
- package/es/components/PageHeader/PageHeader.js +28 -31
- package/es/components/SidePanel/SidePanel.js +25 -26
- package/es/components/TagSet/TagSet.js +5 -7
- package/es/components/Tearsheet/TearsheetShell.js +4 -6
- package/es/components/index.js +1 -1
- package/es/global/js/hooks/useResizeObserver.js +74 -0
- package/es/global/js/package-settings.js +34 -4
- package/es/global/js/utils/test-helper.js +34 -3
- package/es/settings.js +26 -30
- package/lib/components/AboutModal/AboutModal.js +3 -4
- package/lib/components/ActionBar/ActionBar.js +9 -18
- package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +8 -13
- package/lib/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +7 -11
- package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +4 -4
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +3 -4
- package/lib/components/Datagrid/index.js +7 -0
- package/lib/components/Datagrid/useActionsColumn.js +7 -1
- package/lib/components/Datagrid/useCustomizeColumns.js +4 -0
- package/lib/components/Datagrid/useEditableCell.js +20 -0
- package/lib/components/Datagrid/useExpandedRow.js +4 -0
- package/lib/components/Datagrid/useFiltering.js +4 -0
- package/lib/components/Datagrid/useInlineEdit.js +19 -8
- package/lib/components/Datagrid/useNestedRows.js +9 -6
- package/lib/components/ExampleComponent/ExampleComponent.js +35 -4
- package/lib/components/ExampleComponent/useExample.js +58 -0
- package/lib/components/InlineEditV1/InlineEditV1.js +3 -1
- package/lib/components/NonLinearReading/NonLinearReading.js +6 -6
- package/lib/components/PageHeader/PageHeader.js +28 -31
- package/lib/components/SidePanel/SidePanel.js +25 -26
- package/lib/components/TagSet/TagSet.js +5 -7
- package/lib/components/Tearsheet/TearsheetShell.js +4 -6
- package/lib/components/index.js +6 -0
- package/lib/global/js/hooks/useResizeObserver.js +83 -0
- package/lib/global/js/package-settings.js +33 -3
- package/lib/global/js/utils/test-helper.js +37 -5
- package/lib/settings.js +26 -30
- package/package.json +2 -3
- package/scss/components/NonLinearReading/_non-linear-reading.scss +76 -67
- package/scss/components/NonLinearReading/_storybook-styles.scss +16 -0
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@carbon/ibm-products",
|
3
3
|
"description": "Carbon for IBM Products",
|
4
|
-
"version": "1.
|
4
|
+
"version": "1.53.0",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "lib/index.js",
|
7
7
|
"module": "es/index.js",
|
@@ -77,7 +77,6 @@
|
|
77
77
|
"immutability-helper": "^3.1.1",
|
78
78
|
"react-dnd": "^15.1.2",
|
79
79
|
"react-dnd-html5-backend": "^15.1.3",
|
80
|
-
"react-resize-detector": "^8.0.3",
|
81
80
|
"react-table": "^7.8.0",
|
82
81
|
"react-window": "^1.8.8"
|
83
82
|
},
|
@@ -95,5 +94,5 @@
|
|
95
94
|
"react": "^16.8.6 || ^17.0.1",
|
96
95
|
"react-dom": "^16.8.6 || ^17.0.1"
|
97
96
|
},
|
98
|
-
"gitHead": "
|
97
|
+
"gitHead": "7b07c65caa761dee2617c30cc8d299eed112d718"
|
99
98
|
}
|
@@ -8,31 +8,35 @@
|
|
8
8
|
// Standard imports.
|
9
9
|
@import '../../global/styles/project-settings';
|
10
10
|
|
11
|
-
@mixin
|
11
|
+
@mixin keyword-closed-defaults {
|
12
|
+
height: rem(20px);
|
13
|
+
padding-top: 0;
|
12
14
|
// stylelint-disable-next-line carbon/layout-token-use
|
13
|
-
padding: rem(
|
14
|
-
border:
|
15
|
+
padding-right: rem(3px);
|
16
|
+
border-width: rem(1px);
|
17
|
+
border-style: solid;
|
15
18
|
border-radius: $spacing-04;
|
16
|
-
background-color: $interactive-02;
|
17
19
|
white-space: nowrap;
|
18
20
|
|
19
21
|
&:hover {
|
20
|
-
background-color: $hover-secondary;
|
21
22
|
cursor: pointer;
|
22
23
|
}
|
23
|
-
}
|
24
|
-
@mixin term-open-defaults {
|
25
|
-
@include term-closed-defaults();
|
26
|
-
|
27
|
-
padding-right: 0;
|
28
24
|
|
25
|
+
// The "up" chevron
|
29
26
|
svg {
|
30
27
|
// stylelint-disable-next-line carbon/layout-token-use
|
31
|
-
|
32
|
-
margin: 0 $spacing-02 0 $spacing-01;
|
28
|
+
margin: rem(1px) 0 0 0;
|
33
29
|
vertical-align: text-top;
|
34
30
|
}
|
35
31
|
}
|
32
|
+
@mixin keyword-open-defaults {
|
33
|
+
@include keyword-closed-defaults();
|
34
|
+
|
35
|
+
// The "up" chevron, flipped
|
36
|
+
svg {
|
37
|
+
transform: rotate(180deg);
|
38
|
+
}
|
39
|
+
}
|
36
40
|
@mixin body-defaults {
|
37
41
|
@include carbon--type-style('body-long-01');
|
38
42
|
|
@@ -48,10 +52,13 @@
|
|
48
52
|
|
49
53
|
// Other Carbon settings.
|
50
54
|
// TODO: @import 'carbon-components/scss/globals/grid/grid'; if needed
|
55
|
+
|
51
56
|
// NonLinearReading uses the following Carbon components:
|
52
57
|
// TODO: @import(s) of Carbon component styles used by NonLinearReading
|
58
|
+
|
53
59
|
// NonLinearReading uses the following Carbon for IBM Products components:
|
54
60
|
// TODO: @import(s) of IBM Products component styles used by NonLinearReading
|
61
|
+
|
55
62
|
// Define all component styles in a mixin which is then exported using
|
56
63
|
// the Carbon import-once mechanism.
|
57
64
|
@mixin non-linear-reading {
|
@@ -72,86 +79,88 @@
|
|
72
79
|
}
|
73
80
|
}
|
74
81
|
|
75
|
-
.#{$block-class} {
|
76
|
-
|
77
|
-
&-
|
78
|
-
|
79
|
-
@include term-closed-defaults();
|
82
|
+
.#{$block-class}__light {
|
83
|
+
.#{$block-class}__keyword {
|
84
|
+
&-closed {
|
85
|
+
@include keyword-closed-defaults();
|
80
86
|
|
81
|
-
|
82
|
-
|
87
|
+
border-color: $interactive-03;
|
88
|
+
background-color: transparent;
|
89
|
+
color: $interactive-03;
|
83
90
|
|
84
|
-
|
85
|
-
|
86
|
-
|
91
|
+
&:hover {
|
92
|
+
background-color: $interactive-03;
|
93
|
+
color: $inverse-01;
|
87
94
|
}
|
95
|
+
}
|
88
96
|
|
89
|
-
|
90
|
-
|
97
|
+
&-open {
|
98
|
+
@include keyword-open-defaults();
|
91
99
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
color: $text-01;
|
100
|
+
border-color: $interactive-03;
|
101
|
+
background-color: $interactive-03;
|
102
|
+
color: $inverse-01;
|
96
103
|
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
}
|
104
|
+
&:hover {
|
105
|
+
background-color: transparent;
|
106
|
+
color: $interactive-03;
|
101
107
|
}
|
102
108
|
}
|
109
|
+
}
|
103
110
|
|
104
|
-
|
105
|
-
|
106
|
-
@include carbon--theme($carbon--theme--g100, true);
|
107
|
-
@include term-closed-defaults();
|
111
|
+
.#{$block-class}__body {
|
112
|
+
@include body-defaults();
|
108
113
|
|
109
|
-
|
110
|
-
|
114
|
+
border-left-color: $text-01;
|
115
|
+
}
|
116
|
+
}
|
117
|
+
|
118
|
+
.#{$block-class}__dark {
|
119
|
+
.#{$block-class}__keyword {
|
120
|
+
&-closed {
|
121
|
+
@include carbon--theme($carbon--theme--g100, true);
|
122
|
+
@include keyword-closed-defaults();
|
111
123
|
|
112
|
-
|
113
|
-
|
114
|
-
|
124
|
+
border-color: $icon-03;
|
125
|
+
background-color: transparent;
|
126
|
+
color: $text-01;
|
127
|
+
|
128
|
+
&:hover {
|
129
|
+
background-color: $icon-03;
|
130
|
+
color: $inverse-01;
|
115
131
|
}
|
132
|
+
}
|
116
133
|
|
117
|
-
|
118
|
-
|
119
|
-
|
134
|
+
&-open {
|
135
|
+
@include carbon--theme($carbon--theme--g100, true);
|
136
|
+
@include keyword-open-defaults();
|
120
137
|
|
121
|
-
|
122
|
-
|
123
|
-
|
138
|
+
border-color: $icon-03;
|
139
|
+
background-color: $icon-03;
|
140
|
+
color: $inverse-01;
|
124
141
|
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
}
|
142
|
+
&:hover {
|
143
|
+
background-color: transparent;
|
144
|
+
color: $text-01;
|
129
145
|
}
|
130
146
|
}
|
131
147
|
}
|
132
148
|
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
// stylelint-disable-next-line carbon/theme-token-use
|
138
|
-
border-left-color: #6929c4;
|
139
|
-
// stylelint-disable-next-line carbon/theme-token-use
|
140
|
-
color: #6929c4;
|
141
|
-
}
|
149
|
+
.#{$block-class}__body {
|
150
|
+
@include carbon--theme($carbon--theme--g100, true);
|
151
|
+
@include body-defaults();
|
142
152
|
|
143
|
-
|
144
|
-
|
145
|
-
@include body-defaults();
|
153
|
+
border-left-color: $text-01;
|
154
|
+
color: $text-01;
|
146
155
|
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
color: #d4bbff;
|
156
|
+
// override default link color to compensate for a gradient background.
|
157
|
+
a {
|
158
|
+
color: $link-01;
|
151
159
|
}
|
152
160
|
}
|
153
161
|
}
|
154
162
|
}
|
163
|
+
|
155
164
|
@include exports('non-linear-reading') {
|
156
165
|
@include non-linear-reading;
|
157
166
|
}
|
@@ -11,3 +11,19 @@
|
|
11
11
|
#root {
|
12
12
|
@include carbon--type-style('body-long-01');
|
13
13
|
}
|
14
|
+
|
15
|
+
// The layout has been changed from middle/center to top/left, because
|
16
|
+
// the component can expand, and it looks weird when expanding vertically
|
17
|
+
// from the middle of the page instead of "dropping down" from above.
|
18
|
+
// Margin provides spacing from the edge of the viewport.
|
19
|
+
.non-linear-reading-stories__viewport {
|
20
|
+
margin: $spacing-10; // 64px
|
21
|
+
}
|
22
|
+
|
23
|
+
.gradient-bg {
|
24
|
+
@include carbon--theme($carbon--theme--g100, true);
|
25
|
+
|
26
|
+
padding: $spacing-05;
|
27
|
+
background: linear-gradient(90deg, $blue-90 0%, $purple-70 100%);
|
28
|
+
color: $text-01;
|
29
|
+
}
|