@carbon/ibm-products 2.0.0-rc.27 → 2.0.0-rc.29
Sign up to get free protection for your applications and to get access to all the features.
- package/css/config.css +3 -0
- package/css/config.css.map +1 -0
- package/css/index-full-carbon.css +126 -355
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +6 -6
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +196 -252
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +4 -4
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +126 -355
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +6 -6
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +126 -355
- package/css/index.css.map +1 -1
- package/css/index.min.css +6 -6
- package/css/index.min.css.map +1 -1
- package/es/components/AboutModal/AboutModal.js +44 -66
- package/es/components/ActionBar/ActionBar.js +13 -29
- package/es/components/AddSelect/AddSelectBody.js +4 -2
- package/es/components/AddSelect/AddSelectColumn.js +11 -5
- package/es/components/AddSelect/AddSelectFilter.js +5 -4
- package/es/components/AddSelect/AddSelectRow.js +3 -3
- package/es/components/AddSelect/AddSelectSort.js +2 -1
- package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +15 -21
- package/es/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +7 -11
- package/es/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +7 -8
- package/es/components/Datagrid/Datagrid/DatagridToolbar.js +6 -5
- package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +3 -4
- 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 +8 -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/index.js +1 -0
- package/es/components/Datagrid/useEditableCell.js +13 -0
- package/es/components/Datagrid/useFiltering.js +4 -2
- package/es/components/Datagrid/useInlineEdit.js +16 -11
- 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/ExampleComponent/ExampleDeprecatedComponent.js +24 -0
- package/es/components/PageHeader/PageHeader.js +36 -35
- package/es/components/PageHeader/PageHeaderTitle.js +18 -18
- package/es/components/SidePanel/SidePanel.js +25 -26
- package/es/components/TagSet/TagSet.js +5 -7
- package/es/components/Tearsheet/Tearsheet.js +5 -0
- package/es/components/Tearsheet/TearsheetShell.js +4 -6
- package/es/components/index.js +1 -2
- 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 +4 -6
- package/es/settings.js +40 -20
- package/lib/components/AboutModal/AboutModal.js +43 -66
- package/lib/components/ActionBar/ActionBar.js +13 -29
- package/lib/components/AddSelect/AddSelectBody.js +4 -2
- package/lib/components/AddSelect/AddSelectColumn.js +11 -5
- package/lib/components/AddSelect/AddSelectFilter.js +4 -3
- package/lib/components/AddSelect/AddSelectRow.js +2 -2
- package/lib/components/AddSelect/AddSelectSort.js +2 -1
- package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +13 -19
- package/lib/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +7 -11
- package/lib/components/Datagrid/Datagrid/DatagridSelectAllWithToggle.js +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +5 -4
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +3 -4
- 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 +8 -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/index.js +8 -0
- package/lib/components/Datagrid/useEditableCell.js +23 -0
- package/lib/components/Datagrid/useFiltering.js +4 -2
- package/lib/components/Datagrid/useInlineEdit.js +22 -11
- 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/ExampleComponent/ExampleDeprecatedComponent.js +38 -0
- package/lib/components/PageHeader/PageHeader.js +36 -35
- package/lib/components/PageHeader/PageHeaderTitle.js +19 -19
- package/lib/components/SidePanel/SidePanel.js +25 -26
- package/lib/components/TagSet/TagSet.js +5 -7
- package/lib/components/Tearsheet/Tearsheet.js +5 -0
- package/lib/components/Tearsheet/TearsheetShell.js +4 -6
- package/lib/components/index.js +7 -15
- 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 +4 -6
- package/lib/settings.js +43 -21
- package/package.json +3 -4
- package/scss/components/AboutModal/_about-modal.scss +34 -53
- package/scss/components/AboutModal/_storybook-styles.scss +10 -4
- package/scss/components/AddSelect/_add-select.scss +7 -3
- package/scss/components/BreadcrumbWithOverflow/_breadcrumb-with-overflow.scss +10 -1
- package/scss/components/DataSpreadsheet/_data-spreadsheet.scss +1 -1
- 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/PageHeader/_page-header.scss +1 -7
- 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 -3
- package/scss/components/_index.scss +1 -3
- package/scss/config.scss +1 -0
- 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/es/components/ModifiedTabs/ModifiedTabLabelNew.js +0 -34
- package/es/components/ModifiedTabs/ModifiedTabLabelWithClose.js +0 -47
- package/es/components/ModifiedTabs/ModifiedTabs.js +0 -141
- package/es/components/ModifiedTabs/index.js +0 -1
- 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/lib/components/ModifiedTabs/ModifiedTabLabelNew.js +0 -50
- package/lib/components/ModifiedTabs/ModifiedTabLabelWithClose.js +0 -63
- package/lib/components/ModifiedTabs/ModifiedTabs.js +0 -164
- package/lib/components/ModifiedTabs/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/ModifiedTabs/_carbon-imports.scss +0 -10
- package/scss/components/ModifiedTabs/_index-with-carbon.scss +0 -9
- package/scss/components/ModifiedTabs/_index.scss +0 -8
- package/scss/components/ModifiedTabs/_modified-tabs.scss +0 -89
- package/scss/components/ModifiedTabs/_storybook-styles.scss +0 -6
- /package/scss/components/{InlineEditV2 → EditInPlace}/_carbon-imports.scss +0 -0
@@ -21,61 +21,59 @@ $block-class: #{c4p-settings.$pkg-prefix}--about-modal;
|
|
21
21
|
}
|
22
22
|
|
23
23
|
.#{$block-class} .#{$block-class}__logo {
|
24
|
-
margin: $spacing-05;
|
24
|
+
margin: $spacing-05 $spacing-05 $spacing-07 $spacing-05;
|
25
25
|
}
|
26
26
|
|
27
27
|
.#{$block-class} .#{$block-class}__header {
|
28
|
-
padding: 0 20%
|
28
|
+
padding: 0 20% 0 $spacing-05;
|
29
29
|
margin-bottom: 0;
|
30
30
|
grid-row: auto;
|
31
31
|
}
|
32
32
|
|
33
33
|
.#{$block-class} .#{$block-class}__title {
|
34
|
-
@include type.type-style('
|
34
|
+
@include type.type-style('heading-04');
|
35
35
|
|
36
36
|
color: $text-primary;
|
37
37
|
}
|
38
38
|
|
39
39
|
.#{$block-class} .#{$block-class}__body {
|
40
|
-
@include type.type-style('body-
|
40
|
+
@include type.type-style('body-compact-02');
|
41
41
|
|
42
42
|
min-height: $spacing-10;
|
43
43
|
padding: 0 20% 0 $spacing-05;
|
44
|
+
margin-bottom: $spacing-06;
|
44
45
|
grid-row: auto;
|
45
46
|
overflow-x: hidden;
|
46
47
|
overflow-y: auto;
|
47
48
|
}
|
48
49
|
|
49
|
-
.#{$block-class}.#{$block-class}--with-tabs .#{$block-class}__body {
|
50
|
-
min-height: calc(#{$spacing-10} + #{$spacing-08});
|
51
|
-
// stylelint-disable-next-line carbon/layout-token-use
|
52
|
-
margin-bottom: calc(#{$spacing-09} + #{$spacing-08});
|
53
|
-
}
|
54
|
-
|
55
|
-
.#{$block-class}.#{$block-class}--with-tabs
|
56
|
-
.#{c4p-settings.$carbon-prefix}--modal-content--overflow-indicator {
|
57
|
-
// stylelint-disable-next-line carbon/layout-token-use
|
58
|
-
bottom: calc(#{$spacing-09} + #{$spacing-08});
|
59
|
-
}
|
60
|
-
|
61
50
|
.#{$block-class}
|
62
51
|
.#{c4p-settings.$carbon-prefix}--modal-content--overflow-indicator {
|
52
|
+
bottom: #{$spacing-06};
|
63
53
|
background-image: linear-gradient(to bottom, #00000000, $layer-01);
|
64
54
|
}
|
65
55
|
|
66
56
|
.#{$block-class} .#{$block-class}__links-container {
|
67
|
-
|
57
|
+
@include type.type-style('body-compact-01');
|
58
|
+
|
59
|
+
margin-top: $spacing-06;
|
60
|
+
}
|
61
|
+
|
62
|
+
.#{$block-class} .#{$block-class}__version {
|
63
|
+
color: $text-secondary;
|
68
64
|
}
|
69
65
|
|
70
66
|
.#{$block-class} .#{$block-class}__links-container a + a {
|
71
67
|
padding-left: $spacing-03;
|
72
|
-
border-left: 1px solid $
|
68
|
+
border-left: 1px solid $border-strong-01;
|
73
69
|
margin-left: $spacing-03;
|
74
70
|
}
|
75
71
|
|
76
|
-
.#{$block-class} .#{$block-class}
|
72
|
+
.#{$block-class} .#{$block-class}__content,
|
77
73
|
.#{$block-class} .#{$block-class}__copyright-text {
|
78
|
-
|
74
|
+
@include type.type-style('label-01');
|
75
|
+
|
76
|
+
margin-top: $spacing-06;
|
79
77
|
margin-bottom: 0;
|
80
78
|
color: $text-secondary;
|
81
79
|
}
|
@@ -84,46 +82,29 @@ $block-class: #{c4p-settings.$pkg-prefix}--about-modal;
|
|
84
82
|
margin-top: $spacing-05;
|
85
83
|
}
|
86
84
|
|
85
|
+
p.c4p--about-modal__content:first-child,
|
86
|
+
p.c4p--about-modal__copyright-text:first-child {
|
87
|
+
margin-top: $spacing-07;
|
88
|
+
}
|
89
|
+
|
87
90
|
.#{$block-class} .#{$block-class}__footer {
|
88
91
|
position: relative;
|
89
|
-
height:
|
92
|
+
height: calc(
|
93
|
+
#{$spacing-05} + #{$spacing-02} + #{$spacing-06} + #{$spacing-07}
|
94
|
+
);
|
90
95
|
flex-direction: column;
|
91
96
|
justify-content: center;
|
92
|
-
background-color: $
|
93
|
-
color: $text-inverse;
|
94
|
-
}
|
95
|
-
|
96
|
-
.#{$block-class} .#{$block-class}__tab-container {
|
97
|
-
position: absolute;
|
98
|
-
bottom: 0;
|
97
|
+
background-color: $layer-02;
|
99
98
|
}
|
100
99
|
|
101
|
-
.#{$block-class} .#{$block-class}
|
102
|
-
|
103
|
-
@include type.type-style('body-short-01');
|
104
|
-
|
105
|
-
padding-left: $spacing-05;
|
106
|
-
margin-top: 0;
|
107
|
-
margin-bottom: 0;
|
108
|
-
color: $text-inverse;
|
109
|
-
}
|
100
|
+
.#{$block-class} .#{$block-class}__footer-label {
|
101
|
+
@include type.type-style('label-01');
|
110
102
|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
.#{$block-class}
|
116
|
-
.#{c4p-settings.$carbon-prefix}--tabs
|
117
|
-
.#{c4p-settings.$carbon-prefix}--tabs__nav-link,
|
118
|
-
.#{$block-class} .#{c4p-settings.$carbon-prefix}--tab-content {
|
119
|
-
@include type.type-style('body-short-01');
|
120
|
-
}
|
121
|
-
|
122
|
-
.#{$block-class} .#{c4p-settings.$carbon-prefix}--tab-content {
|
123
|
-
height: $spacing-03 + $spacing-10;
|
103
|
+
padding: $spacing-05 0 0 $spacing-05;
|
104
|
+
margin-bottom: $spacing-02;
|
105
|
+
color: $text-secondary;
|
124
106
|
}
|
125
107
|
|
126
|
-
.#{$block-class} .#{
|
127
|
-
|
128
|
-
align-items: center;
|
108
|
+
.#{$block-class} .#{$block-class}__footer-content {
|
109
|
+
padding: 0 0 $spacing-05 $spacing-05;
|
129
110
|
}
|
@@ -8,9 +8,15 @@
|
|
8
8
|
@use '../../global/styles/project-settings' as *;
|
9
9
|
@use '@carbon/styles/scss/spacing' as *;
|
10
10
|
|
11
|
-
.
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
// Standard imports.
|
12
|
+
@use '../../global/styles/project-settings' as c4p-settings;
|
13
|
+
|
14
|
+
// The block part of our conventional BEM class names (blockClass__E--M).
|
15
|
+
$block-class: #{c4p-settings.$pkg-prefix}--about-modal;
|
16
|
+
|
17
|
+
.#{$block-class}__stories--tech-logo {
|
18
|
+
width: $spacing-06;
|
19
|
+
height: $spacing-06;
|
20
|
+
margin-right: $spacing-03;
|
15
21
|
object-fit: contain;
|
16
22
|
}
|
@@ -265,6 +265,10 @@ $tearsheet-class: #{$pkg-prefix}--tearsheet;
|
|
265
265
|
}
|
266
266
|
}
|
267
267
|
|
268
|
+
.#{$block-class}-sort_overflow {
|
269
|
+
z-index: 9999;
|
270
|
+
}
|
271
|
+
|
268
272
|
.#{$block-class}__tags {
|
269
273
|
display: flex;
|
270
274
|
align-items: center;
|
@@ -278,7 +282,7 @@ $tearsheet-class: #{$pkg-prefix}--tearsheet;
|
|
278
282
|
|
279
283
|
.#{$block-class}__global-filter {
|
280
284
|
position: absolute;
|
281
|
-
z-index:
|
285
|
+
z-index: 999999;
|
282
286
|
right: 0;
|
283
287
|
width: 100%;
|
284
288
|
max-width: 40rem;
|
@@ -461,7 +465,7 @@ button.#{$block-class}__global-filter-toggle {
|
|
461
465
|
margin-top: $spacing-03;
|
462
466
|
}
|
463
467
|
|
464
|
-
.#{$block-class} .#{$carbon-prefix}--tooltip,
|
465
|
-
.#{$block-class} .#{$carbon-prefix}--overflow-menu-options {
|
468
|
+
.#{$block-class} + div .#{$carbon-prefix}--tooltip,
|
469
|
+
.#{$block-class} + div .#{$carbon-prefix}--overflow-menu-options {
|
466
470
|
z-index: 9000;
|
467
471
|
}
|
@@ -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;
|
@@ -274,7 +274,7 @@ $header-cell-background: $layer-accent-01;
|
|
274
274
|
.#{$block-class}__th--selected-header,
|
275
275
|
.#{$block-class}__td-th--selected-header.#{$block-class}__td {
|
276
276
|
background-color: $background-inverse;
|
277
|
-
color: $text-
|
277
|
+
color: $text-inverse;
|
278
278
|
|
279
279
|
/* stylelint-disable-next-line max-nesting-depth */
|
280
280
|
&:focus,
|
@@ -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;
|
@@ -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';
|
@@ -25,7 +25,6 @@
|
|
25
25
|
@use './ExpressiveCard/index-with-carbon' as *;
|
26
26
|
@use './HTTPErrors/index-with-carbon' as *;
|
27
27
|
@use './ImportModal/index-with-carbon' as *;
|
28
|
-
@use './ModifiedTabs/index-with-carbon' as *;
|
29
28
|
@use './MultiAddSelect/index-with-carbon' as *;
|
30
29
|
@use './NotificationsPanel/index-with-carbon' as *;
|
31
30
|
@use './PageHeader/index-with-carbon' as *;
|
@@ -42,8 +41,7 @@
|
|
42
41
|
@use './UserProfileImage/index-with-carbon' as *;
|
43
42
|
@use './EditSidePanel/index-with-carbon' as *;
|
44
43
|
@use './OptionsTile/index-with-carbon' as *;
|
45
|
-
@use './
|
46
|
-
@use './InlineEditV2/index-with-carbon' as *;
|
44
|
+
@use './EditInPlace/index-with-carbon' as *;
|
47
45
|
@use './DataSpreadsheet/index-with-carbon' as *;
|
48
46
|
@use './Datagrid/index-with-carbon' as *;
|
49
47
|
@use './EditUpdateCards/index-with-carbon' as *;
|
@@ -26,7 +26,6 @@
|
|
26
26
|
@use './FilterSummary/index';
|
27
27
|
@use './HTTPErrors';
|
28
28
|
@use './ImportModal';
|
29
|
-
@use './ModifiedTabs';
|
30
29
|
@use './MultiAddSelect';
|
31
30
|
@use './NotificationsPanel';
|
32
31
|
@use './PageHeader';
|
@@ -43,8 +42,7 @@
|
|
43
42
|
@use './UserProfileImage';
|
44
43
|
@use './EditSidePanel';
|
45
44
|
@use './OptionsTile';
|
46
|
-
@use './
|
47
|
-
@use './InlineEditV2';
|
45
|
+
@use './EditInPlace';
|
48
46
|
@use './DataSpreadsheet';
|
49
47
|
@use './Datagrid';
|
50
48
|
@use './EditTearsheet';
|
package/scss/config.scss
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
@forward './global/styles/project-settings';
|
@@ -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
|
-
};
|