@carbon/ibm-products 1.32.1 → 1.34.0
Sign up to get free protection for your applications and to get access to all the features.
- package/css/index-full-carbon.css +210 -158
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +7 -3
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +12 -144
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +7 -3
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +193 -156
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +7 -3
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +208 -156
- package/css/index.css.map +1 -1
- package/css/index.min.css +7 -3
- package/css/index.min.css.map +1 -1
- package/es/components/CreateTearsheetNarrow/CreateTearsheetNarrow.js +2 -2
- package/es/components/DataSpreadsheet/hooks/useMultipleKeyTracking.js +4 -3
- package/es/components/Datagrid/Datagrid/DatagridContent.js +30 -7
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +0 -1
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +84 -38
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +2 -2
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleMultipleKeys.js +21 -0
- package/es/components/Datagrid/utils/getArgTypes.js +4 -0
- package/es/components/Datagrid/utils/getInlineEditColumns.js +25 -7
- package/es/components/Datagrid/utils/makeData.js +10 -1
- package/es/components/InlineEditV2/InlineEditV2.js +249 -0
- package/es/components/InlineEditV2/index.js +1 -0
- package/es/components/PageHeader/PageHeaderTitle.js +3 -1
- package/es/components/SidePanel/SidePanel.js +44 -51
- package/es/components/SidePanel/motion/variants.js +39 -0
- package/es/components/index.js +2 -1
- package/es/global/js/package-settings.js +2 -1
- package/es/global/js/utils/getBezierValues.js +20 -0
- package/es/global/js/utils/motionConstants.js +45 -0
- package/lib/components/CreateTearsheetNarrow/CreateTearsheetNarrow.js +2 -2
- package/lib/components/DataSpreadsheet/hooks/useMultipleKeyTracking.js +4 -3
- package/lib/components/Datagrid/Datagrid/DatagridContent.js +29 -5
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +0 -1
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +84 -38
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +2 -2
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleMultipleKeys.js +22 -0
- package/lib/components/Datagrid/utils/getArgTypes.js +4 -0
- package/lib/components/Datagrid/utils/getInlineEditColumns.js +25 -7
- package/lib/components/Datagrid/utils/makeData.js +10 -1
- package/lib/components/InlineEditV2/InlineEditV2.js +277 -0
- package/lib/components/InlineEditV2/index.js +13 -0
- package/lib/components/PageHeader/PageHeaderTitle.js +3 -1
- package/lib/components/SidePanel/SidePanel.js +45 -50
- package/lib/components/SidePanel/motion/variants.js +49 -0
- package/lib/components/index.js +9 -1
- package/lib/global/js/package-settings.js +2 -1
- package/lib/global/js/utils/getBezierValues.js +29 -0
- package/lib/global/js/utils/motionConstants.js +55 -0
- package/package.json +14 -13
- package/scss/components/Datagrid/_storybook-styles.scss +11 -0
- package/scss/components/Datagrid/styles/_datagrid.scss +0 -5
- package/scss/components/Datagrid/styles/_useInlineEdit.scss +177 -2
- package/scss/components/InlineEdit/_inline-edit.scss +4 -2
- package/scss/components/InlineEditV2/_index.scss +10 -0
- package/scss/components/InlineEditV2/_inline-edit-v2.scss +81 -0
- package/scss/components/ModifiedTabs/_modified-tabs.scss +1 -1
- package/scss/components/PageHeader/_page-header.scss +4 -0
- package/scss/components/SidePanel/_side-panel.scss +0 -75
- package/scss/components/_index.scss +2 -0
@@ -0,0 +1,49 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.panelVariants = exports.overlayVariants = void 0;
|
7
|
+
|
8
|
+
var _motionConstants = require("../../../global/js/utils/motionConstants");
|
9
|
+
|
10
|
+
var overlayVariants = {
|
11
|
+
visible: {
|
12
|
+
opacity: 1,
|
13
|
+
transition: {
|
14
|
+
duration: _motionConstants.DURATIONS.moderate02,
|
15
|
+
ease: _motionConstants.EASINGS.productive.standard
|
16
|
+
}
|
17
|
+
},
|
18
|
+
hidden: {
|
19
|
+
opacity: 0
|
20
|
+
},
|
21
|
+
exit: {
|
22
|
+
opacity: 0
|
23
|
+
}
|
24
|
+
};
|
25
|
+
exports.overlayVariants = overlayVariants;
|
26
|
+
var panelVariants = {
|
27
|
+
visible: {
|
28
|
+
x: 0,
|
29
|
+
transition: {
|
30
|
+
duration: _motionConstants.DURATIONS.moderate02,
|
31
|
+
ease: _motionConstants.EASINGS.productive.standard
|
32
|
+
}
|
33
|
+
},
|
34
|
+
hidden: function hidden(placement) {
|
35
|
+
return {
|
36
|
+
x: placement === 'right' ? '100%' : -320
|
37
|
+
};
|
38
|
+
},
|
39
|
+
exit: function exit(placement) {
|
40
|
+
return {
|
41
|
+
x: placement === 'right' ? '100%' : -320,
|
42
|
+
transition: {
|
43
|
+
duration: _motionConstants.DURATIONS.moderate01,
|
44
|
+
ease: _motionConstants.EASINGS.productive.exit
|
45
|
+
}
|
46
|
+
};
|
47
|
+
}
|
48
|
+
};
|
49
|
+
exports.panelVariants = panelVariants;
|
package/lib/components/index.js
CHANGED
@@ -171,6 +171,12 @@ Object.defineProperty(exports, "InlineEdit", {
|
|
171
171
|
return _InlineEdit.InlineEdit;
|
172
172
|
}
|
173
173
|
});
|
174
|
+
Object.defineProperty(exports, "InlineEditV2", {
|
175
|
+
enumerable: true,
|
176
|
+
get: function get() {
|
177
|
+
return _InlineEditV.InlineEditV2;
|
178
|
+
}
|
179
|
+
});
|
174
180
|
Object.defineProperty(exports, "ModifiedTabs", {
|
175
181
|
enumerable: true,
|
176
182
|
get: function get() {
|
@@ -502,4 +508,6 @@ var _EditTearsheet = require("./EditTearsheet");
|
|
502
508
|
|
503
509
|
var _EditTearsheetNarrow = require("./EditTearsheetNarrow");
|
504
510
|
|
505
|
-
var _EditFullPage = require("./EditFullPage");
|
511
|
+
var _EditFullPage = require("./EditFullPage");
|
512
|
+
|
513
|
+
var _InlineEditV = require("./InlineEditV2");
|
@@ -0,0 +1,29 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.getBezierValues = void 0;
|
7
|
+
|
8
|
+
var _motion = require("@carbon/motion");
|
9
|
+
|
10
|
+
/**
|
11
|
+
* This function turns a cubic-bezier() string to an
|
12
|
+
* array of values that we can use with framer-motion
|
13
|
+
* @param {string} type - The carbon motion type, either 'standard', 'entrance', or 'exit'
|
14
|
+
* @param {string} mode - The carbon motion mode, either 'productive', or 'expressive'
|
15
|
+
*/
|
16
|
+
var getBezierValues = function getBezierValues(type, mode) {
|
17
|
+
var cubicBezier = (0, _motion.motion)(type, mode);
|
18
|
+
var extractStringFromParens = /\(([^)]+)\)/;
|
19
|
+
var desiredBezierStrings = extractStringFromParens.exec(cubicBezier)[1];
|
20
|
+
var formattedDesiredBezierStrings = desiredBezierStrings.trim().split(',').map(Number);
|
21
|
+
|
22
|
+
if (Array.isArray(formattedDesiredBezierStrings)) {
|
23
|
+
return formattedDesiredBezierStrings;
|
24
|
+
}
|
25
|
+
|
26
|
+
return [];
|
27
|
+
};
|
28
|
+
|
29
|
+
exports.getBezierValues = getBezierValues;
|
@@ -0,0 +1,55 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.EASINGS = exports.DURATIONS = void 0;
|
7
|
+
|
8
|
+
var _getBezierValues = require("./getBezierValues");
|
9
|
+
|
10
|
+
var _motion = require("@carbon/motion");
|
11
|
+
|
12
|
+
/**
|
13
|
+
* Copyright IBM Corp. 2022, 2022
|
14
|
+
*
|
15
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
17
|
+
*/
|
18
|
+
var cleanMotionValue = function cleanMotionValue(val) {
|
19
|
+
return parseInt(val) / 1000;
|
20
|
+
};
|
21
|
+
|
22
|
+
var DURATIONS = {
|
23
|
+
// Micro-interactions such as button and toggle
|
24
|
+
fast01: cleanMotionValue(_motion.fast01),
|
25
|
+
// '70ms'
|
26
|
+
// Micro-interactions such as fade
|
27
|
+
fast02: cleanMotionValue(_motion.fast02),
|
28
|
+
// '110ms'
|
29
|
+
// Micro-interactions, small expansion, short distance movements
|
30
|
+
moderate01: cleanMotionValue(_motion.moderate01),
|
31
|
+
// '150ms'
|
32
|
+
// Expansion, system communication, toast
|
33
|
+
moderate02: cleanMotionValue(_motion.moderate02),
|
34
|
+
// '240ms'
|
35
|
+
// Large expansion, important system notifications
|
36
|
+
slow01: cleanMotionValue(_motion.slow01),
|
37
|
+
// '400ms'
|
38
|
+
// Background dimming
|
39
|
+
slow02: cleanMotionValue(_motion.slow02) // '700ms'
|
40
|
+
|
41
|
+
};
|
42
|
+
exports.DURATIONS = DURATIONS;
|
43
|
+
var EASINGS = {
|
44
|
+
productive: {
|
45
|
+
entrance: (0, _getBezierValues.getBezierValues)('entrance', 'productive'),
|
46
|
+
standard: (0, _getBezierValues.getBezierValues)('standard', 'productive'),
|
47
|
+
exit: (0, _getBezierValues.getBezierValues)('exit', 'productive')
|
48
|
+
},
|
49
|
+
expressive: {
|
50
|
+
entrance: (0, _getBezierValues.getBezierValues)('entrance', 'expressive'),
|
51
|
+
standard: (0, _getBezierValues.getBezierValues)('standard', 'expressive'),
|
52
|
+
exit: (0, _getBezierValues.getBezierValues)('exit', 'expressive')
|
53
|
+
}
|
54
|
+
};
|
55
|
+
exports.EASINGS = EASINGS;
|
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.34.0",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "lib/index.js",
|
7
7
|
"module": "es/index.js",
|
@@ -50,28 +50,29 @@
|
|
50
50
|
"upgrade-dependencies": "npm-check-updates -u --dep dev,peer,prod --color --reject '/(carbon|^react$|^react-dom$|^chalk$|^react-dnd|^namor)/'"
|
51
51
|
},
|
52
52
|
"devDependencies": {
|
53
|
-
"@babel/cli": "^7.
|
54
|
-
"@babel/core": "^7.19.
|
55
|
-
"babel-preset-ibm-cloud-cognitive": "^0.14.
|
53
|
+
"@babel/cli": "^7.19.3",
|
54
|
+
"@babel/core": "^7.19.3",
|
55
|
+
"babel-preset-ibm-cloud-cognitive": "^0.14.21",
|
56
56
|
"chalk": "^4.1.2",
|
57
57
|
"change-case": "^4.1.2",
|
58
58
|
"copyfiles": "^2.4.1",
|
59
59
|
"cross-env": "^7.0.3",
|
60
60
|
"fs-extra": "^10.1.0",
|
61
61
|
"glob": "^8.0.3",
|
62
|
-
"jest": "^29.
|
63
|
-
"jest-config-ibm-cloud-cognitive": "^0.24.
|
64
|
-
"jest-environment-jsdom": "^29.
|
62
|
+
"jest": "^29.1.2",
|
63
|
+
"jest-config-ibm-cloud-cognitive": "^0.24.7",
|
64
|
+
"jest-environment-jsdom": "^29.1.2",
|
65
65
|
"namor": "^1.1.2",
|
66
|
-
"npm-check-updates": "^16.
|
66
|
+
"npm-check-updates": "^16.3.4",
|
67
67
|
"npm-run-all": "^4.1.5",
|
68
68
|
"rimraf": "^3.0.2",
|
69
|
-
"sass": "^1.
|
70
|
-
"yargs": "^17.
|
69
|
+
"sass": "^1.55.0",
|
70
|
+
"yargs": "^17.6.0"
|
71
71
|
},
|
72
72
|
"dependencies": {
|
73
73
|
"@babel/runtime": "^7.19.0",
|
74
74
|
"@carbon/telemetry": "^0.1.0",
|
75
|
+
"framer-motion": "^6.5.1",
|
75
76
|
"immutability-helper": "^3.1.1",
|
76
77
|
"react-dnd": "^15.1.2",
|
77
78
|
"react-dnd-html5-backend": "^15.1.3",
|
@@ -87,11 +88,11 @@
|
|
87
88
|
"@carbon/motion": "^10.29.0",
|
88
89
|
"@carbon/themes": "^10.55.0",
|
89
90
|
"@carbon/type": "^10.45.0",
|
90
|
-
"carbon-components": "^10.58.
|
91
|
-
"carbon-components-react": "^7.59.
|
91
|
+
"carbon-components": "^10.58.3",
|
92
|
+
"carbon-components-react": "^7.59.3",
|
92
93
|
"carbon-icons": "^7.0.7",
|
93
94
|
"react": "^16.8.6 || ^17.0.1",
|
94
95
|
"react-dom": "^16.8.6 || ^17.0.1"
|
95
96
|
},
|
96
|
-
"gitHead": "
|
97
|
+
"gitHead": "4d7381ec5c70fafb0f37ab93673fe6f7ccd85fb0"
|
97
98
|
}
|
@@ -86,3 +86,14 @@ $block-class: #{$pkg-prefix}--datagrid;
|
|
86
86
|
.#{$pkg-prefix}--side-panel__inner-content {
|
87
87
|
height: 100%;
|
88
88
|
}
|
89
|
+
|
90
|
+
.#{$block-class}-story__custom-cell-wrapper.#{$carbon-prefix}--link {
|
91
|
+
display: block;
|
92
|
+
overflow: hidden;
|
93
|
+
text-overflow: ellipsis;
|
94
|
+
white-space: nowrap;
|
95
|
+
}
|
96
|
+
|
97
|
+
.#{$block-class}-story__hidden-column-id-snippet {
|
98
|
+
padding-top: $spacing-07;
|
99
|
+
}
|
@@ -38,7 +38,7 @@ $row-heights: (
|
|
38
38
|
.#{$block-class}
|
39
39
|
.#{$block-class}__inline-edit--outer-cell-button--#{$size}
|
40
40
|
.#{$carbon-prefix}--number__control-btn::after {
|
41
|
-
height: calc($size-value - 0.25rem);
|
41
|
+
height: calc(#{$size-value} - 0.25rem);
|
42
42
|
}
|
43
43
|
.#{$block-class}
|
44
44
|
.#{$block-class}__inline-edit--select.#{$block-class}__inline-edit--select-#{$size}.#{$carbon-prefix}--list-box {
|
@@ -56,6 +56,10 @@ $row-heights: (
|
|
56
56
|
}
|
57
57
|
}
|
58
58
|
|
59
|
+
.#{$block-class} {
|
60
|
+
--#{$block-class}--grid-header-height: 0;
|
61
|
+
}
|
62
|
+
|
59
63
|
.#{$block-class}__inline-edit-cell {
|
60
64
|
display: flex;
|
61
65
|
height: 100%;
|
@@ -75,6 +79,7 @@ $row-heights: (
|
|
75
79
|
.#{$block-class}__inline-edit--outer-cell-button
|
76
80
|
.#{$block-class}__inline-edit-button {
|
77
81
|
position: relative;
|
82
|
+
z-index: 2;
|
78
83
|
display: flex;
|
79
84
|
width: 100%;
|
80
85
|
height: 100%;
|
@@ -90,6 +95,7 @@ $row-heights: (
|
|
90
95
|
}
|
91
96
|
&.#{$block-class}__inline-edit-button--non-edit {
|
92
97
|
padding-left: 0;
|
98
|
+
cursor: default;
|
93
99
|
}
|
94
100
|
.#{$block-class}__inline-edit-button-icon {
|
95
101
|
height: $spacing-05;
|
@@ -211,7 +217,176 @@ $row-heights: (
|
|
211
217
|
white-space: nowrap;
|
212
218
|
}
|
213
219
|
|
214
|
-
.#{$
|
220
|
+
.#{$block-class}
|
221
|
+
.#{$carbon-prefix}--data-table
|
222
|
+
.#{$block-class}__carbon-row-hover-active
|
223
|
+
td {
|
215
224
|
border-top-color: $hover-ui;
|
216
225
|
background-color: $hover-ui;
|
217
226
|
}
|
227
|
+
|
228
|
+
// Custom border/outline for the focus region, because of the scrolling
|
229
|
+
// containers, using default border or outline did not
|
230
|
+
.#{$block-class} .#{$block-class}__grid-container-grid-active::before {
|
231
|
+
position: absolute;
|
232
|
+
z-index: 2;
|
233
|
+
bottom: 0;
|
234
|
+
left: 0;
|
235
|
+
width: 2px;
|
236
|
+
height: calc(100% - 50px - var(--#{$block-class}--grid-header-height));
|
237
|
+
background-color: $inverse-link;
|
238
|
+
content: '';
|
239
|
+
}
|
240
|
+
|
241
|
+
.#{$block-class} .#{$block-class}__grid-container-grid-active::after {
|
242
|
+
position: absolute;
|
243
|
+
z-index: 2;
|
244
|
+
right: 0;
|
245
|
+
bottom: 0;
|
246
|
+
width: 2px;
|
247
|
+
height: calc(100% - 50px - var(--#{$block-class}--grid-header-height));
|
248
|
+
background-color: $inverse-link;
|
249
|
+
content: '';
|
250
|
+
}
|
251
|
+
|
252
|
+
.#{$block-class}
|
253
|
+
.#{$block-class}__grid-container-grid-active
|
254
|
+
.#{$carbon-prefix}--data-table-content::before {
|
255
|
+
position: absolute;
|
256
|
+
z-index: 2;
|
257
|
+
top: 0;
|
258
|
+
right: 0;
|
259
|
+
left: 0;
|
260
|
+
width: var(--#{$block-class}--grid-width);
|
261
|
+
height: 2px;
|
262
|
+
background-color: $inverse-link;
|
263
|
+
}
|
264
|
+
|
265
|
+
.#{$block-class}
|
266
|
+
.#{$block-class}__grid-container-grid-active.#{$block-class}__grid-container-grid-active--without-toolbar::before,
|
267
|
+
.#{$block-class}
|
268
|
+
.#{$block-class}__grid-container-grid-active.#{$block-class}__grid-container-grid-active--without-toolbar::after {
|
269
|
+
height: calc(100% - 2px - var(--#{$block-class}--grid-header-height));
|
270
|
+
}
|
271
|
+
|
272
|
+
.#{$block-class}
|
273
|
+
.#{$block-class}__grid-container-grid-active
|
274
|
+
.#{$block-class}__table-container {
|
275
|
+
outline: 2px solid $inverse-link;
|
276
|
+
outline-offset: -2px;
|
277
|
+
}
|
278
|
+
|
279
|
+
.#{$block-class}
|
280
|
+
.#{$block-class}__grid-container-inline-edit
|
281
|
+
.#{$block-class}__table-container {
|
282
|
+
padding-top: $spacing-01;
|
283
|
+
}
|
284
|
+
|
285
|
+
.#{$block-class}
|
286
|
+
.#{$block-class}__inline-edit--outer-cell-button--invalid
|
287
|
+
[data-invalid]
|
288
|
+
~ .#{$carbon-prefix}--form-requirement,
|
289
|
+
.#{$block-class}
|
290
|
+
.#{$block-class}__inline-edit--outer-cell-button--invalid
|
291
|
+
[data-invalid]
|
292
|
+
.#{$carbon-prefix}--form-requirement {
|
293
|
+
position: absolute;
|
294
|
+
z-index: 3;
|
295
|
+
top: calc(100% - #{$spacing-01});
|
296
|
+
width: 100%;
|
297
|
+
padding: $spacing-03 $spacing-06 $spacing-03 $spacing-03;
|
298
|
+
margin: 0;
|
299
|
+
background-color: $ui-01;
|
300
|
+
outline: $spacing-01 solid $danger-02;
|
301
|
+
outline-offset: calc(-1 * #{$spacing-01});
|
302
|
+
}
|
303
|
+
|
304
|
+
.#{$block-class}
|
305
|
+
.#{$block-class}__inline-edit--outer-cell-button--invalid
|
306
|
+
.#{$carbon-prefix}--list-box[data-invalid]:focus-within
|
307
|
+
~ .#{$carbon-prefix}--form-requirement {
|
308
|
+
outline: $spacing-01 solid $focus;
|
309
|
+
}
|
310
|
+
|
311
|
+
.#{$block-class}
|
312
|
+
.#{$block-class}__inline-edit--outer-cell-button--invalid
|
313
|
+
.#{$carbon-prefix}--list-box__invalid-icon,
|
314
|
+
.#{$block-class}
|
315
|
+
.#{$block-class}__inline-edit--outer-cell-button--invalid
|
316
|
+
.#{$carbon-prefix}--text-input__invalid-icon,
|
317
|
+
.#{$block-class}
|
318
|
+
.#{$block-class}__inline-edit--outer-cell-button--invalid
|
319
|
+
.#{$carbon-prefix}--number__invalid {
|
320
|
+
z-index: 4;
|
321
|
+
top: calc(100% + #{$spacing-04} + #{$spacing-01});
|
322
|
+
right: $spacing-03;
|
323
|
+
}
|
324
|
+
|
325
|
+
.#{$block-class}
|
326
|
+
.#{$block-class}__inline-edit--outer-cell-button--invalid
|
327
|
+
.#{$carbon-prefix}--number__invalid {
|
328
|
+
top: calc(100% + #{$spacing-02} + #{$spacing-01});
|
329
|
+
}
|
330
|
+
|
331
|
+
.#{$block-class}
|
332
|
+
.#{$block-class}__inline-edit--outer-cell-button--invalid
|
333
|
+
.#{$carbon-prefix}--form-requirement::before {
|
334
|
+
position: absolute;
|
335
|
+
top: 0;
|
336
|
+
left: $spacing-01;
|
337
|
+
width: calc(100% - (#{$spacing-01} * 2));
|
338
|
+
height: $spacing-01;
|
339
|
+
background-color: $ui-01;
|
340
|
+
content: '';
|
341
|
+
}
|
342
|
+
|
343
|
+
.#{$block-class}__inline-edit--outer-cell-button--invalid
|
344
|
+
.#{$carbon-prefix}--form-requirement::after {
|
345
|
+
position: absolute;
|
346
|
+
top: $spacing-01;
|
347
|
+
left: $spacing-03;
|
348
|
+
width: calc(100% - (#{$spacing-03} * 2));
|
349
|
+
height: 1px;
|
350
|
+
background-color: $ui-03;
|
351
|
+
content: '';
|
352
|
+
}
|
353
|
+
|
354
|
+
.#{$block-class} tbody tr:hover {
|
355
|
+
.#{$block-class}__inline-edit--outer-cell-button--invalid
|
356
|
+
.#{$carbon-prefix}--form-requirement::before {
|
357
|
+
background-color: $ui-03;
|
358
|
+
}
|
359
|
+
.#{$block-class}__inline-edit--outer-cell-button--invalid
|
360
|
+
.#{$carbon-prefix}--form-requirement::after {
|
361
|
+
background-color: transparent;
|
362
|
+
}
|
363
|
+
}
|
364
|
+
|
365
|
+
// Keep input focus states using $support-01 when inline edit cell is invalid
|
366
|
+
.#{$block-class}
|
367
|
+
.#{$block-class}__inline-edit--outer-cell-button--invalid
|
368
|
+
.#{$carbon-prefix}--text-input:focus,
|
369
|
+
.#{$block-class}
|
370
|
+
.#{$block-class}__inline-edit--outer-cell-button--invalid
|
371
|
+
.#{$carbon-prefix}--number
|
372
|
+
input[type='number']:focus,
|
373
|
+
.#{$block-class}
|
374
|
+
.#{$block-class}__inline-edit--outer-cell-button--invalid
|
375
|
+
.#{$carbon-prefix}--number
|
376
|
+
input[type='number']:focus
|
377
|
+
~ .#{$carbon-prefix}--number__controls
|
378
|
+
.#{$carbon-prefix}--number__control-btn:hover,
|
379
|
+
.#{$block-class}
|
380
|
+
.#{$block-class}__inline-edit--outer-cell-button--invalid
|
381
|
+
.#{$carbon-prefix}--number__control-btn:focus {
|
382
|
+
outline-color: $support-01;
|
383
|
+
}
|
384
|
+
|
385
|
+
.#{$block-class}
|
386
|
+
.#{$block-class}__inline-edit--outer-cell-button--invalid
|
387
|
+
.#{$carbon-prefix}--number
|
388
|
+
input[type='number'][data-invalid]:focus
|
389
|
+
~ .#{$carbon-prefix}--number__controls
|
390
|
+
.#{$carbon-prefix}--number__control-btn.up-icon::after {
|
391
|
+
background-color: $support-01;
|
392
|
+
}
|
@@ -105,9 +105,11 @@
|
|
105
105
|
overflow: hidden;
|
106
106
|
// positions text and placeholder including when showing placeholder
|
107
107
|
// NOTE: Using flex does strange things to a caret in content editable
|
108
|
-
width: calc(
|
108
|
+
width: calc(
|
109
|
+
100% - var(--#{$block-class}--toolbar-width) - #{$spacing-05}
|
110
|
+
);
|
109
111
|
max-width: calc(
|
110
|
-
100% - var(--#{$block-class}--toolbar-width) - $spacing-05
|
112
|
+
100% - var(--#{$block-class}--toolbar-width) - #{$spacing-05}
|
111
113
|
);
|
112
114
|
min-height: var(--#{$block-class}--size);
|
113
115
|
/* stylelint-disable-next-line carbon/layout-token-use */
|
@@ -0,0 +1,10 @@
|
|
1
|
+
//
|
2
|
+
// Copyright IBM Corp. 2020, 2021
|
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
|
+
// An index file is most useful when you have multiple components
|
9
|
+
|
10
|
+
@import './inline-edit-v2';
|
@@ -0,0 +1,81 @@
|
|
1
|
+
//
|
2
|
+
// Copyright IBM Corp. 2020, 2021
|
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
|
+
// Standard imports.
|
9
|
+
@import '../../global/styles/project-settings';
|
10
|
+
@import 'carbon-components/scss/components/button/button';
|
11
|
+
@import 'carbon-components/scss/components/text-input/text-input';
|
12
|
+
|
13
|
+
@mixin inline-edit-v2 {
|
14
|
+
$block-class: #{$pkg-prefix}--inline-edit-v2;
|
15
|
+
$carbon-text-input: #{$carbon-prefix}--text-input;
|
16
|
+
|
17
|
+
.#{$block-class} {
|
18
|
+
display: flex;
|
19
|
+
align-items: center;
|
20
|
+
background: transparent;
|
21
|
+
cursor: pointer;
|
22
|
+
|
23
|
+
&-readonly {
|
24
|
+
cursor: not-allowed;
|
25
|
+
}
|
26
|
+
|
27
|
+
&:hover {
|
28
|
+
background: $hover-ui;
|
29
|
+
}
|
30
|
+
|
31
|
+
&:hover .#{$block-class}__btn-edit {
|
32
|
+
visibility: visible;
|
33
|
+
}
|
34
|
+
|
35
|
+
&__btn-edit {
|
36
|
+
visibility: hidden;
|
37
|
+
}
|
38
|
+
|
39
|
+
&-focused {
|
40
|
+
background: $hover-ui;
|
41
|
+
outline: 2px solid $focus;
|
42
|
+
}
|
43
|
+
|
44
|
+
&__text-input {
|
45
|
+
flex: 1;
|
46
|
+
}
|
47
|
+
|
48
|
+
&__warning-icon {
|
49
|
+
color: $support-01;
|
50
|
+
}
|
51
|
+
|
52
|
+
&__warning-text {
|
53
|
+
@include carbon--type-style('caption-01');
|
54
|
+
|
55
|
+
margin-top: $spacing-03;
|
56
|
+
color: $support-01;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
// overrides
|
61
|
+
.#{$block-class}__text-input.#{$carbon-text-input} {
|
62
|
+
border: none;
|
63
|
+
background: transparent;
|
64
|
+
cursor: pointer;
|
65
|
+
outline: none;
|
66
|
+
}
|
67
|
+
|
68
|
+
.#{$block-class}-readonly .#{$block-class}__text-input.#{$carbon-text-input} {
|
69
|
+
color: $disabled-02;
|
70
|
+
cursor: not-allowed;
|
71
|
+
}
|
72
|
+
|
73
|
+
.#{$block-class}__text-input.#{$carbon-text-input}:focus,
|
74
|
+
.#{$block-class}__text-input.#{$carbon-text-input}:active {
|
75
|
+
outline: none;
|
76
|
+
}
|
77
|
+
}
|
78
|
+
|
79
|
+
@include exports('inline-edit-v2') {
|
80
|
+
@include inline-edit-v2;
|
81
|
+
}
|
@@ -32,8 +32,8 @@
|
|
32
32
|
height: 2.5rem;
|
33
33
|
padding: $spacing-04;
|
34
34
|
border: $spacing-01 solid transparent;
|
35
|
-
background-color: transparent;
|
36
35
|
border-radius: 0;
|
36
|
+
background-color: transparent;
|
37
37
|
cursor: pointer;
|
38
38
|
transition: background-color $duration--fast-02 motion(standard, productive);
|
39
39
|
// stylelint-disable-next-line max-nesting-depth
|
@@ -471,6 +471,10 @@ $right-section-alt-width: 100% - $left-section-alt-width;
|
|
471
471
|
vertical-align: middle;
|
472
472
|
}
|
473
473
|
|
474
|
+
.#{$block-class}__title-wrapper {
|
475
|
+
@include carbon--type-style('productive-heading-04');
|
476
|
+
}
|
477
|
+
|
474
478
|
.#{$block-class}__page-actions {
|
475
479
|
flex: 0 0 100%;
|
476
480
|
margin-top: $spacing-05;
|