@carbon/ibm-products 2.0.0-rc.26 → 2.0.0-rc.28
Sign up to get free protection for your applications and to get access to all the features.
- package/css/index-full-carbon.css +131 -251
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +3 -5
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +202 -219
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +1 -3
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +131 -251
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +3 -5
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +131 -251
- package/css/index.css.map +1 -1
- package/css/index.min.css +3 -5
- package/css/index.min.css.map +1 -1
- package/es/components/AboutModal/AboutModal.js +3 -4
- package/es/components/ActionBar/ActionBar.js +13 -29
- package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +15 -21
- package/es/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +7 -11
- 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/DatagridSelectAllWithToggle.js +7 -8
- package/es/components/Datagrid/Datagrid/DatagridSimpleBody.js +3 -1
- package/es/components/Datagrid/Datagrid/DatagridToolbar.js +6 -5
- package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +6 -5
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +17 -3
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +19 -4
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +19 -5
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useInitialStateFromFilters.js +2 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/utils.js +19 -1
- package/es/components/Datagrid/useFiltering.js +4 -2
- package/es/components/Datagrid/useOnRowClick.js +11 -1
- package/es/components/Datagrid/useSelectRows.js +2 -0
- package/es/components/{InlineEditV2/InlineEditV2.js → EditInPlace/EditInPlace.js} +92 -30
- package/es/components/{InlineEdit → EditInPlace}/index.js +1 -1
- package/es/components/ExpressiveCard/ExpressiveCard.js +3 -3
- package/es/components/PageHeader/PageHeader.js +40 -38
- package/es/components/PageHeader/PageHeaderTitle.js +18 -18
- package/es/components/ProductiveCard/ProductiveCard.js +3 -3
- 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 +79 -0
- package/es/global/js/hooks/useWindowResize.js +6 -0
- package/es/global/js/hooks/useWindowScroll.js +7 -0
- package/es/global/js/package-settings.js +2 -4
- package/lib/components/AboutModal/AboutModal.js +3 -4
- package/lib/components/ActionBar/ActionBar.js +13 -29
- package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +13 -19
- package/lib/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +7 -11
- 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/DatagridSelectAllWithToggle.js +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.js +3 -1
- package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +5 -4
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +6 -5
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +17 -3
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +19 -4
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +19 -5
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useInitialStateFromFilters.js +2 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/utils.js +18 -1
- package/lib/components/Datagrid/useFiltering.js +4 -2
- package/lib/components/Datagrid/useOnRowClick.js +11 -1
- package/lib/components/Datagrid/useSelectRows.js +2 -0
- package/lib/components/{InlineEditV2/InlineEditV2.js → EditInPlace/EditInPlace.js} +100 -34
- package/lib/components/{InlineEdit → EditInPlace}/index.js +3 -3
- package/lib/components/ExpressiveCard/ExpressiveCard.js +3 -3
- package/lib/components/PageHeader/PageHeader.js +40 -38
- package/lib/components/PageHeader/PageHeaderTitle.js +19 -19
- package/lib/components/ProductiveCard/ProductiveCard.js +3 -3
- 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 +7 -7
- package/lib/global/js/hooks/useResizeObserver.js +91 -0
- package/lib/global/js/hooks/useWindowScroll.js +6 -0
- package/lib/global/js/package-settings.js +2 -4
- package/package.json +3 -4
- package/scss/components/ActionBar/_action-bar.scss +0 -4
- package/scss/components/BreadcrumbWithOverflow/_breadcrumb-with-overflow.scss +10 -1
- package/scss/components/Card/_card.scss +13 -6
- package/scss/components/Datagrid/styles/_useSelectAllToggle.scss +11 -7
- package/scss/components/{InlineEditV2/_inline-edit-v2.scss → EditInPlace/_edit-in-place.scss} +56 -14
- package/scss/components/{InlineEditV1 → EditInPlace}/_index-with-carbon.scss +1 -1
- package/scss/components/{InlineEditV2 → EditInPlace}/_index.scss +1 -1
- package/scss/components/{InlineEditV1 → EditInPlace}/_storybook-styles.scss +3 -15
- package/scss/components/ExportModal/_export-modal.scss +0 -4
- package/scss/components/ExpressiveCard/_expressive-card.scss +1 -1
- package/scss/components/PageHeader/_page-header.scss +3 -10
- package/scss/components/ProductiveCard/_productive-card.scss +31 -2
- package/scss/components/TagSet/_tag-set.scss +1 -0
- package/scss/components/UserProfileImage/_user-profile-image.scss +5 -0
- package/scss/components/_index-released-only-with-carbon.scss +1 -1
- package/scss/components/_index-released-only.scss +1 -1
- package/scss/components/_index-with-carbon.scss +1 -2
- package/scss/components/_index.scss +1 -2
- package/es/components/InlineEdit/InlineEdit.js +0 -47
- package/es/components/InlineEditV1/InlineEditV1.js +0 -442
- package/es/components/InlineEditV1/index.js +0 -7
- package/es/components/InlineEditV2/index.js +0 -7
- package/lib/components/InlineEdit/InlineEdit.js +0 -63
- package/lib/components/InlineEditV1/InlineEditV1.js +0 -459
- package/lib/components/InlineEditV1/index.js +0 -13
- package/lib/components/InlineEditV2/index.js +0 -13
- package/scss/components/InlineEditV1/_carbon-imports.scss +0 -6
- package/scss/components/InlineEditV1/_index.scss +0 -8
- package/scss/components/InlineEditV1/_inline-edit-v1.scss +0 -269
- package/scss/components/InlineEditV2/_index-with-carbon.scss +0 -9
- package/scss/components/InlineEditV2/_storybook-styles.scss +0 -9
- /package/scss/components/{InlineEditV2 → EditInPlace}/_carbon-imports.scss +0 -0
@@ -31,6 +31,7 @@ var defaults = {
|
|
31
31
|
CreateTearsheet: true,
|
32
32
|
CreateTearsheetStep: true,
|
33
33
|
CreateTearsheetDivider: true,
|
34
|
+
EditInPlace: true,
|
34
35
|
EmptyState: true,
|
35
36
|
ErrorEmptyState: true,
|
36
37
|
ExportModal: true,
|
@@ -39,8 +40,6 @@ var defaults = {
|
|
39
40
|
HTTPError404: true,
|
40
41
|
HTTPErrorOther: true,
|
41
42
|
ImportModal: true,
|
42
|
-
InlineEdit: true,
|
43
|
-
InlineEditV1: true,
|
44
43
|
MultiAddSelect: true,
|
45
44
|
NotificationsPanel: true,
|
46
45
|
NoDataEmptyState: true,
|
@@ -75,8 +74,7 @@ var defaults = {
|
|
75
74
|
EditTearsheet: false,
|
76
75
|
EditTearsheetNarrow: false,
|
77
76
|
EditFullPage: false,
|
78
|
-
EditUpdateCards: false
|
79
|
-
InlineEditV2: false
|
77
|
+
EditUpdateCards: false
|
80
78
|
/* new component flags here - comment used by generate CLI */
|
81
79
|
|
82
80
|
},
|
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.28",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "lib/index.js",
|
7
7
|
"module": "es/index.js",
|
@@ -11,7 +11,7 @@
|
|
11
11
|
"repository": {
|
12
12
|
"type": "git",
|
13
13
|
"url": "https://github.com/carbon-design-system/ibm-cloud-cognitive.git",
|
14
|
-
"directory": "packages/
|
14
|
+
"directory": "packages/ibm-products"
|
15
15
|
},
|
16
16
|
"bugs": "https://github.com/carbon-design-system/ibm-cloud-cognitive/issues",
|
17
17
|
"sideEffects": [
|
@@ -80,7 +80,6 @@
|
|
80
80
|
"immutability-helper": "^3.1.1",
|
81
81
|
"react-dnd": "^15.1.2",
|
82
82
|
"react-dnd-html5-backend": "^15.1.3",
|
83
|
-
"react-resize-detector": "^7.1.2",
|
84
83
|
"react-table": "^7.8.0",
|
85
84
|
"react-window": "^1.8.7"
|
86
85
|
},
|
@@ -94,5 +93,5 @@
|
|
94
93
|
"react": "^16.8.6 || ^17.0.1",
|
95
94
|
"react-dom": "^16.8.6 || ^17.0.1"
|
96
95
|
},
|
97
|
-
"gitHead": "
|
96
|
+
"gitHead": "d459d01283f68efa6a4bfbdc79a97bf508f83f6b"
|
98
97
|
}
|
@@ -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;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
//
|
2
|
-
// Copyright IBM Corp. 2020,
|
2
|
+
// Copyright IBM Corp. 2020, 2023
|
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.
|
@@ -47,6 +47,15 @@ $_block-class: #{c4p-settings.$pkg-prefix}--breadcrumb-with-overflow;
|
|
47
47
|
display: none;
|
48
48
|
}
|
49
49
|
|
50
|
+
.#{$_block-class}__back__button.#{c4p-settings.$carbon-prefix}--btn {
|
51
|
+
min-height: revert;
|
52
|
+
padding: 0;
|
53
|
+
}
|
54
|
+
|
55
|
+
.#{$_block-class}__back__button.#{c4p-settings.$carbon-prefix}--btn--ghost:hover {
|
56
|
+
background-color: inherit;
|
57
|
+
}
|
58
|
+
|
50
59
|
@include breakpoint-down(md) {
|
51
60
|
.#{c4p-settings.$carbon-prefix}--breadcrumb-item {
|
52
61
|
display: none;
|
@@ -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;
|
@@ -1,14 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
*/
|
1
|
+
//
|
2
|
+
// Copyright IBM Corp. 2021, 2023
|
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
|
+
//
|
8
7
|
|
9
8
|
@use '@carbon/styles/scss/spacing' as *;
|
10
9
|
@use '@carbon/styles/scss/theme' as *;
|
11
10
|
@use './variables';
|
11
|
+
@use '../../../global/styles/project-settings' as c4p-settings;
|
12
12
|
|
13
13
|
.#{variables.$block-class}__grid-container {
|
14
14
|
th.#{variables.$block-class}__select-all-toggle-on,
|
@@ -31,3 +31,7 @@ th.#{variables.$block-class}__select-all-toggle-on {
|
|
31
31
|
th.#{variables.$block-class}__select-all-toggle-on.button {
|
32
32
|
margin-left: $spacing-01;
|
33
33
|
}
|
34
|
+
|
35
|
+
.#{variables.$block-class}__select-all-toggle-overflow.#{c4p-settings.$carbon-prefix}--overflow-menu-options--sm.#{c4p-settings.$carbon-prefix}--overflow-menu-options[data-floating-menu-direction='bottom']::after {
|
36
|
+
width: $spacing-13;
|
37
|
+
}
|
package/scss/components/{InlineEditV2/_inline-edit-v2.scss → EditInPlace/_edit-in-place.scss}
RENAMED
@@ -12,17 +12,32 @@
|
|
12
12
|
@use '@carbon/styles/scss/type';
|
13
13
|
@use '@carbon/styles/scss/motion' as *;
|
14
14
|
|
15
|
-
$block-class: #{$pkg-prefix}--
|
15
|
+
$block-class: #{$pkg-prefix}--edit-in-place;
|
16
16
|
$carbon-input: #{$carbon-prefix}--text-input;
|
17
17
|
|
18
18
|
.#{$block-class} {
|
19
|
+
--#{$block-class}--size: #{$spacing-07};
|
20
|
+
|
19
21
|
display: flex;
|
20
22
|
align-items: center;
|
21
23
|
background: transparent;
|
22
24
|
cursor: pointer;
|
23
25
|
}
|
24
26
|
|
25
|
-
.#{$block-class}
|
27
|
+
.#{$block-class}--sm {
|
28
|
+
--#{$block-class}--size: #{$spacing-07};
|
29
|
+
}
|
30
|
+
|
31
|
+
.#{$block-class}--md {
|
32
|
+
--#{$block-class}--size: #{$spacing-08};
|
33
|
+
}
|
34
|
+
|
35
|
+
.#{$block-class}--lg {
|
36
|
+
/* April 2023 max text input size */
|
37
|
+
--#{$block-class}--size: #{$spacing-09};
|
38
|
+
}
|
39
|
+
|
40
|
+
.#{$block-class}--readonly {
|
26
41
|
cursor: not-allowed;
|
27
42
|
}
|
28
43
|
|
@@ -30,7 +45,8 @@ $carbon-input: #{$carbon-prefix}--text-input;
|
|
30
45
|
background: $field-01;
|
31
46
|
}
|
32
47
|
|
33
|
-
.#{$block-class}:hover .#{$block-class}__btn-edit
|
48
|
+
.#{$block-class}:hover .#{$block-class}__btn-edit,
|
49
|
+
.#{$block-class}__btn-edit.#{$block-class}__btn-edit--always-visible {
|
34
50
|
visibility: visible;
|
35
51
|
}
|
36
52
|
|
@@ -38,6 +54,10 @@ $carbon-input: #{$carbon-prefix}--text-input;
|
|
38
54
|
visibility: hidden;
|
39
55
|
}
|
40
56
|
|
57
|
+
.#{$block-class}--invalid {
|
58
|
+
outline: 2px solid $support-error;
|
59
|
+
}
|
60
|
+
|
41
61
|
.#{$block-class}--focused {
|
42
62
|
background: $field-01;
|
43
63
|
outline: 2px solid $focus;
|
@@ -47,12 +67,32 @@ $carbon-input: #{$carbon-prefix}--text-input;
|
|
47
67
|
flex: 1;
|
48
68
|
}
|
49
69
|
|
70
|
+
.#{$block-class}--inherit-type .#{$block-class}__text-input {
|
71
|
+
/* match font of container */
|
72
|
+
font-size: inherit;
|
73
|
+
font-weight: inherit;
|
74
|
+
letter-spacing: inherit;
|
75
|
+
line-height: inherit;
|
76
|
+
}
|
77
|
+
|
78
|
+
.#{$block-class}__ellipsis {
|
79
|
+
position: relative;
|
80
|
+
margin-left: calc(-1 * $spacing-05);
|
81
|
+
opacity: 0;
|
82
|
+
}
|
83
|
+
|
84
|
+
.#{$block-class}--overflows:not(.#{$block-class}--focused)
|
85
|
+
.#{$block-class}__ellipsis {
|
86
|
+
opacity: 1;
|
87
|
+
}
|
88
|
+
|
50
89
|
.#{$block-class}__text-input-label {
|
51
90
|
display: none;
|
52
91
|
}
|
53
92
|
|
54
93
|
.#{$block-class}__warning-icon {
|
55
|
-
|
94
|
+
width: $spacing-05;
|
95
|
+
margin: auto $spacing-03;
|
56
96
|
color: $support-error;
|
57
97
|
}
|
58
98
|
|
@@ -71,11 +111,11 @@ $carbon-input: #{$carbon-prefix}--text-input;
|
|
71
111
|
outline: none;
|
72
112
|
}
|
73
113
|
|
74
|
-
.#{$block-class}-readonly .#{$block-class}__text-input.#{$carbon-input},
|
75
|
-
.#{$block-class}-readonly
|
76
|
-
|
77
|
-
|
78
|
-
}
|
114
|
+
// .#{$block-class}-readonly .#{$block-class}__text-input.#{$carbon-input},
|
115
|
+
// .#{$block-class}-readonly
|
116
|
+
// .#{$carbon-prefix}--btn.#{$carbon-prefix}--btn--icon-only.#{$carbon-prefix}--tooltip__trigger {
|
117
|
+
// cursor: not-allowed;
|
118
|
+
// }
|
79
119
|
|
80
120
|
.#{$block-class}__text-input.#{$carbon-input}:focus,
|
81
121
|
.#{$block-class}__text-input.#{$carbon-input}:active {
|
@@ -83,18 +123,20 @@ $carbon-input: #{$carbon-prefix}--text-input;
|
|
83
123
|
}
|
84
124
|
|
85
125
|
.#{$block-class}__toolbar {
|
86
|
-
--toolbar-width:
|
87
|
-
--toolbar-width-focussed:
|
126
|
+
--toolbar-width: var(--#{$block-class}--size);
|
127
|
+
--toolbar-width-focussed: calc(2 * var(--#{$block-class}--size));
|
88
128
|
|
89
129
|
// animation div
|
90
130
|
display: inline-flex;
|
91
|
-
overflow: hidden;
|
92
131
|
width: var(--toolbar-width);
|
93
132
|
}
|
94
133
|
|
95
134
|
.#{$block-class}--invalid .#{$block-class}__toolbar {
|
96
|
-
|
97
|
-
--toolbar-width
|
135
|
+
// width of invalid icon is always $spacing-07 ($spacing-05 + 2 * $spacing-03 margin)
|
136
|
+
--toolbar-width: calc(var(--#{$block-class}--size) + #{$spacing-07});
|
137
|
+
--toolbar-width-focussed: calc(
|
138
|
+
2 * var(--#{$block-class}--size) + #{$spacing-07}
|
139
|
+
);
|
98
140
|
}
|
99
141
|
|
100
142
|
@keyframes slide-in {
|
@@ -4,24 +4,12 @@
|
|
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.
|
6
6
|
//
|
7
|
-
|
8
|
-
@use '@carbon/type/scss/scale';
|
9
7
|
@use '../../global/styles/display-box';
|
10
|
-
@use '../../global/styles/project-settings' as c4p-settings;
|
11
8
|
|
12
|
-
|
9
|
+
$block-class: 'edit-in-place-example';
|
10
|
+
|
11
|
+
.#{$block-class}__viewport {
|
13
12
|
// width: 300px; // larger than standard size needed by text input at standard font size (html input attribute size)
|
14
13
|
// stylelint-disable-next-line carbon/layout-token-use
|
15
14
|
margin: 100px;
|
16
15
|
}
|
17
|
-
|
18
|
-
$block-class: #{c4p-settings.$pkg-prefix}--inline-edit;
|
19
|
-
|
20
|
-
.component-full-width {
|
21
|
-
.#{$block-class} {
|
22
|
-
width: 100%;
|
23
|
-
}
|
24
|
-
.#{$block-class} .#{$block-class}__input {
|
25
|
-
@include scale.font-size(2);
|
26
|
-
}
|
27
|
-
}
|
@@ -357,7 +357,7 @@ $right-section-alt-width: 100% - $left-section-alt-width;
|
|
357
357
|
}
|
358
358
|
|
359
359
|
.#{$block-class}__title-row {
|
360
|
-
margin-top:
|
360
|
+
margin-top: $spacing-01; /* spacing needed in case of editable title, otherwise top of focus indicator hidden */
|
361
361
|
margin-bottom: 0;
|
362
362
|
transform: translateY(
|
363
363
|
$spacing-01
|
@@ -436,12 +436,6 @@ $right-section-alt-width: 100% - $left-section-alt-width;
|
|
436
436
|
white-space: nowrap;
|
437
437
|
}
|
438
438
|
|
439
|
-
.#{$block-class}__title .#{$pkg-prefix}--inline-edit__value {
|
440
|
-
// The heading text sits 2px pixels lower in the inline edit which is aligned center
|
441
|
-
// stylelint-disable-next-line carbon/layout-token-use
|
442
|
-
transform: translateY(-2px);
|
443
|
-
}
|
444
|
-
|
445
439
|
.#{$block-class}__title--editable {
|
446
440
|
display: flex;
|
447
441
|
overflow: visible;
|
@@ -616,7 +610,7 @@ $right-section-alt-width: 100% - $left-section-alt-width;
|
|
616
610
|
background-color: $background;
|
617
611
|
}
|
618
612
|
|
619
|
-
.#{$
|
613
|
+
.#{$block-class}__collapse-expand-toggle {
|
620
614
|
position: absolute;
|
621
615
|
z-index: $raised-z-index + 1;
|
622
616
|
right: 0;
|
@@ -628,8 +622,7 @@ $right-section-alt-width: 100% - $left-section-alt-width;
|
|
628
622
|
transition: all $duration-slow-01 motion(standard, productive);
|
629
623
|
}
|
630
624
|
|
631
|
-
.#{$block-class}__collapse-expand-toggle--collapsed
|
632
|
-
.#{$carbon-prefix}--btn__icon {
|
625
|
+
.#{$block-class}__collapse-expand-toggle--collapsed svg {
|
633
626
|
// transform: rotate(90deg);
|
634
627
|
transform: scaleY(-1);
|
635
628
|
}
|
@@ -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;
|
@@ -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;
|
@@ -17,11 +17,11 @@
|
|
17
17
|
@use './CreateSidePanel/index-with-carbon' as *;
|
18
18
|
@use './CreateTearsheetNarrow/index-with-carbon' as *;
|
19
19
|
@use './CreateTearsheet/index-with-carbon' as *;
|
20
|
+
@use './EditInPlace/index-with-carbon' as *;
|
20
21
|
@use './EmptyStates/index-with-carbon' as *;
|
21
22
|
@use './ExportModal/index-with-carbon' as *;
|
22
23
|
@use './ExpressiveCard/index-with-carbon' as *;
|
23
24
|
@use './HTTPErrors/index-with-carbon' as *;
|
24
|
-
@use './InlineEditV1/index-with-carbon' as *;
|
25
25
|
@use './ImportModal/index-with-carbon' as *;
|
26
26
|
@use './MultiAddSelect/index-with-carbon' as *;
|
27
27
|
@use './NotificationsPanel/index-with-carbon' as *;
|
@@ -17,11 +17,11 @@
|
|
17
17
|
@use './CreateSidePanel';
|
18
18
|
@use './CreateTearsheetNarrow';
|
19
19
|
@use './CreateTearsheet';
|
20
|
+
@use './EditInPlace';
|
20
21
|
@use './EmptyStates';
|
21
22
|
@use './ExportModal';
|
22
23
|
@use './ExpressiveCard';
|
23
24
|
@use './HTTPErrors';
|
24
|
-
@use './InlineEditV1';
|
25
25
|
@use './ImportModal';
|
26
26
|
@use './MultiAddSelect';
|
27
27
|
@use './NotificationsPanel';
|
@@ -42,8 +42,7 @@
|
|
42
42
|
@use './UserProfileImage/index-with-carbon' as *;
|
43
43
|
@use './EditSidePanel/index-with-carbon' as *;
|
44
44
|
@use './OptionsTile/index-with-carbon' as *;
|
45
|
-
@use './
|
46
|
-
@use './InlineEditV2/index-with-carbon' as *;
|
45
|
+
@use './EditInPlace/index-with-carbon' as *;
|
47
46
|
@use './DataSpreadsheet/index-with-carbon' as *;
|
48
47
|
@use './Datagrid/index-with-carbon' as *;
|
49
48
|
@use './EditUpdateCards/index-with-carbon' as *;
|
@@ -1,47 +0,0 @@
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
3
|
-
var _excluded = ["v1"];
|
4
|
-
|
5
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
6
|
-
|
7
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
8
|
-
|
9
|
-
/**
|
10
|
-
* Copyright IBM Corp. 2022, 2022
|
11
|
-
*
|
12
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
13
|
-
* LICENSE file in the root directory of this source tree.
|
14
|
-
*/
|
15
|
-
import React, { forwardRef } from 'react';
|
16
|
-
import PropTypes from 'prop-types';
|
17
|
-
import { pkg } from '../../settings';
|
18
|
-
import { InlineEditV1 } from '../InlineEditV1';
|
19
|
-
import { InlineEditV2 } from '../InlineEditV2';
|
20
|
-
/**
|
21
|
-
* this is a wrapper component that will allow us to support v1 and v2 versions of InlineEdit
|
22
|
-
* in the V11 branch, v2 is the set by default.
|
23
|
-
* if the user passes in the v1 feature flag the v1 version of the component will be rendered
|
24
|
-
* since this is a temporary solution the named export should just remain InlineEdit unlike how
|
25
|
-
* Card works as a base layer for Productive and Expressive cards.
|
26
|
-
*/
|
27
|
-
|
28
|
-
var componentName = 'InlineEdit';
|
29
|
-
export var InlineEdit = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
30
|
-
var v1 = _ref.v1,
|
31
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
32
|
-
|
33
|
-
var props = _objectSpread(_objectSpread({}, rest), {}, {
|
34
|
-
ref: ref
|
35
|
-
});
|
36
|
-
|
37
|
-
if (v1 === true) {
|
38
|
-
return /*#__PURE__*/React.createElement(InlineEditV1, props);
|
39
|
-
}
|
40
|
-
|
41
|
-
return /*#__PURE__*/React.createElement(InlineEditV2, props);
|
42
|
-
});
|
43
|
-
InlineEdit = pkg.checkComponentEnabled(InlineEdit, componentName);
|
44
|
-
InlineEdit.displayName = componentName;
|
45
|
-
InlineEdit.propTypes = {
|
46
|
-
v1: PropTypes.bool
|
47
|
-
};
|