@carbon/ibm-products 2.0.0-rc.3 → 2.0.0-rc.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. package/css/index-full-carbon.css +63 -157
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +3 -9
  4. package/css/index-full-carbon.min.css.map +1 -1
  5. package/css/index-without-carbon-released-only.css +8 -151
  6. package/css/index-without-carbon-released-only.css.map +1 -1
  7. package/css/index-without-carbon-released-only.min.css +3 -9
  8. package/css/index-without-carbon-released-only.min.css.map +1 -1
  9. package/css/index-without-carbon.css +63 -157
  10. package/css/index-without-carbon.css.map +1 -1
  11. package/css/index-without-carbon.min.css +3 -9
  12. package/css/index-without-carbon.min.css.map +1 -1
  13. package/css/index.css +63 -157
  14. package/css/index.css.map +1 -1
  15. package/css/index.min.css +3 -9
  16. package/css/index.min.css.map +1 -1
  17. package/es/components/AddSelect/AddSelectBody.js +2 -2
  18. package/es/components/CreateTearsheetNarrow/CreateTearsheetNarrow.js +2 -2
  19. package/es/components/Datagrid/Datagrid/DatagridContent.js +9 -4
  20. package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +2 -1
  21. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +3 -0
  22. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +10 -9
  23. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsModal.js +1 -2
  24. package/es/components/Datagrid/useInfiniteScroll.js +5 -2
  25. package/es/components/Datagrid/utils/getArgTypes.js +4 -0
  26. package/es/components/EditUpdateCards/EditUpdateCards.js +144 -0
  27. package/es/components/EditUpdateCards/index.js +7 -0
  28. package/es/components/PageHeader/PageHeaderTitle.js +3 -1
  29. package/es/components/SidePanel/SidePanel.js +44 -51
  30. package/es/components/SidePanel/motion/variants.js +45 -0
  31. package/es/components/index.js +2 -1
  32. package/es/global/js/package-settings.js +2 -1
  33. package/es/global/js/utils/getBezierValues.js +20 -0
  34. package/es/global/js/utils/motionConstants.js +45 -0
  35. package/lib/components/AddSelect/AddSelectBody.js +2 -2
  36. package/lib/components/CreateTearsheetNarrow/CreateTearsheetNarrow.js +2 -2
  37. package/lib/components/Datagrid/Datagrid/DatagridContent.js +8 -3
  38. package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +2 -1
  39. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +3 -0
  40. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +9 -8
  41. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsModal.js +1 -2
  42. package/lib/components/Datagrid/useInfiniteScroll.js +5 -2
  43. package/lib/components/Datagrid/utils/getArgTypes.js +4 -0
  44. package/lib/components/EditUpdateCards/EditUpdateCards.js +152 -0
  45. package/lib/components/EditUpdateCards/index.js +13 -0
  46. package/lib/components/PageHeader/PageHeaderTitle.js +3 -1
  47. package/lib/components/SidePanel/SidePanel.js +45 -50
  48. package/lib/components/SidePanel/motion/variants.js +55 -0
  49. package/lib/components/index.js +9 -1
  50. package/lib/global/js/package-settings.js +2 -1
  51. package/lib/global/js/utils/getBezierValues.js +29 -0
  52. package/lib/global/js/utils/motionConstants.js +55 -0
  53. package/package.json +5 -3
  54. package/scss/components/AddSelect/_add-select.scss +2 -2
  55. package/scss/components/Datagrid/_storybook-styles.scss +4 -0
  56. package/scss/components/Datagrid/styles/_useInlineEdit.scss +20 -5
  57. package/scss/components/Datagrid/styles/addons/_CustomizeColumnsModal.scss +2 -0
  58. package/scss/components/EditUpdateCards/_carbon-imports.scss +9 -0
  59. package/scss/components/EditUpdateCards/_edit-update-cards.scss +85 -0
  60. package/scss/components/EditUpdateCards/_index-with-carbon.scss +9 -0
  61. package/scss/components/EditUpdateCards/_index.scss +8 -0
  62. package/scss/components/EditUpdateCards/_storybook-styles.scss +55 -0
  63. package/scss/components/PageHeader/_page-header.scss +4 -0
  64. package/scss/components/SidePanel/_side-panel.scss +2 -78
  65. package/scss/components/SidePanel/_storybook-styles.scss +6 -1
  66. package/scss/components/_index-with-carbon.scss +1 -0
  67. package/scss/components/_index.scss +1 -0
@@ -93,3 +93,7 @@ $block-class: #{c4p-settings.$pkg-prefix}--datagrid;
93
93
  text-overflow: ellipsis;
94
94
  white-space: nowrap;
95
95
  }
96
+
97
+ .#{$block-class}-story__hidden-column-id-snippet {
98
+ padding-top: $spacing-07;
99
+ }
@@ -64,6 +64,10 @@ $row-heights: (
64
64
  }
65
65
  }
66
66
 
67
+ .#{variables.$block-class} {
68
+ --#{variables.$block-class}--grid-header-height: 0;
69
+ }
70
+
67
71
  .#{variables.$block-class}__inline-edit-cell {
68
72
  display: flex;
69
73
  height: 100%;
@@ -249,7 +253,9 @@ $row-heights: (
249
253
  bottom: 0;
250
254
  left: 0;
251
255
  width: 2px;
252
- height: calc(100% - 50px);
256
+ height: calc(
257
+ 100% - 50px - var(--#{variables.$block-class}--grid-header-height)
258
+ );
253
259
  background-color: $link-inverse;
254
260
  content: '';
255
261
  }
@@ -261,15 +267,16 @@ $row-heights: (
261
267
  right: 0;
262
268
  bottom: 0;
263
269
  width: 2px;
264
- height: calc(100% - 50px);
270
+ height: calc(
271
+ 100% - 50px - var(--#{variables.$block-class}--grid-header-height)
272
+ );
265
273
  background-color: $link-inverse;
266
274
  content: '';
267
275
  }
268
276
 
269
277
  .#{variables.$block-class}
270
278
  .#{variables.$block-class}__grid-container-grid-active
271
- .#{variables.$block-class}__table-grid-active
272
- thead::before {
279
+ .#{c4p-settings.$carbon-prefix}--data-table-content::before {
273
280
  position: absolute;
274
281
  z-index: 2;
275
282
  top: 0;
@@ -284,7 +291,9 @@ $row-heights: (
284
291
  .#{variables.$block-class}__grid-container-grid-active.#{variables.$block-class}__grid-container-grid-active--without-toolbar::before,
285
292
  .#{variables.$block-class}
286
293
  .#{variables.$block-class}__grid-container-grid-active.#{variables.$block-class}__grid-container-grid-active--without-toolbar::after {
287
- height: calc(100% - 2px);
294
+ height: calc(
295
+ 100% - 2px - var(--#{variables.$block-class}--grid-header-height)
296
+ );
288
297
  }
289
298
 
290
299
  .#{variables.$block-class}
@@ -294,6 +303,12 @@ $row-heights: (
294
303
  outline-offset: -2px;
295
304
  }
296
305
 
306
+ .#{variables.$block-class}
307
+ .#{variables.$block-class}__grid-container-inline-edit
308
+ .#{variables.$block-class}__table-container {
309
+ padding-top: $spacing-01;
310
+ }
311
+
297
312
  .#{variables.$block-class}
298
313
  .#{variables.$block-class}__inline-edit--outer-cell-button--invalid
299
314
  [data-invalid]
@@ -65,6 +65,7 @@
65
65
  .#{variables.$block-class}__customize-columns-select-all {
66
66
  display: flex;
67
67
  height: $spacing-09;
68
+ align-items: center;
68
69
  padding-left: $spacing-08;
69
70
  border-bottom: 1px solid $layer-active;
70
71
  background-color: $layer-01;
@@ -75,6 +76,7 @@
75
76
  .#{variables.$block-class}__customize-columns-select-all-selected {
76
77
  display: flex;
77
78
  height: $spacing-09;
79
+ align-items: center;
78
80
  padding-left: $spacing-08;
79
81
  border-bottom: 1px solid $layer-active;
80
82
  background-color: $layer-selected-01;
@@ -0,0 +1,9 @@
1
+ //
2
+ // Copyright IBM Corp. 2022, 2022
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
+ // Import any Carbon component styles used from EditUpdateCards in this file.
9
+ // EditUpdateCards uses the following Carbon components:
@@ -0,0 +1,85 @@
1
+ //
2
+ // Copyright IBM Corp. 2022, 2022
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
+
10
+ // Other Carbon settings.
11
+ // TODO: @import 'carbon-components/scss/globals/grid/grid'; if needed
12
+ @use '@carbon/colors/' as *;
13
+ @use '@carbon/motion/' as *;
14
+ @use '../../global/styles/project-settings' as c4p-settings;
15
+
16
+ // EditUpdateCards uses the following Carbon components:
17
+ // TODO: @import(s) of Carbon component styles used by EditUpdateCards
18
+
19
+ // EditUpdateCards uses the following Carbon for IBM Products components:
20
+ // TODO: @import(s) of IBM Products component styles used by EditUpdateCards
21
+
22
+ // Define all component styles in a mixin which is then exported using
23
+ // the Carbon import-once mechanism.
24
+ /* stylelint-disable max-nesting-depth */
25
+ $block-class: #{c4p-settings.$pkg-prefix}--edit-update-cards;
26
+
27
+ .#{$block-class} {
28
+ &##{$block-class}--edit {
29
+ /* Used id for overriding the SVG path fill */
30
+
31
+ .#{c4p-settings.$pkg-prefix}--card__header,
32
+ .#{c4p-settings.$pkg-prefix}--card__footer {
33
+ button {
34
+ &:hover {
35
+ // stylelint-disable-next-line carbon/theme-token-use
36
+ background-color: $blue-60-hover;
37
+ }
38
+
39
+ &:focus {
40
+ box-shadow: none;
41
+ }
42
+
43
+ svg {
44
+ path {
45
+ // stylelint-disable-next-line carbon/theme-token-use
46
+ fill: $white-0;
47
+ }
48
+ }
49
+
50
+ &.#{c4p-settings.$pkg-prefix}--loading {
51
+ &:hover {
52
+ background-color: transparent;
53
+ }
54
+ }
55
+ }
56
+ }
57
+ .#{c4p-settings.$pkg-prefix}--card__footer {
58
+ // stylelint-disable-next-line carbon/theme-token-use
59
+ background-color: $blue-60;
60
+ // stylelint-disable-next-line carbon/theme-token-use
61
+ color: $white-0;
62
+ }
63
+ .#{c4p-settings.$pkg-prefix}--loading {
64
+ animation-duration: $duration-slow-02;
65
+ animation-fill-mode: forwards;
66
+ animation-iteration-count: infinite;
67
+ animation-name: rotate;
68
+ animation-timing-function: motion(standard, productive);
69
+
70
+ &:hover {
71
+ background-color: transparent;
72
+ }
73
+ }
74
+ }
75
+ &:not(.#{$block-class}__actions-bottom) {
76
+ &##{$block-class}--edit {
77
+ .#{c4p-settings.$pkg-prefix}--card__header {
78
+ // stylelint-disable-next-line carbon/theme-token-use
79
+ background-color: $blue-60;
80
+ // stylelint-disable-next-line carbon/theme-token-use
81
+ color: $white-0;
82
+ }
83
+ }
84
+ }
85
+ }
@@ -0,0 +1,9 @@
1
+ //
2
+ // Copyright IBM Corp. 2022, 2022
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
+ @use './carbon-imports';
9
+ @use './edit-update-cards';
@@ -0,0 +1,8 @@
1
+ //
2
+ // Copyright IBM Corp. 2022, 2022
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
+ @use './edit-update-cards';
@@ -0,0 +1,55 @@
1
+ //
2
+ // Copyright IBM Corp. 2022, 2022
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
+ @use '@carbon/colors/' as *;
9
+ @use '@carbon/type/' as *;
10
+ @use '@carbon/styles/scss/spacing' as *;
11
+ @use '../../global/styles/project-settings' as c4p-settings;
12
+
13
+ // make the root full width to get a better idea of how the cards
14
+ // look in a real grid situation
15
+ /* stylelint-disable max-nesting-depth */
16
+ #root {
17
+ width: 100%;
18
+ }
19
+
20
+ $block-class: #{c4p-settings.$pkg-prefix}--edit-update-cards;
21
+
22
+ .#{$block-class} {
23
+ textarea,
24
+ input,
25
+ select {
26
+ width: 100%;
27
+ height: auto;
28
+ padding: 0;
29
+ // stylelint-disable-next-line
30
+ font-size: type-scale(3);
31
+ letter-spacing: 0;
32
+ // stylelint-disable-next-line carbon/type-token-use
33
+ line-height: 1.5;
34
+ }
35
+ }
36
+ .#{$block-class}--items {
37
+ margin-bottom: $spacing-06;
38
+
39
+ &:last-child {
40
+ margin-bottom: 0;
41
+ }
42
+ }
43
+ .#{$block-class}--icon-text {
44
+ display: flex;
45
+ align-items: center;
46
+
47
+ svg {
48
+ margin-right: $spacing-01;
49
+
50
+ path {
51
+ // stylelint-disable-next-line carbon/theme-token-use
52
+ fill: $green-50;
53
+ }
54
+ }
55
+ }
@@ -466,6 +466,10 @@ $right-section-alt-width: 100% - $left-section-alt-width;
466
466
  vertical-align: middle;
467
467
  }
468
468
 
469
+ .#{$block-class}__title-wrapper {
470
+ @include type.type-style('productive-heading-04');
471
+ }
472
+
469
473
  .#{$block-class}__page-actions {
470
474
  flex: 0 0 100%;
471
475
  margin-top: $spacing-05;
@@ -26,49 +26,6 @@
26
26
  $block-class: #{c4p-settings.$pkg-prefix}--side-panel;
27
27
  $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
28
28
 
29
- @mixin sidePanelEntranceRight($size: map-get($side-panel-sizes, md)) {
30
- @keyframes side-panel-entrance-right {
31
- 0% {
32
- opacity: 0;
33
- // stylelint-disable-next-line carbon/layout-token-use
34
- transform: translateX(#{$size}); // the size width of the side panel
35
- }
36
-
37
- 100% {
38
- opacity: 1;
39
- transform: translateX(0);
40
- }
41
- }
42
- }
43
-
44
- @mixin sidePanelEntranceLeft($size: map-get($side-panel-sizes, md)) {
45
- @keyframes side-panel-entrance-left {
46
- 0% {
47
- opacity: 0;
48
- // stylelint-disable-next-line carbon/layout-token-use
49
- transform: translateX(-#{$size}); // the size width of the side panel
50
- }
51
-
52
- 100% {
53
- opacity: 1;
54
- transform: translateX(0);
55
- }
56
- }
57
- }
58
-
59
- @mixin sidePanelEntrance(
60
- $placement: 'right',
61
- $size: map-get($side-panel-sizes, md)
62
- ) {
63
- width: $size;
64
- max-width: 100%;
65
- @if $placement == right {
66
- @include sidePanelEntranceRight($size);
67
- } @else {
68
- @include sidePanelEntranceLeft($size);
69
- }
70
- }
71
-
72
29
  @mixin setPanelSize($size: map-get($side-panel-sizes, md)) {
73
30
  width: $size;
74
31
  max-width: 100%;
@@ -93,32 +50,6 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
93
50
  -webkit-line-clamp: 2;
94
51
  }
95
52
 
96
- @keyframes side-panel-exit-left {
97
- 0% {
98
- opacity: 1;
99
- transform: translateX(0);
100
- }
101
-
102
- 100% {
103
- opacity: 0;
104
- // stylelint-disable-next-line carbon/layout-token-use
105
- transform: translateX(calc(-1 * #{map-get($side-panel-sizes, md)}));
106
- }
107
- }
108
-
109
- @keyframes side-panel-exit-right {
110
- 0% {
111
- opacity: 1;
112
- transform: translateX(0);
113
- }
114
-
115
- 100% {
116
- opacity: 0;
117
- // stylelint-disable-next-line carbon/layout-token-use
118
- transform: translateX(map-get($side-panel-sizes, md));
119
- }
120
- }
121
-
122
53
  .#{$block-class}__container {
123
54
  --#{$block-class}--subtitle-opacity: 1;
124
55
  --#{$block-class}--title-container-height: 0;
@@ -140,7 +71,6 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
140
71
  box-sizing: border-box;
141
72
  background-color: $layer-01;
142
73
  color: $text-primary;
143
- transition: transform $duration-moderate-02 motion(standard);
144
74
  @each $size, $size_value in $side-panel-sizes {
145
75
  &.#{$block-class}__container--#{$size} {
146
76
  @include setPanelSize($size_value);
@@ -152,14 +82,10 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
152
82
  }
153
83
  }
154
84
  &.#{$block-class}__container-right-placement.#{$block-class}__container--#{$size} {
155
- @include sidePanelEntrance(right, $size_value);
156
-
157
85
  right: 0;
158
86
  border-left: 1px solid $border-subtle-02;
159
87
  }
160
88
  &.#{$block-class}__container-left-placement.#{$block-class}__container--#{$size} {
161
- @include sidePanelEntrance(left, $size_value);
162
-
163
89
  left: 0;
164
90
  border-right: 1px solid $border-subtle-02;
165
91
  }
@@ -283,7 +209,7 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
283
209
  // stylelint-disable-next-line carbon/layout-token-use
284
210
  top: calc(
285
211
  var(--#{$block-class}--title-text-height) +
286
- var(--#{$block-class}--label-text-height) + #{$spacing-09}
212
+ var(--#{$block-class}--label-text-height)
287
213
  );
288
214
  background-color: $layer-01;
289
215
  }
@@ -303,7 +229,6 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
303
229
 
304
230
  .#{$block-class}__title-container.#{$block-class}__title-container--no-title-animation {
305
231
  position: fixed;
306
- top: $spacing-09;
307
232
  height: calc(
308
233
  var(--#{$block-class}--title-text-height) +
309
234
  var(--#{$block-class}--label-text-height)
@@ -358,7 +283,7 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
358
283
  // stylelint-disable-next-line carbon/layout-token-use
359
284
  top: calc(
360
285
  var(--#{$block-class}--title-text-height) +
361
- var(--#{$block-class}--subtitle-container-height) + #{$spacing-09}
286
+ var(--#{$block-class}--subtitle-container-height)
362
287
  );
363
288
  width: 100%;
364
289
  border-bottom: 1px solid $layer-active-01;
@@ -533,5 +458,4 @@ $action-set-block-class: #{c4p-settings.$pkg-prefix}--action-set;
533
458
  width: 100%;
534
459
  height: 100%;
535
460
  background-color: $overlay;
536
- transition: background-color $duration-moderate-02 motion(standard);
537
461
  }
@@ -1,5 +1,5 @@
1
1
  //
2
- // Copyright IBM Corp. 2020, 2021
2
+ // Copyright IBM Corp. 2020, 2022
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.
@@ -7,6 +7,7 @@
7
7
 
8
8
  @use '@carbon/styles/scss/theme' as *;
9
9
  @use '@carbon/styles/scss/spacing' as *;
10
+ @use '@carbon/themes/scss/themes';
10
11
  @use '@carbon/styles/scss/type';
11
12
 
12
13
  $story-prefix: side-panel-stories__;
@@ -38,3 +39,7 @@ $story-prefix: side-panel-stories__;
38
39
  margin: $spacing-05 0 $spacing-04;
39
40
  }
40
41
  }
42
+
43
+ .#{$story-prefix}header {
44
+ @include theme(themes.$g100);
45
+ }
@@ -45,3 +45,4 @@
45
45
  @use './InlineEdit/index-with-carbon' as *;
46
46
  @use './DataSpreadsheet/index-with-carbon' as *;
47
47
  @use './Datagrid/index-with-carbon' as *;
48
+ @use './EditUpdateCards/index-with-carbon' as *;
@@ -48,3 +48,4 @@
48
48
  @use './EditTearsheet';
49
49
  @use './EditTearsheetNarrow';
50
50
  @use './EditFullPage';
51
+ @use './EditUpdateCards';