@carbon/ibm-products 2.0.0-rc.24 → 2.0.0-rc.26

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. package/README.md +10 -4
  2. package/css/index-full-carbon.css +87 -123
  3. package/css/index-full-carbon.css.map +1 -1
  4. package/css/index-full-carbon.min.css +4 -4
  5. package/css/index-full-carbon.min.css.map +1 -1
  6. package/css/index-without-carbon-released-only.css +18 -109
  7. package/css/index-without-carbon-released-only.css.map +1 -1
  8. package/css/index-without-carbon-released-only.min.css +3 -3
  9. package/css/index-without-carbon-released-only.min.css.map +1 -1
  10. package/css/index-without-carbon.css +87 -123
  11. package/css/index-without-carbon.css.map +1 -1
  12. package/css/index-without-carbon.min.css +4 -4
  13. package/css/index-without-carbon.min.css.map +1 -1
  14. package/css/index.css +87 -123
  15. package/css/index.css.map +1 -1
  16. package/css/index.min.css +4 -4
  17. package/css/index.min.css.map +1 -1
  18. package/es/components/AddSelect/AddSelectBody.js +1 -0
  19. package/es/components/AddSelect/AddSelectFormControl.js +92 -0
  20. package/es/components/AddSelect/AddSelectList.js +26 -195
  21. package/es/components/AddSelect/AddSelectRow.js +220 -0
  22. package/es/components/AddSelect/hooks/useFocus.js +35 -0
  23. package/es/components/CreateFullPage/CreateFullPageStep.js +16 -9
  24. package/es/components/CreateTearsheet/CreateTearsheetStep.js +8 -8
  25. package/es/components/CreateTearsheet/preview-components/MultiStepTearsheet.js +11 -17
  26. package/es/components/CreateTearsheet/preview-components/MultiStepWithIntro.js +9 -13
  27. package/es/components/Datagrid/Datagrid/DatagridContent.js +1 -1
  28. package/es/components/Datagrid/Datagrid/DatagridToolbar.js +1 -1
  29. package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +15 -4
  30. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +15 -60
  31. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +6 -8
  32. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +112 -0
  33. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +1 -0
  34. package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +29 -23
  35. package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +1 -0
  36. package/es/components/Datagrid/index.js +7 -7
  37. package/es/components/Datagrid/useInfiniteScroll.js +5 -1
  38. package/es/components/Datagrid/useOnRowClick.js +3 -3
  39. package/es/components/Datagrid/useSortableColumns.js +19 -9
  40. package/es/components/Datagrid/utils/getAutoSizedColumnWidth.js +29 -0
  41. package/es/components/ExampleComponent/ExampleComponent.js +39 -5
  42. package/es/components/ExampleComponent/useExample.js +51 -0
  43. package/es/components/InlineEditV1/InlineEditV1.js +15 -20
  44. package/es/components/InlineEditV2/InlineEditV2.js +21 -31
  45. package/es/components/SidePanel/SidePanel.js +3 -5
  46. package/es/components/index.js +1 -1
  47. package/es/global/js/package-settings.js +24 -3
  48. package/es/global/js/utils/story-helper.js +9 -0
  49. package/es/global/js/utils/test-helper.js +38 -6
  50. package/lib/components/AddSelect/AddSelectBody.js +1 -0
  51. package/lib/components/AddSelect/AddSelectFormControl.js +110 -0
  52. package/lib/components/AddSelect/AddSelectList.js +29 -203
  53. package/lib/components/AddSelect/AddSelectRow.js +247 -0
  54. package/lib/components/AddSelect/hooks/useFocus.js +46 -0
  55. package/lib/components/CreateFullPage/CreateFullPageStep.js +14 -7
  56. package/lib/components/CreateTearsheet/CreateTearsheetStep.js +7 -7
  57. package/lib/components/CreateTearsheet/preview-components/MultiStepTearsheet.js +10 -16
  58. package/lib/components/CreateTearsheet/preview-components/MultiStepWithIntro.js +9 -13
  59. package/lib/components/Datagrid/Datagrid/DatagridContent.js +1 -1
  60. package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +1 -1
  61. package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +15 -3
  62. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +16 -64
  63. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +6 -8
  64. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +132 -0
  65. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +1 -0
  66. package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +23 -16
  67. package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeRadioGroup.js +1 -0
  68. package/lib/components/Datagrid/index.js +9 -1
  69. package/lib/components/Datagrid/useInfiniteScroll.js +5 -0
  70. package/lib/components/Datagrid/useOnRowClick.js +3 -3
  71. package/lib/components/Datagrid/useSortableColumns.js +19 -9
  72. package/lib/components/Datagrid/utils/getAutoSizedColumnWidth.js +40 -0
  73. package/lib/components/ExampleComponent/ExampleComponent.js +47 -4
  74. package/lib/components/ExampleComponent/useExample.js +63 -0
  75. package/lib/components/InlineEditV1/InlineEditV1.js +14 -19
  76. package/lib/components/InlineEditV2/InlineEditV2.js +20 -30
  77. package/lib/components/SidePanel/SidePanel.js +2 -4
  78. package/lib/components/index.js +6 -0
  79. package/lib/global/js/package-settings.js +24 -3
  80. package/lib/global/js/utils/story-helper.js +13 -2
  81. package/lib/global/js/utils/test-helper.js +42 -8
  82. package/package.json +2 -2
  83. package/scss/components/AddSelect/_add-select.scss +4 -16
  84. package/scss/components/CreateFullPage/_create-full-page.scss +5 -10
  85. package/scss/components/CreateTearsheet/_create-tearsheet.scss +8 -3
  86. package/scss/components/Datagrid/styles/_datagrid.scss +4 -0
  87. package/scss/components/Datagrid/styles/_useSortableColumns.scss +6 -3
  88. package/scss/components/Datagrid/styles/addons/_CustomizeColumnsTearsheet.scss +15 -2
  89. package/scss/components/Datagrid/styles/addons/_RowSizeDropdown.scss +18 -6
  90. package/scss/components/EmptyStates/_empty-state.scss +2 -2
  91. package/scss/components/InlineEditV1/_inline-edit-v1.scss +5 -89
  92. package/scss/components/InlineEditV2/_inline-edit-v2.scss +42 -3
  93. package/scss/components/SidePanel/_side-panel.scss +7 -15
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.24",
4
+ "version": "2.0.0-rc.26",
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": "00afe9a823d141de55b2f2590429a1bcf4a637d8"
97
+ "gitHead": "021c153ea593848f7c1a2049c95af0b880603c9e"
98
98
  }
@@ -69,29 +69,21 @@ $tearsheet-class: #{$pkg-prefix}--tearsheet;
69
69
  background-color: $layer-selected-01;
70
70
  }
71
71
 
72
- &-checkbox {
72
+ &-form-control {
73
73
  display: flex;
74
74
  align-items: center;
75
75
  }
76
76
 
77
- &-checkbox-label-wrapper {
77
+ &-form-control-label-wrapper {
78
78
  display: flex;
79
79
  margin-left: $spacing-05;
80
80
  }
81
81
 
82
- &-checkbox-label-text {
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-checkbox-label-wrapper {
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;
@@ -1,5 +1,5 @@
1
1
  //
2
- // Copyright IBM Corp. 2021, 2021
2
+ // Copyright IBM Corp. 2021, 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.
@@ -43,16 +43,12 @@ $step-block-class: #{c4p-settings.$pkg-prefix}--create-full-page__step;
43
43
  .#{$block-class} .#{$block-class}__step-subtitle {
44
44
  @include type.type-style('productive-heading-01');
45
45
 
46
- max-width: 50%;
47
- padding-left: $spacing-08;
48
46
  margin-bottom: $spacing-03;
49
47
  }
50
48
 
51
49
  .#{$block-class} .#{$block-class}__step-description {
52
50
  @include type.type-style('body-long-01');
53
51
 
54
- max-width: 50%;
55
- padding-left: $spacing-08;
56
52
  margin-bottom: $spacing-06;
57
53
  }
58
54
 
@@ -106,9 +102,10 @@ $step-block-class: #{c4p-settings.$pkg-prefix}--create-full-page__step;
106
102
  .#{$block-class} .#{$block-class}__step {
107
103
  position: relative;
108
104
  padding-bottom: $spacing-07;
109
- .#{c4p-settings.$carbon-prefix}--css-grid {
110
- margin-left: 0;
111
- }
105
+ }
106
+
107
+ .#{$block-class}__step .#{c4p-settings.$carbon-prefix}--css-grid {
108
+ margin-left: 0;
112
109
  }
113
110
 
114
111
  .#{$block-class} .#{c4p-settings.$carbon-prefix}--side-nav--ux {
@@ -144,8 +141,6 @@ $step-block-class: #{c4p-settings.$pkg-prefix}--create-full-page__step;
144
141
  .#{$block-class} .#{$block-class}__step-title {
145
142
  @include type.type-style('productive-heading-04');
146
143
 
147
- max-width: 50%;
148
- padding-left: $spacing-08;
149
144
  margin-bottom: $spacing-05;
150
145
  }
151
146
 
@@ -1,5 +1,5 @@
1
1
  //
2
- // Copyright IBM Corp. 2021, 2021
2
+ // Copyright IBM Corp. 2021, 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.
@@ -41,6 +41,11 @@ $tearsheet-divider-class: #{c4p-settings.$pkg-prefix}--tearsheet-create__section
41
41
  $tearsheet-fieldset-class: #{c4p-settings.$pkg-prefix}--tearsheet-create__step--fieldset;
42
42
 
43
43
  .#{$create-tearsheet-block-class} .#{$step-block-class}__step--visible-step {
44
+ padding-right: $spacing-03;
45
+ padding-left: $spacing-03;
46
+
47
+ margin-left: 0;
48
+
44
49
  // stylelint-disable-next-line carbon/motion-easing-use
45
50
  animation: step-content-entrance $duration-slow-01;
46
51
  animation-fill-mode: forwards;
@@ -53,7 +58,6 @@ $tearsheet-fieldset-class: #{c4p-settings.$pkg-prefix}--tearsheet-create__step--
53
58
  }
54
59
 
55
60
  .#{$step-block-class} .#{c4p-settings.$carbon-prefix}--css-grid {
56
- padding-left: 0;
57
61
  margin-left: 0;
58
62
  }
59
63
 
@@ -78,7 +82,8 @@ $tearsheet-fieldset-class: #{c4p-settings.$pkg-prefix}--tearsheet-create__step--
78
82
 
79
83
  .#{$create-tearsheet-block-class} .#{$create-tearsheet-block-class}__content {
80
84
  height: 100%;
81
- padding: $spacing-06;
85
+ padding-top: $spacing-06;
86
+ padding-bottom: $spacing-06;
82
87
  overflow-x: hidden;
83
88
  }
84
89
 
@@ -628,3 +628,7 @@
628
628
  padding: 0 $spacing-03;
629
629
  }
630
630
  }
631
+
632
+ .#{$block-class} .#{c4p-settings.$pkg-prefix}--datagrid__head-wrap {
633
+ background-color: $layer-accent;
634
+ }
@@ -24,7 +24,9 @@
24
24
  .#{c4p-settings.$carbon-prefix}--table-sort:focus,
25
25
  .#{c4p-settings.$carbon-prefix}--table-header-label
26
26
  .#{c4p-settings.$carbon-prefix}--table-sort:active,
27
- .#{c4p-settings.$carbon-prefix}--table-header-label button:focus svg {
27
+ .#{c4p-settings.$carbon-prefix}--table-header-label
28
+ button:focus
29
+ .#{$block-class}__sortable-icon {
28
30
  /* stylelint-disable-next-line declaration-no-important */
29
31
  background: none !important;
30
32
  /* stylelint-disable-next-line declaration-no-important */
@@ -54,7 +56,7 @@
54
56
  }
55
57
  .#{c4p-settings.$carbon-prefix}--table-header-label
56
58
  .#{c4p-settings.$carbon-prefix}--table-sort
57
- svg {
59
+ .#{$block-class}__sortable-icon {
58
60
  fill: $text-primary;
59
61
  opacity: 0;
60
62
  visibility: hidden;
@@ -69,7 +71,8 @@
69
71
  .#{$block-class}__sortableColumn:hover,
70
72
  .#{$block-class}__sortableColumn:focus-within,
71
73
  .#{$block-class}__sortableColumn.#{$block-class}__isSorted {
72
- .#{c4p-settings.$carbon-prefix}--table-header-label svg {
74
+ .#{c4p-settings.$carbon-prefix}--table-header-label
75
+ .#{$block-class}__sortable-icon {
73
76
  opacity: 1;
74
77
  visibility: visible;
75
78
  }
@@ -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-wrapper {
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
- padding-left: $spacing-02;
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}__row-size-dropdown {
15
- padding: $spacing-05;
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
- .#{c4p-settings.$carbon-prefix}--btn--ghost.#{variables.$block-class}__row-size-button--open {
22
- background-color: $layer-02;
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
- box-shadow: 1px 4px 8px -3px $overlay, -1px 6px 8px -5px $overlay;
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
+ }
@@ -18,8 +18,8 @@ $block-class: #{c4p-settings.$pkg-prefix}--empty-state;
18
18
 
19
19
  .#{$block-class}__header {
20
20
  @include type.type-style('heading-03');
21
- // stylelint-disable-next-line carbon/layout-token-use
22
- padding-bottom: calc($spacing-01 + $spacing-02);
21
+
22
+ padding-bottom: $spacing-03;
23
23
  margin: 0;
24
24
  }
25
25
 
@@ -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--animation {
207
- // width: ;
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
- @include input-button-defaults($block-class);
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}-focused {
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
- /* stylelint-disable-next-line carbon/layout-token-use */
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
+ }
@@ -1,5 +1,5 @@
1
1
  //
2
- // Copyright IBM Corp. 2020, 2022
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.
@@ -314,19 +314,10 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
314
314
  margin-bottom: $spacing-03;
315
315
  background-color: $layer-01;
316
316
  transition: transform $duration-moderate-01 motion(standard);
317
- .#{$block-class}__action-toolbar-button {
318
- min-width: 2rem;
319
- &.#{$block-class}__action-toolbar-icon-only-button {
320
- padding: 0;
321
- color: $text-primary;
322
- }
323
- &.#{$block-class}__action-toolbar-icon-only-button svg {
324
- margin-left: $spacing-03;
325
- }
326
- &.#{$block-class}__action-toolbar-leading-button {
327
- margin-right: $spacing-03;
328
- }
329
- }
317
+ }
318
+
319
+ .#{$block-class}__action-toolbar-leading-button {
320
+ margin-right: $spacing-03;
330
321
  }
331
322
 
332
323
  .#{c4p-settings.$carbon-prefix}--btn.#{$block-class}__navigation-back-button {
@@ -341,6 +332,7 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
341
332
  padding: 0;
342
333
  color: $text-primary;
343
334
  }
335
+
344
336
  .#{c4p-settings.$carbon-prefix}--btn.#{$block-class}__close-button {
345
337
  position: absolute;
346
338
  z-index: 5;
@@ -349,8 +341,8 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
349
341
  display: flex;
350
342
  align-items: center;
351
343
  justify-content: center;
352
- background-color: $layer-01;
353
344
  }
345
+
354
346
  .#{c4p-settings.$carbon-prefix}--btn.#{$block-class}__close-button
355
347
  .#{c4p-settings.$carbon-prefix}--btn__icon {
356
348
  margin: 0;