@carbon/ibm-products 2.0.0-rc.25 → 2.0.0-rc.27
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +10 -4
- package/css/index-full-carbon.css +129 -127
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +3 -3
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +69 -118
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +2 -2
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +129 -127
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +3 -3
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +129 -127
- package/css/index.css.map +1 -1
- package/css/index.min.css +3 -3
- package/css/index.min.css.map +1 -1
- package/es/components/AddSelect/AddSelectBody.js +1 -0
- package/es/components/AddSelect/AddSelectFormControl.js +92 -0
- package/es/components/AddSelect/AddSelectList.js +26 -195
- package/es/components/AddSelect/AddSelectRow.js +220 -0
- package/es/components/AddSelect/hooks/useFocus.js +35 -0
- package/es/components/Card/Card.js +8 -6
- package/es/components/Card/CardHeader.js +2 -2
- package/es/components/Datagrid/Datagrid/DatagridEmptyBody.js +15 -20
- package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +6 -2
- package/es/components/Datagrid/Datagrid/DatagridRefBody.js +3 -1
- package/es/components/Datagrid/Datagrid/DatagridRow.js +6 -2
- package/es/components/Datagrid/Datagrid/DatagridSimpleBody.js +3 -1
- package/es/components/Datagrid/Datagrid/DatagridToolbar.js +1 -1
- package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +3 -1
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +15 -65
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +5 -2
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +112 -0
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +1 -0
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +11 -0
- package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +29 -23
- package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +1 -0
- package/es/components/Datagrid/index.js +7 -7
- package/es/components/Datagrid/useInfiniteScroll.js +5 -1
- package/es/components/Datagrid/useOnRowClick.js +3 -3
- package/es/components/Datagrid/useSortableColumns.js +7 -5
- package/es/components/Datagrid/utils/getAutoSizedColumnWidth.js +29 -0
- package/es/components/ExampleComponent/ExampleComponent.js +39 -5
- package/es/components/ExampleComponent/useExample.js +51 -0
- package/es/components/ExpressiveCard/ExpressiveCard.js +3 -3
- package/es/components/InlineEditV1/InlineEditV1.js +15 -20
- package/es/components/InlineEditV2/InlineEditV2.js +21 -31
- package/es/components/PageHeader/PageHeader.js +4 -3
- package/es/components/ProductiveCard/ProductiveCard.js +3 -3
- package/es/components/index.js +1 -1
- package/es/global/js/package-settings.js +24 -3
- package/es/global/js/utils/story-helper.js +9 -0
- package/es/global/js/utils/test-helper.js +38 -6
- package/lib/components/AddSelect/AddSelectBody.js +1 -0
- package/lib/components/AddSelect/AddSelectFormControl.js +110 -0
- package/lib/components/AddSelect/AddSelectList.js +29 -203
- package/lib/components/AddSelect/AddSelectRow.js +247 -0
- package/lib/components/AddSelect/hooks/useFocus.js +46 -0
- package/lib/components/Card/Card.js +7 -5
- package/lib/components/Card/CardHeader.js +2 -2
- package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +14 -19
- package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +6 -2
- package/lib/components/Datagrid/Datagrid/DatagridRefBody.js +3 -1
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +6 -2
- package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.js +3 -1
- package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +1 -1
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +3 -1
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +16 -69
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +5 -2
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +132 -0
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +1 -0
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +11 -0
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +23 -16
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +1 -0
- package/lib/components/Datagrid/index.js +9 -1
- package/lib/components/Datagrid/useInfiniteScroll.js +5 -0
- package/lib/components/Datagrid/useOnRowClick.js +3 -3
- package/lib/components/Datagrid/useSortableColumns.js +7 -5
- package/lib/components/Datagrid/utils/getAutoSizedColumnWidth.js +40 -0
- package/lib/components/ExampleComponent/ExampleComponent.js +47 -4
- package/lib/components/ExampleComponent/useExample.js +63 -0
- package/lib/components/ExpressiveCard/ExpressiveCard.js +3 -3
- package/lib/components/InlineEditV1/InlineEditV1.js +14 -19
- package/lib/components/InlineEditV2/InlineEditV2.js +20 -30
- package/lib/components/PageHeader/PageHeader.js +4 -3
- package/lib/components/ProductiveCard/ProductiveCard.js +3 -3
- package/lib/components/index.js +6 -0
- package/lib/global/js/package-settings.js +24 -3
- package/lib/global/js/utils/story-helper.js +13 -2
- package/lib/global/js/utils/test-helper.js +42 -8
- package/package.json +2 -2
- package/scss/components/ActionBar/_action-bar.scss +0 -4
- package/scss/components/AddSelect/_add-select.scss +4 -16
- package/scss/components/Card/_card.scss +13 -6
- package/scss/components/Datagrid/styles/addons/_CustomizeColumnsTearsheet.scss +15 -2
- package/scss/components/Datagrid/styles/addons/_RowSizeDropdown.scss +18 -6
- package/scss/components/ExportModal/_export-modal.scss +0 -4
- package/scss/components/ExpressiveCard/_expressive-card.scss +1 -1
- package/scss/components/InlineEditV1/_inline-edit-v1.scss +5 -89
- package/scss/components/InlineEditV2/_inline-edit-v2.scss +42 -3
- package/scss/components/PageHeader/_page-header.scss +2 -3
- package/scss/components/ProductiveCard/_productive-card.scss +31 -2
- package/scss/components/SidePanel/_side-panel.scss +2 -1
- package/scss/components/TagSet/_tag-set.scss +1 -0
- package/scss/components/UserProfileImage/_user-profile-image.scss +5 -0
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
6
6
|
value: true
|
7
7
|
});
|
8
|
-
exports.scssCompile = exports.scssCheck = exports.required = exports.mockHTMLElement = exports.invalid = exports.expectWarnAsync = exports.expectWarn = exports.expectMultipleWarn = exports.expectMultipleError = exports.expectError = exports.deprecatedUsage = exports.deprecated = void 0;
|
8
|
+
exports.scssCompile = exports.scssCheck = exports.required = exports.mockHTMLElement = exports.invalid = exports.expectWarnAsync = exports.expectWarn = exports.expectMultipleWarn = exports.expectMultipleError = exports.expectLogging = exports.expectError = exports.deprecatedUsage = exports.deprecated = void 0;
|
9
9
|
|
10
10
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
11
11
|
|
@@ -224,6 +224,45 @@ var expectMultipleWarn = function expectMultipleWarn(messages, test) {
|
|
224
224
|
warn.mockRestore();
|
225
225
|
return result;
|
226
226
|
};
|
227
|
+
|
228
|
+
exports.expectMultipleWarn = expectMultipleWarn;
|
229
|
+
|
230
|
+
var checkLogging = function checkLogging(mock, message) {
|
231
|
+
if (message) {
|
232
|
+
var _expect4;
|
233
|
+
|
234
|
+
expect(mock).toBeCalled();
|
235
|
+
|
236
|
+
(_expect4 = expect(mock)).toHaveBeenCalledWith.apply(_expect4, (0, _toConsumableArray2.default)(makeMatcherArray(message)));
|
237
|
+
}
|
238
|
+
};
|
239
|
+
/**
|
240
|
+
* A helper function to enable a test to expect a single call to
|
241
|
+
* console.error, for example when intentionally omitting a required prop
|
242
|
+
* or supplying an invalid prop type or value for the purposes of the test.
|
243
|
+
* @param {errors: {string|regex|function|[]}, warnings: {string|regex|function|[]}} messages the expected parameters for the call to
|
244
|
+
* console.error or console.warn, which must be called exactly once. A single string or regex or an
|
245
|
+
* expect matcher can be used to match a single-argument call to console.error (most common),
|
246
|
+
* while an array of strings and/or regex and/or expect matchers can be used to match a
|
247
|
+
* multiple-argument call. Strings can be full or substring matches to the corresponding
|
248
|
+
* argument.
|
249
|
+
* @param {Function} test the test function to call, during which the call to
|
250
|
+
* console.error will be expected.
|
251
|
+
*/
|
252
|
+
|
253
|
+
|
254
|
+
var expectLogging = function expectLogging(_ref2, test) {
|
255
|
+
var errors = _ref2.errors,
|
256
|
+
warnings = _ref2.warnings;
|
257
|
+
var error = jest.spyOn(console, 'error').mockImplementation(jest.fn());
|
258
|
+
var warn = jest.spyOn(console, 'warn').mockImplementation(jest.fn());
|
259
|
+
var result = test();
|
260
|
+
checkLogging(error, errors);
|
261
|
+
checkLogging(warn, warnings);
|
262
|
+
error.mockRestore();
|
263
|
+
warn.mockRestore();
|
264
|
+
return result;
|
265
|
+
};
|
227
266
|
/**
|
228
267
|
* A helper function to enable a test to expect a single call to
|
229
268
|
* console.error, for example when intentionally omitting a required prop
|
@@ -239,17 +278,12 @@ var expectMultipleWarn = function expectMultipleWarn(messages, test) {
|
|
239
278
|
*/
|
240
279
|
|
241
280
|
|
242
|
-
exports.
|
281
|
+
exports.expectLogging = expectLogging;
|
243
282
|
|
244
283
|
var expectError = function expectError(message, test) {
|
245
|
-
var _expect4;
|
246
|
-
|
247
284
|
var error = jest.spyOn(console, 'error').mockImplementation(jest.fn());
|
248
285
|
var result = test();
|
249
|
-
|
250
|
-
|
251
|
-
(_expect4 = expect(error)).toHaveBeenCalledWith.apply(_expect4, (0, _toConsumableArray2.default)(makeMatcherArray(message)));
|
252
|
-
|
286
|
+
checkLogging(error, message);
|
253
287
|
error.mockRestore();
|
254
288
|
return result;
|
255
289
|
};
|
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": "2.0.0-rc.
|
4
|
+
"version": "2.0.0-rc.27",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "lib/index.js",
|
7
7
|
"module": "es/index.js",
|
@@ -94,5 +94,5 @@
|
|
94
94
|
"react": "^16.8.6 || ^17.0.1",
|
95
95
|
"react-dom": "^16.8.6 || ^17.0.1"
|
96
96
|
},
|
97
|
-
"gitHead": "
|
97
|
+
"gitHead": "33ed98e63caf4d07ba69eb8cb709fd44b3303c78"
|
98
98
|
}
|
@@ -28,10 +28,6 @@ $block-class-overflow-items: #{$_block-class}-overflow-items;
|
|
28
28
|
justify-content: flex-end;
|
29
29
|
}
|
30
30
|
|
31
|
-
.#{$block-class-overflow-items} {
|
32
|
-
display: inline-block;
|
33
|
-
}
|
34
|
-
|
35
31
|
.#{$_block-class}__hidden-sizing-items {
|
36
32
|
// This breadcrumb container is used to measure the width of all displayable breadcrumbs
|
37
33
|
@include measuring-container;
|
@@ -69,29 +69,21 @@ $tearsheet-class: #{$pkg-prefix}--tearsheet;
|
|
69
69
|
background-color: $layer-selected-01;
|
70
70
|
}
|
71
71
|
|
72
|
-
&-
|
72
|
+
&-form-control {
|
73
73
|
display: flex;
|
74
74
|
align-items: center;
|
75
75
|
}
|
76
76
|
|
77
|
-
&-
|
77
|
+
&-form-control-label-wrapper {
|
78
78
|
display: flex;
|
79
79
|
margin-left: $spacing-05;
|
80
80
|
}
|
81
81
|
|
82
|
-
&-
|
82
|
+
&-form-control-label-text {
|
83
83
|
display: flex;
|
84
84
|
flex-direction: column;
|
85
85
|
}
|
86
86
|
|
87
|
-
&-checkbox-wrapper.#{$carbon-prefix}--form-item {
|
88
|
-
flex: 0;
|
89
|
-
}
|
90
|
-
|
91
|
-
&-checkbox-wrapper .#{$carbon-prefix}--checkbox-label-text {
|
92
|
-
display: none;
|
93
|
-
}
|
94
|
-
|
95
87
|
&-cell-avatar {
|
96
88
|
margin-right: $spacing-03;
|
97
89
|
}
|
@@ -209,7 +201,7 @@ $tearsheet-class: #{$pkg-prefix}--tearsheet;
|
|
209
201
|
flex-grow: 1;
|
210
202
|
overflow-x: auto;
|
211
203
|
|
212
|
-
.#{$block-class}__selections-
|
204
|
+
.#{$block-class}__selections-form-control-label-wrapper {
|
213
205
|
margin-left: $spacing-03;
|
214
206
|
}
|
215
207
|
|
@@ -434,10 +426,6 @@ button.#{$block-class}__global-filter-toggle {
|
|
434
426
|
}
|
435
427
|
}
|
436
428
|
|
437
|
-
.#{$block-class} .#{$carbon-prefix}--checkbox-label-text {
|
438
|
-
padding-left: $spacing-03;
|
439
|
-
}
|
440
|
-
|
441
429
|
.#{$block-class}__multi .#{$pkg-prefix}--empty-state {
|
442
430
|
max-width: 16rem;
|
443
431
|
margin-top: $spacing-09;
|
@@ -15,18 +15,18 @@
|
|
15
15
|
$block-class: #{c4p-settings.$pkg-prefix}--card;
|
16
16
|
|
17
17
|
.#{$block-class} {
|
18
|
-
background: $layer-01;
|
18
|
+
background-color: $layer-01;
|
19
19
|
color: $text-primary;
|
20
20
|
}
|
21
21
|
|
22
22
|
.#{$block-class}__clickable {
|
23
23
|
cursor: pointer;
|
24
24
|
// stylelint-disable-next-line carbon/motion-easing-use
|
25
|
-
transition: background $duration-fast-02;
|
25
|
+
transition: background-color $duration-fast-02;
|
26
26
|
}
|
27
27
|
|
28
28
|
.#{$block-class}__clickable:hover {
|
29
|
-
background: $
|
29
|
+
background-color: $layer-hover-01;
|
30
30
|
}
|
31
31
|
|
32
32
|
.#{$block-class}__media-left {
|
@@ -82,7 +82,7 @@ $block-class: #{c4p-settings.$pkg-prefix}--card;
|
|
82
82
|
}
|
83
83
|
|
84
84
|
.#{$block-class}__body {
|
85
|
-
@include type-style('body-
|
85
|
+
@include type-style('body-compact-01');
|
86
86
|
|
87
87
|
padding: $spacing-05;
|
88
88
|
padding-top: 0;
|
@@ -96,15 +96,22 @@ $block-class: #{c4p-settings.$pkg-prefix}--card;
|
|
96
96
|
.#{$block-class}__actions {
|
97
97
|
display: flex;
|
98
98
|
flex-direction: row;
|
99
|
-
margin: $spacing-05;
|
100
|
-
margin-top: 0;
|
101
99
|
}
|
102
100
|
|
103
101
|
.#{$block-class}__icon {
|
102
|
+
padding: $spacing-03;
|
104
103
|
color: inherit;
|
105
104
|
cursor: pointer;
|
106
105
|
}
|
107
106
|
|
107
|
+
.#{$block-class}__icon:hover {
|
108
|
+
background-color: $layer-hover-01;
|
109
|
+
}
|
110
|
+
|
111
|
+
#{$block-class}__icon:active {
|
112
|
+
color: $link-primary-hover;
|
113
|
+
}
|
114
|
+
|
108
115
|
.#{$block-class}__link {
|
109
116
|
color: inherit;
|
110
117
|
text-decoration: inherit;
|
@@ -10,6 +10,7 @@
|
|
10
10
|
@use '@carbon/styles/scss/type' as *;
|
11
11
|
@use '@carbon/type/scss/font-family';
|
12
12
|
@use '@carbon/layout' as *;
|
13
|
+
@use '@carbon/layout/scss/convert';
|
13
14
|
|
14
15
|
@use '../../../../global/styles/project-settings' as c4p-settings;
|
15
16
|
@use '../variables';
|
@@ -28,10 +29,18 @@
|
|
28
29
|
border-bottom: 1px solid $background-active;
|
29
30
|
}
|
30
31
|
|
31
|
-
.#{variables.$block-class}__customize-columns-checkbox
|
32
|
+
.#{c4p-settings.$carbon-prefix}--form-item.#{c4p-settings.$carbon-prefix}--checkbox-wrapper.#{variables.$block-class}__customize-columns-checkbox {
|
32
33
|
display: flex;
|
34
|
+
flex: initial;
|
35
|
+
align-items: center;
|
33
36
|
justify-content: center;
|
34
|
-
|
37
|
+
}
|
38
|
+
|
39
|
+
.#{variables.$block-class}__customize-columns-column-list
|
40
|
+
.#{variables.$block-class}__customize-columns-checkbox-visible-label {
|
41
|
+
// Disabling linter only to match the spacing that Carbon uses for the Checkbox label
|
42
|
+
/* stylelint-disable-next-line */
|
43
|
+
padding-left: convert.rem(6px);
|
35
44
|
}
|
36
45
|
|
37
46
|
.#{variables.$block-class}__customize-columns-column-list
|
@@ -44,6 +53,10 @@
|
|
44
53
|
overflow: auto;
|
45
54
|
}
|
46
55
|
|
56
|
+
.#{variables.$block-class}__customize-columns-select-all {
|
57
|
+
align-items: center;
|
58
|
+
}
|
59
|
+
|
47
60
|
.#{variables.$block-class}__customize-columns-select-all,
|
48
61
|
.#{variables.$block-class}__customize-columns-select-all--selected {
|
49
62
|
position: sticky;
|
@@ -11,17 +11,22 @@
|
|
11
11
|
@use '../../../../global/styles/project-settings' as c4p-settings;
|
12
12
|
@use '../variables';
|
13
13
|
|
14
|
-
.#{variables.$block-class}
|
15
|
-
|
14
|
+
.#{variables.$block-class}
|
15
|
+
.#{variables.$block-class}__row-size-toggle-tip-content {
|
16
16
|
background-color: $layer-02;
|
17
|
-
|
18
17
|
box-shadow: 1px 4px 8px -3px $overlay, -1px 6px 8px -5px $overlay;
|
19
18
|
}
|
20
19
|
|
21
|
-
.#{
|
22
|
-
|
20
|
+
.#{variables.$block-class}
|
21
|
+
.#{variables.$block-class}__row-size-radio-button
|
22
|
+
.#{c4p-settings.$carbon-prefix}--radio-button__label {
|
23
|
+
color: $text-primary;
|
24
|
+
}
|
23
25
|
|
24
|
-
|
26
|
+
.#{variables.$block-class}
|
27
|
+
.#{variables.$block-class}__row-size-toggle-tip
|
28
|
+
.#{c4p-settings.$carbon-prefix}--popover-caret {
|
29
|
+
background-color: $layer-02;
|
25
30
|
}
|
26
31
|
|
27
32
|
.#{variables.$block-class}
|
@@ -31,3 +36,10 @@
|
|
31
36
|
/* stylelint-disable-next-line carbon/layout-token-use */
|
32
37
|
left: -4px;
|
33
38
|
}
|
39
|
+
|
40
|
+
.#{variables.$block-class}__row-size-toggle-tip-button.#{c4p-settings.$carbon-prefix}--toggletip-button {
|
41
|
+
display: flex;
|
42
|
+
width: $spacing-09;
|
43
|
+
height: $spacing-09;
|
44
|
+
justify-content: center;
|
45
|
+
}
|
@@ -32,17 +32,6 @@
|
|
32
32
|
}
|
33
33
|
}
|
34
34
|
|
35
|
-
@mixin input-button-defaults($block-class) {
|
36
|
-
display: inline-flex;
|
37
|
-
height: 100%;
|
38
|
-
min-height: initial;
|
39
|
-
max-height: var(--#{$block-class}--size);
|
40
|
-
align-items: center;
|
41
|
-
justify-content: center;
|
42
|
-
|
43
|
-
border: 2px solid transparent;
|
44
|
-
}
|
45
|
-
|
46
35
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
47
36
|
$block-class: #{c4p-settings.$pkg-prefix}--inline-edit;
|
48
37
|
|
@@ -58,7 +47,6 @@ $block-class: #{c4p-settings.$pkg-prefix}--inline-edit;
|
|
58
47
|
|
59
48
|
&:hover {
|
60
49
|
--#{$block-class}--background-color: #{$background-hover};
|
61
|
-
// background-color: $background-color;
|
62
50
|
}
|
63
51
|
|
64
52
|
position: relative;
|
@@ -112,6 +100,7 @@ $block-class: #{c4p-settings.$pkg-prefix}--inline-edit;
|
|
112
100
|
margin-right: var(--#{$block-class}--toolbar-width);
|
113
101
|
// room for toolbar
|
114
102
|
margin-left: $spacing-05;
|
103
|
+
color: $text-primary;
|
115
104
|
font-family: inherit;
|
116
105
|
// stylelint-disable-next-line carbon/type-token-use
|
117
106
|
line-height: var(--#{$block-class}--size);
|
@@ -203,8 +192,9 @@ $block-class: #{c4p-settings.$pkg-prefix}--inline-edit;
|
|
203
192
|
--#{$block-class}--toolbar-width: calc(3 * var(--#{$block-class}--size));
|
204
193
|
}
|
205
194
|
|
206
|
-
.#{$block-class}__toolbar
|
207
|
-
|
195
|
+
.#{$block-class}__toolbar {
|
196
|
+
display: flex;
|
197
|
+
align-items: center;
|
208
198
|
}
|
209
199
|
|
210
200
|
&.#{$block-class}--editing .#{$block-class}__toolbar::after {
|
@@ -227,38 +217,12 @@ $block-class: #{c4p-settings.$pkg-prefix}--inline-edit;
|
|
227
217
|
|
228
218
|
&.#{$block-class}.#{$block-class} .#{$block-class}__save,
|
229
219
|
&.#{$block-class}.#{$block-class} .#{$block-class}__cancel {
|
230
|
-
|
231
|
-
|
232
|
-
// input does not have focus
|
233
|
-
&:hover {
|
234
|
-
outline: initial;
|
235
|
-
}
|
236
|
-
|
237
|
-
&:focus:active,
|
238
|
-
&:focus {
|
239
|
-
// border focus input does NOT have focus
|
240
|
-
border-color: $focus;
|
241
|
-
box-shadow: initial;
|
242
|
-
outline: initial;
|
243
|
-
}
|
244
|
-
|
245
|
-
&:focus:active:hover {
|
246
|
-
box-shadow: inset 0 0 0 1px $field-01;
|
247
|
-
}
|
248
|
-
|
249
|
-
&::before {
|
250
|
-
background-color: transparent;
|
251
|
-
}
|
252
|
-
|
253
|
-
&[disabled] {
|
254
|
-
border-color: transparent;
|
255
|
-
}
|
220
|
+
display: inline-flex;
|
256
221
|
}
|
257
222
|
|
258
223
|
&.#{$block-class}--editing
|
259
224
|
.#{$block-class}__toolbar--animation
|
260
225
|
.#{$block-class}__save {
|
261
|
-
overflow: visible;
|
262
226
|
width: var(--#{$block-class}--edit-size);
|
263
227
|
transition: all $duration-moderate-02 motion(standard, productive);
|
264
228
|
transition-property: margin, padding;
|
@@ -267,56 +231,12 @@ $block-class: #{c4p-settings.$pkg-prefix}--inline-edit;
|
|
267
231
|
&.#{$block-class}--editing
|
268
232
|
.#{$block-class}__toolbar--animation:not(.#{$block-class}__toolbar--saveable)
|
269
233
|
.#{$block-class}__save {
|
270
|
-
overflow: hidden;
|
271
234
|
width: 0;
|
272
235
|
padding: 0;
|
273
236
|
border-right: 0;
|
274
237
|
border-left: 0;
|
275
238
|
}
|
276
239
|
|
277
|
-
&.#{$block-class}--editing
|
278
|
-
.#{$block-class}__toolbar--animation
|
279
|
-
.#{$block-class}__save {
|
280
|
-
margin-right: 0;
|
281
|
-
transition: all $duration-moderate-02 motion(standard, productive);
|
282
|
-
transition-property: margin, padding;
|
283
|
-
|
284
|
-
svg {
|
285
|
-
transition: width $duration-moderate-02 motion(standard, productive);
|
286
|
-
@media (prefers-reduced-motion: reduce) {
|
287
|
-
transition: none;
|
288
|
-
}
|
289
|
-
}
|
290
|
-
}
|
291
|
-
|
292
|
-
&.#{$block-class}--editing
|
293
|
-
.#{$block-class}__toolbar--animation:not(.#{$block-class}__toolbar--saveable)
|
294
|
-
.#{$block-class}__save {
|
295
|
-
padding-right: 0;
|
296
|
-
padding-left: 0;
|
297
|
-
border-right: 0;
|
298
|
-
border-left: 0;
|
299
|
-
margin-right: calc(-1 * var(--#{$block-class}--size));
|
300
|
-
|
301
|
-
svg {
|
302
|
-
overflow: hidden;
|
303
|
-
width: 0;
|
304
|
-
}
|
305
|
-
}
|
306
|
-
|
307
|
-
&.#{$block-class}.#{$block-class} .#{$block-class}__edit {
|
308
|
-
@include input-button-defaults($block-class);
|
309
|
-
// pointer-events: none;
|
310
|
-
&:hover,
|
311
|
-
&:active,
|
312
|
-
&:focus {
|
313
|
-
border-color: transparent;
|
314
|
-
background-color: transparent;
|
315
|
-
box-shadow: initial;
|
316
|
-
outline: initial;
|
317
|
-
}
|
318
|
-
}
|
319
|
-
|
320
240
|
@media (hover: hover) {
|
321
241
|
// if hover is the primary input mechanism hide edit button
|
322
242
|
.#{$block-class}__edit {
|
@@ -333,10 +253,6 @@ $block-class: #{c4p-settings.$pkg-prefix}--inline-edit;
|
|
333
253
|
opacity: 1;
|
334
254
|
}
|
335
255
|
|
336
|
-
.#{$block-class}__validation-icon {
|
337
|
-
@include input-button-defaults($block-class);
|
338
|
-
}
|
339
|
-
|
340
256
|
&.#{$block-class}--invalid .#{$block-class}__validation-icon {
|
341
257
|
color: $support-error;
|
342
258
|
}
|
@@ -10,6 +10,7 @@
|
|
10
10
|
@use '@carbon/styles/scss/theme' as *;
|
11
11
|
@use '../../global/styles/project-settings' as *;
|
12
12
|
@use '@carbon/styles/scss/type';
|
13
|
+
@use '@carbon/styles/scss/motion' as *;
|
13
14
|
|
14
15
|
$block-class: #{$pkg-prefix}--inline-edit-v2;
|
15
16
|
$carbon-input: #{$carbon-prefix}--text-input;
|
@@ -37,7 +38,7 @@ $carbon-input: #{$carbon-prefix}--text-input;
|
|
37
38
|
visibility: hidden;
|
38
39
|
}
|
39
40
|
|
40
|
-
.#{$block-class}
|
41
|
+
.#{$block-class}--focused {
|
41
42
|
background: $field-01;
|
42
43
|
outline: 2px solid $focus;
|
43
44
|
}
|
@@ -51,8 +52,7 @@ $carbon-input: #{$carbon-prefix}--text-input;
|
|
51
52
|
}
|
52
53
|
|
53
54
|
.#{$block-class}__warning-icon {
|
54
|
-
|
55
|
-
margin-right: 0.4375rem;
|
55
|
+
margin: $spacing-03;
|
56
56
|
color: $support-error;
|
57
57
|
}
|
58
58
|
|
@@ -81,3 +81,42 @@ $carbon-input: #{$carbon-prefix}--text-input;
|
|
81
81
|
.#{$block-class}__text-input.#{$carbon-input}:active {
|
82
82
|
outline: none;
|
83
83
|
}
|
84
|
+
|
85
|
+
.#{$block-class}__toolbar {
|
86
|
+
--toolbar-width: #{$spacing-07};
|
87
|
+
--toolbar-width-focussed: #{$spacing-10};
|
88
|
+
|
89
|
+
// animation div
|
90
|
+
display: inline-flex;
|
91
|
+
overflow: hidden;
|
92
|
+
width: var(--toolbar-width);
|
93
|
+
}
|
94
|
+
|
95
|
+
.#{$block-class}--invalid .#{$block-class}__toolbar {
|
96
|
+
--toolbar-width: #{$spacing-07};
|
97
|
+
--toolbar-width-focussed: #{$spacing-12};
|
98
|
+
}
|
99
|
+
|
100
|
+
@keyframes slide-in {
|
101
|
+
0% {
|
102
|
+
overflow: hidden;
|
103
|
+
width: var(--toolbar-width);
|
104
|
+
}
|
105
|
+
|
106
|
+
99% {
|
107
|
+
overflow: hidden;
|
108
|
+
width: var(--toolbar-width-focussed);
|
109
|
+
}
|
110
|
+
|
111
|
+
100% {
|
112
|
+
overflow: visible;
|
113
|
+
width: var(--toolbar-width-focussed);
|
114
|
+
}
|
115
|
+
}
|
116
|
+
|
117
|
+
.#{$block-class}--focused .#{$block-class}__toolbar {
|
118
|
+
overflow: initial;
|
119
|
+
width: var(--toolbar-width-focussed);
|
120
|
+
|
121
|
+
animation: slide-in $duration-moderate-01 motion(entrance, productive);
|
122
|
+
}
|
@@ -616,7 +616,7 @@ $right-section-alt-width: 100% - $left-section-alt-width;
|
|
616
616
|
background-color: $background;
|
617
617
|
}
|
618
618
|
|
619
|
-
.#{$
|
619
|
+
.#{$block-class}__collapse-expand-toggle {
|
620
620
|
position: absolute;
|
621
621
|
z-index: $raised-z-index + 1;
|
622
622
|
right: 0;
|
@@ -628,8 +628,7 @@ $right-section-alt-width: 100% - $left-section-alt-width;
|
|
628
628
|
transition: all $duration-slow-01 motion(standard, productive);
|
629
629
|
}
|
630
630
|
|
631
|
-
.#{$block-class}__collapse-expand-toggle--collapsed
|
632
|
-
.#{$carbon-prefix}--btn__icon {
|
631
|
+
.#{$block-class}__collapse-expand-toggle--collapsed svg {
|
633
632
|
// transform: rotate(90deg);
|
634
633
|
transform: scaleY(-1);
|
635
634
|
}
|
@@ -21,11 +21,11 @@ $block-class: #{c4p-settings.$pkg-prefix}--card;
|
|
21
21
|
}
|
22
22
|
|
23
23
|
.#{$block-class}__title {
|
24
|
-
@include type.type-style('
|
24
|
+
@include type.type-style('heading-compact-02');
|
25
25
|
}
|
26
26
|
|
27
27
|
.#{$block-class}__title-lg .#{$block-class}__title {
|
28
|
-
@include type.type-style('
|
28
|
+
@include type.type-style('heading-03');
|
29
29
|
}
|
30
30
|
|
31
31
|
.#{$block-class}__body {
|
@@ -43,6 +43,7 @@ $block-class: #{c4p-settings.$pkg-prefix}--card;
|
|
43
43
|
}
|
44
44
|
|
45
45
|
.#{$block-class}__actions {
|
46
|
+
min-height: $spacing-07;
|
46
47
|
margin: 0;
|
47
48
|
}
|
48
49
|
|
@@ -51,6 +52,34 @@ $block-class: #{c4p-settings.$pkg-prefix}--card;
|
|
51
52
|
margin-right: $spacing-03;
|
52
53
|
}
|
53
54
|
|
55
|
+
.#{$block-class}__actions-header-ghost-button {
|
56
|
+
min-height: $spacing-07;
|
57
|
+
padding: 0 $spacing-05;
|
58
|
+
// stylelint-disable-next-line carbon/layout-token-use
|
59
|
+
padding-right: calc($spacing-01 + $spacing-03);
|
60
|
+
// stylelint-disable-next-line carbon/layout-token-use
|
61
|
+
padding-left: calc($spacing-01 + $spacing-03);
|
62
|
+
|
63
|
+
/* stylelint-disable-next-line max-nesting-depth */
|
64
|
+
&::before {
|
65
|
+
position: absolute;
|
66
|
+
left: 0;
|
67
|
+
width: 0.05rem;
|
68
|
+
height: $spacing-06;
|
69
|
+
background-color: theme.$layer-hover-01;
|
70
|
+
content: '';
|
71
|
+
opacity: 1;
|
72
|
+
}
|
73
|
+
|
74
|
+
/* stylelint-disable-next-line max-nesting-depth */
|
75
|
+
&:hover {
|
76
|
+
/* stylelint-disable-next-line max-nesting-depth */
|
77
|
+
&::before {
|
78
|
+
opacity: 0;
|
79
|
+
}
|
80
|
+
}
|
81
|
+
}
|
82
|
+
|
54
83
|
.#{$block-class}__title-lg .#{$block-class}__actions-header,
|
55
84
|
.#{$block-class}__header-has-label .#{$block-class}__actions-header {
|
56
85
|
margin-top: 0;
|
@@ -332,6 +332,7 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
|
|
332
332
|
padding: 0;
|
333
333
|
color: $text-primary;
|
334
334
|
}
|
335
|
+
|
335
336
|
.#{c4p-settings.$carbon-prefix}--btn.#{$block-class}__close-button {
|
336
337
|
position: absolute;
|
337
338
|
z-index: 5;
|
@@ -340,8 +341,8 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
|
|
340
341
|
display: flex;
|
341
342
|
align-items: center;
|
342
343
|
justify-content: center;
|
343
|
-
background-color: $layer-01;
|
344
344
|
}
|
345
|
+
|
345
346
|
.#{c4p-settings.$carbon-prefix}--btn.#{$block-class}__close-button
|
346
347
|
.#{c4p-settings.$carbon-prefix}--btn__icon {
|
347
348
|
margin: 0;
|
@@ -92,6 +92,11 @@ $theme-keys: map-keys($themes);
|
|
92
92
|
border-radius: 50%;
|
93
93
|
}
|
94
94
|
|
95
|
+
.#{$carbon-prefix}--btn--ghost.#{$block-class}__tooltip:focus {
|
96
|
+
border: 0;
|
97
|
+
box-shadow: 0 0 0 $spacing-02 $focus;
|
98
|
+
}
|
99
|
+
|
95
100
|
.#{$carbon-prefix}--tooltip__trigger .#{$block-class} svg,
|
96
101
|
.#{$block-class}__tooltip.#{$carbon-prefix}--btn--ghost:not([disabled]) svg {
|
97
102
|
fill: $layer-01;
|